Commit ea7330b8 by Takumi Imai

Merge branch 'feature/1.0_check_web_dev_50312' into 'feature/1.0_check_web_dev'

Feature/1.0 check web dev 50312

See merge request !66
parents 911e0efb 11b075be
......@@ -162,29 +162,6 @@ COMMON.showAlert = function (messageCode, options = {}) {
};
/**
* show alert
*
* @param {String} msgCode
*/
COMMON.displayAlert = function (msgCode, isError) {
$('#msgModel').html(I18N.i18nText(msgCode));
$('#confirmYes').hide();
$('#confirmNo').text(I18N.i18nText("confirmation"));
if (isError) {
$('#modalTitle').text(I18N.i18nText("error"));
}
// $('.alert-overlay').removeClass('d-none');
// $('.alert-area').removeClass('d-none');
// const positionY = $(document).scrollTop() + screen.height / 8;
// const height = screen.height / 4;
// $('.alert-overlay').css('height', screen.height);
// $('.alert-area').css('top', positionY);
// $('.alert-area').css('min-height', height);
// $('body').css('overflow', 'hidden');
};
/**
* close alert
*/
COMMON.alertClose = function () {
......@@ -282,10 +259,10 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else if (result.httpStatus == '403') {
COMMON.closeLoading();
COMMON.displayAlert('errorOccurred');
COMMON.showAlert('errorOccurred');
} else {
COMMON.closeLoading();
COMMON.displayAlert(result.message);
COMMON.showAlert(result.message);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
......@@ -293,7 +270,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
errorCallback(XMLHttpRequest, textStatus, errorThrown);
} else {
COMMON.closeLoading();
COMMON.displayAlert('errorCommunicationFailed');
COMMON.showAlert('errorCommunicationFailed');
}
},
});
......@@ -302,7 +279,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
errorCallback();
} else {
COMMON.closeLoading();
COMMON.displayAlert('errorOccurred');
COMMON.showAlert('errorOccurred');
}
}
};
......
......@@ -66,17 +66,17 @@ HEADER.processLogout = function () {
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else {
if (data.errorMessage) {
COMMON.displayAlert(data.errorMessage);
COMMON.showAlert(data.errorMessage);
} else {
COMMON.displayAlert('errorOccured');
COMMON.showAlert('errorOccured');
}
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.errorMessage) {
COMMON.displayAlert(xmlHttpRequest.errorMessage);
COMMON.showAlert(xmlHttpRequest.errorMessage);
} else {
COMMON.displayAlert('errorOccured');
COMMON.showAlert('errorOccured');
}
},
);
......
......@@ -19,10 +19,13 @@ DASHBOARD.communicationItems = [
/** Default dashboard setting data */
DASHBOARD.defaultDashboard = {
newReport: 0,
continousWork: 0,
warningReport: 0,
pushMesage: 0,
dashboard: {
newReport: 0,
continousWork: 0,
warningReport: 0,
pushMesage: 0
}
};
DASHBOARD.getDataApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.DASHBOARD;
......@@ -33,7 +36,7 @@ DASHBOARD.getDataApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientDat
*/
DASHBOARD.getDashboardData = function (callback) {
let param = {
sid: COMMON.getSid(),
sid: COMMON.getSid()
};
COMMON.cmsAjax(
DASHBOARD.getDataApiUrl,
......@@ -132,7 +135,10 @@ DASHBOARD.init = function () {
sessionStorage.removeItem("RL_searchWord");
DASHBOARD.loadCommon();
DashboardSetting.getSettingData(function (settings) {
DASHBOARD.getDashboardData(function (dataDashboard) {
DASHBOARD.getDashboardData(function (dataDashboard)
{
if(!dataDashboard.dashboard || jQuery.isEmptyObject(dataDashboard.dashboard ) )
dataDashboard.dashboard = DASHBOARD.defaultDashboard.dashboard;
DASHBOARD.updateDataPickups(settings, dataDashboard);
DASHBOARD.initPickups();
DASHBOARD.updateDataCommunications(dataDashboard);
......
......@@ -460,7 +460,7 @@ OL.search = function () {
if (searchStartDate && searchEndDate && searchStartDate > searchEndDate) {
COMMON.closeLoading();
COMMON.displayAlert('dateError');
COMMON.showAlert('dateError');
return;
}
......
......@@ -54,7 +54,7 @@ PP.initPdfList = function () {
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.QUICK_REPORT_PRINT;
$('#pdfPrintDiv').load(url, params);
} else {
COMMON.displayAlert('error');
COMMON.showAlert('error');
COMMON.avwScreenMove('reportList.html');
}
};
......@@ -431,7 +431,7 @@ PICKUP.createContinousWorkList = function (operationListOld) {
let ahrefRequiredFlg;
if (operationList[i].permitCodeRequiredFlg == 1) {
ahrefRequiredFlg = $("<a href=\"javascript:CHK.displayAlert('onlyRfid');\" class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>");
ahrefRequiredFlg = $("<a href=\"javascript:COMMON.showAlert('onlyRfid');\" class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>");
} else {
ahrefRequiredFlg = $(
'<a href="javascript:PICKUP.sendReportFormFromContinuousWork (\'' +
......
......@@ -81,12 +81,12 @@ RL.checkQuickReport = function () {
RL.isQuickReport = result.isQuickReport;
},
function () {
COMMON.displayAlert('msgOperationEmpty');
COMMON.showAlert('msgOperationEmpty');
COMMON.avwScreenMove('index.html');
},
);
} else {
COMMON.displayAlert('error');
COMMON.showAlert('error');
COMMON.avwScreenMove('index.html');
}
};
......@@ -104,7 +104,7 @@ RL.initTaskReportList = function () {
COMMON.closeLoading();
});
} else {
COMMON.displayAlert('error');
COMMON.showAlert('error');
COMMON.avwScreenMove('index.html');
}
};
......
......@@ -28,14 +28,14 @@ SETTINGS.getToken = function () {
if (data.token) {
$('#getToken').val(data.token);
} else {
COMMON.displayAlert("token error..", true);
COMMON.showAlert("token error..", true);
}
},
function(data) {
if (data.errorMessage) {
COMMON.displayAlert(data.errorMessage);
COMMON.showAlert(data.errorMessage);
} else {
COMMON.displayAlert('msgPwdChangeNG');
COMMON.showAlert('msgPwdChangeNG');
}
});
};
......@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) {
$('#txtPwdNew').val('');
$('#txtPwdNewRe').val('');
/* show messages */
COMMON.displayAlert('msgPwdChangeOK');
COMMON.showAlert('msgPwdChangeOK');
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment