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 = {}) { ...@@ -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 * close alert
*/ */
COMMON.alertClose = function () { COMMON.alertClose = function () {
...@@ -282,10 +259,10 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty ...@@ -282,10 +259,10 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN); COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else if (result.httpStatus == '403') { } else if (result.httpStatus == '403') {
COMMON.closeLoading(); COMMON.closeLoading();
COMMON.displayAlert('errorOccurred'); COMMON.showAlert('errorOccurred');
} else { } else {
COMMON.closeLoading(); COMMON.closeLoading();
COMMON.displayAlert(result.message); COMMON.showAlert(result.message);
} }
}, },
error: function (XMLHttpRequest, textStatus, errorThrown) { error: function (XMLHttpRequest, textStatus, errorThrown) {
...@@ -293,7 +270,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty ...@@ -293,7 +270,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
errorCallback(XMLHttpRequest, textStatus, errorThrown); errorCallback(XMLHttpRequest, textStatus, errorThrown);
} else { } else {
COMMON.closeLoading(); COMMON.closeLoading();
COMMON.displayAlert('errorCommunicationFailed'); COMMON.showAlert('errorCommunicationFailed');
} }
}, },
}); });
...@@ -302,7 +279,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty ...@@ -302,7 +279,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
errorCallback(); errorCallback();
} else { } else {
COMMON.closeLoading(); COMMON.closeLoading();
COMMON.displayAlert('errorOccurred'); COMMON.showAlert('errorOccurred');
} }
} }
}; };
......
...@@ -66,17 +66,17 @@ HEADER.processLogout = function () { ...@@ -66,17 +66,17 @@ HEADER.processLogout = function () {
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN); COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else { } else {
if (data.errorMessage) { if (data.errorMessage) {
COMMON.displayAlert(data.errorMessage); COMMON.showAlert(data.errorMessage);
} else { } else {
COMMON.displayAlert('errorOccured'); COMMON.showAlert('errorOccured');
} }
} }
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.errorMessage) { if (xmlHttpRequest.errorMessage) {
COMMON.displayAlert(xmlHttpRequest.errorMessage); COMMON.showAlert(xmlHttpRequest.errorMessage);
} else { } else {
COMMON.displayAlert('errorOccured'); COMMON.showAlert('errorOccured');
} }
}, },
); );
......
...@@ -19,10 +19,13 @@ DASHBOARD.communicationItems = [ ...@@ -19,10 +19,13 @@ DASHBOARD.communicationItems = [
/** Default dashboard setting data */ /** Default dashboard setting data */
DASHBOARD.defaultDashboard = { DASHBOARD.defaultDashboard = {
dashboard: {
newReport: 0, newReport: 0,
continousWork: 0, continousWork: 0,
warningReport: 0, warningReport: 0,
pushMesage: 0, pushMesage: 0
}
}; };
DASHBOARD.getDataApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.DASHBOARD; 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 ...@@ -33,7 +36,7 @@ DASHBOARD.getDataApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientDat
*/ */
DASHBOARD.getDashboardData = function (callback) { DASHBOARD.getDashboardData = function (callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid()
}; };
COMMON.cmsAjax( COMMON.cmsAjax(
DASHBOARD.getDataApiUrl, DASHBOARD.getDataApiUrl,
...@@ -132,7 +135,10 @@ DASHBOARD.init = function () { ...@@ -132,7 +135,10 @@ DASHBOARD.init = function () {
sessionStorage.removeItem("RL_searchWord"); sessionStorage.removeItem("RL_searchWord");
DASHBOARD.loadCommon(); DASHBOARD.loadCommon();
DashboardSetting.getSettingData(function (settings) { 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.updateDataPickups(settings, dataDashboard);
DASHBOARD.initPickups(); DASHBOARD.initPickups();
DASHBOARD.updateDataCommunications(dataDashboard); DASHBOARD.updateDataCommunications(dataDashboard);
......
...@@ -460,7 +460,7 @@ OL.search = function () { ...@@ -460,7 +460,7 @@ OL.search = function () {
if (searchStartDate && searchEndDate && searchStartDate > searchEndDate) { if (searchStartDate && searchEndDate && searchStartDate > searchEndDate) {
COMMON.closeLoading(); COMMON.closeLoading();
COMMON.displayAlert('dateError'); COMMON.showAlert('dateError');
return; return;
} }
......
...@@ -54,7 +54,7 @@ PP.initPdfList = function () { ...@@ -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; 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); $('#pdfPrintDiv').load(url, params);
} else { } else {
COMMON.displayAlert('error'); COMMON.showAlert('error');
COMMON.avwScreenMove('reportList.html'); COMMON.avwScreenMove('reportList.html');
} }
}; };
...@@ -431,7 +431,7 @@ PICKUP.createContinousWorkList = function (operationListOld) { ...@@ -431,7 +431,7 @@ PICKUP.createContinousWorkList = function (operationListOld) {
let ahrefRequiredFlg; let ahrefRequiredFlg;
if (operationList[i].permitCodeRequiredFlg == 1) { 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 { } else {
ahrefRequiredFlg = $( ahrefRequiredFlg = $(
'<a href="javascript:PICKUP.sendReportFormFromContinuousWork (\'' + '<a href="javascript:PICKUP.sendReportFormFromContinuousWork (\'' +
......
...@@ -81,12 +81,12 @@ RL.checkQuickReport = function () { ...@@ -81,12 +81,12 @@ RL.checkQuickReport = function () {
RL.isQuickReport = result.isQuickReport; RL.isQuickReport = result.isQuickReport;
}, },
function () { function () {
COMMON.displayAlert('msgOperationEmpty'); COMMON.showAlert('msgOperationEmpty');
COMMON.avwScreenMove('index.html'); COMMON.avwScreenMove('index.html');
}, },
); );
} else { } else {
COMMON.displayAlert('error'); COMMON.showAlert('error');
COMMON.avwScreenMove('index.html'); COMMON.avwScreenMove('index.html');
} }
}; };
...@@ -104,7 +104,7 @@ RL.initTaskReportList = function () { ...@@ -104,7 +104,7 @@ RL.initTaskReportList = function () {
COMMON.closeLoading(); COMMON.closeLoading();
}); });
} else { } else {
COMMON.displayAlert('error'); COMMON.showAlert('error');
COMMON.avwScreenMove('index.html'); COMMON.avwScreenMove('index.html');
} }
}; };
......
...@@ -28,14 +28,14 @@ SETTINGS.getToken = function () { ...@@ -28,14 +28,14 @@ SETTINGS.getToken = function () {
if (data.token) { if (data.token) {
$('#getToken').val(data.token); $('#getToken').val(data.token);
} else { } else {
COMMON.displayAlert("token error..", true); COMMON.showAlert("token error..", true);
} }
}, },
function(data) { function(data) {
if (data.errorMessage) { if (data.errorMessage) {
COMMON.displayAlert(data.errorMessage); COMMON.showAlert(data.errorMessage);
} else { } else {
COMMON.displayAlert('msgPwdChangeNG'); COMMON.showAlert('msgPwdChangeNG');
} }
}); });
}; };
...@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) { ...@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) {
$('#txtPwdNew').val(''); $('#txtPwdNew').val('');
$('#txtPwdNewRe').val(''); $('#txtPwdNewRe').val('');
/* show messages */ /* 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