Commit 15e918ab by Takumi Imai

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

Add missing code

See merge request !30
parents eafa9410 eba9c2a1
...@@ -11038,7 +11038,7 @@ ul.card-list > li:not(.selected):not(.not-found):hover{ ...@@ -11038,7 +11038,7 @@ ul.card-list > li:not(.selected):not(.not-found):hover{
} }
.select-card-list .arrow-icon { .select-card-list .arrow-icon {
background-image: url("../common/img/icon_arrow_down.svg"); background-image: url("/abweb/common/img/icon_arrow_down.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 14px; width: 14px;
...@@ -20590,7 +20590,7 @@ button { ...@@ -20590,7 +20590,7 @@ button {
list-style: none; list-style: none;
} }
.list-menu button .arrow-icon{ .list-menu button .arrow-icon{
background-image: url("../common/img/icon_arrow_right.svg"); background-image: url("/abweb/common/img/icon_arrow_right.svg");
background-size: contain; background-size: contain;
width: 17px; width: 17px;
height: 17px; height: 17px;
...@@ -20689,7 +20689,7 @@ button { ...@@ -20689,7 +20689,7 @@ button {
.type-icon .report:before{ .type-icon .report:before{
content: ''; content: '';
background-image: url("../common/img/type_icon_report.svg"); background-image: url("/abweb/common/img/type_icon_report.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -20699,7 +20699,7 @@ button { ...@@ -20699,7 +20699,7 @@ button {
} }
.type-icon .questionary:before{ .type-icon .questionary:before{
content: ''; content: '';
background-image: url("../common/img/type_icon_questionary.svg"); background-image: url("/abweb/common/img/type_icon_questionary.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -20709,7 +20709,7 @@ button { ...@@ -20709,7 +20709,7 @@ button {
} }
.type-icon .inspection:before{ .type-icon .inspection:before{
content: ''; content: '';
background-image: url("../common/img/type_icon_inspection.svg"); background-image: url("/abweb/common/img/type_icon_inspection.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -20719,7 +20719,7 @@ button { ...@@ -20719,7 +20719,7 @@ button {
} }
.type-icon .proccess:before{ .type-icon .proccess:before{
content: ''; content: '';
background-image: url("../common/img/type_icon_proccess.svg"); background-image: url("/abweb/common/img/type_icon_proccess.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
......
/** /**
* Common js for footer. * header js for index.
* ※Code is written mainly for dashboard and operationList. * ※Code is written mainly for dashboard and operationList.
* *
* @since cms:1.4.3.2&1.4.3.3 web:1.0 * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var FOOTER = {}; var HEADER = {};
/** /** Direct home page setting */
* Change specific footer bottom to active. HEADER.goToHomePage = function (pageId) {
* DashboardSetting.getSettingData(function (settings) {
* @param {String} bottomNavId if(settings.dashboardHome == 1)
*/ {
FOOTER.activeBottomNav = function (bottomNavId) { HEADER.goDashboard();
let elm = $('#' + bottomNavId);
if (typeof elm !== 'object') {
console.log('FOOTER.activeBottomNav:elm !== object:' + bottomNavId);
return;
}
elm.removeClass('text-secondary');
elm.addClass('text-primary');
let img = elm.find('img')[0];
if (img && img.getAttribute('data-src')) {
img.src = img.getAttribute('data-src');
} }
}; else
/** {
* change inactive all footer bottom HEADER.goOperationList();
*/
FOOTER.inactiveAllBottomNav = function () {
let navs = document.getElementsByClassName('bottom-nav');
for (i = 0; i < navs.length; i++) {
navs[i].className = navs[i].className.replace('text-primary', 'text-secondary');
let img = navs[i].querySelector('img');
if (img && img.getAttribute('data-inactive-src')) {
img.src = img.getAttribute('data-inactive-src');
} }
});
} }
};
/** /**
* Go page of index.html. * Go page of operationList
* Store tab id in session for want to show display.
*
* @param {String} tabId
*/ */
FOOTER.goIndexPage = function (tabId) { HEADER.goOperationList = function () {
sessionStorage.activeTab = tabId; $('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () {
COMMON.goUrlWithCurrentParams(DAFAULT_PAGE); sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
}; HEADER.activeInitBottomNav('operationListBottomNav');
TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
});
};
/** /**
* is the url index.html? * Go page of dashboard
*/ */
FOOTER.isIndexPage = function () { HEADER.goDashboard = function () {
if (typeof location === 'object' && typeof location.pathname === 'string') { COMMON.avwScreenMove("dashboard.html");
if (location.pathname.includes(CONSTANT.PAGE_NAME.DEFAULT) == true) { };
return true;
}
}
return false;
};
/**
/**
* Initialize with any navigation * Initialize with any navigation
* *
* @param {String} bottomNav * @param {String} bottomNav
*/ */
FOOTER.activeInitBottomNav = function (bottomNav) { HEADER.activeInitBottomNav = function (bottomNav) {
FOOTER.inactiveAllBottomNav(); HEADER.inactiveAllBottomNav();
FOOTER.activeBottomNav(bottomNav); HEADER.activeBottomNav(bottomNav);
}; };
/** /**
* Go page of dashboard * change inactive all footer bottom
*/ */
FOOTER.goDashboard = function () { HEADER.inactiveAllBottomNav = function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.DASHBOARD; let navs = document.getElementsByClassName('bottom-nav');
FOOTER.activeInitBottomNav('dashboardBottomNav'); for (i = 0; i < navs.length; i++) {
if (FOOTER.isIndexPage()) { navs[i].className = navs[i].className.replace('text-primary', 'text-secondary');
TOP.showPage(CONSTANT.PAGE_NAME.DASHBOARD); let img = navs[i].querySelector('img');
return; if (img && img.getAttribute('data-inactive-src')) {
img.src = img.getAttribute('data-inactive-src');
} }
FOOTER.goIndexPage(CONSTANT.PAGE_NAME.DASHBOARD);
};
/**
* Go page of operationList
*/
FOOTER.goOperationList = function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
FOOTER.activeInitBottomNav('operationListBottomNav');
if (FOOTER.isIndexPage()) {
TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
return;
} }
FOOTER.goIndexPage(CONSTANT.PAGE_NAME.OPERATION_LIST); };
};
/**
* Go to active tab when footer was loaded. /**
* If it is no active tab, go to page in settings. * Change specific footer bottom to active.
*
* @param {String} bottomNavId
*/ */
FOOTER.initFooter = function () { HEADER.activeBottomNav = function (bottomNavId) {
$('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () { let elm = $('#' + bottomNavId);
if (typeof sessionStorage != 'undefined' && typeof sessionStorage.activeTab != 'undefined') { if (typeof elm !== 'object') {
if (sessionStorage.activeTab == CONSTANT.PAGE_TAB.DASHBOARD) { console.log('HEADER.activeBottomNav:elm !== object:' + bottomNavId);
FOOTER.goDashboard();
} else {
FOOTER.goOperationList();
}
return; return;
} }
elm.removeClass('text-secondary');
FOOTER.goOperationList(); elm.addClass('text-primary');
// CHK.loadDashboardSetting(function() { let img = elm.find('img')[0];
// if (CHK.dashboardSetting.dashboardHome) { if (img && img.getAttribute('data-src')) {
// FOOTER.goDashboard(); img.src = img.getAttribute('data-src');
// } else { }
// FOOTER.goOperationList(); };
// } \ No newline at end of file
// });
});
};
<!-- view display type menu -->
<div class="view">
<a href="#" class="text-decoration-none view-btn view-list-btn">
<img src="../common/img/icon_view_list.svg" alt="" class="list-block-icon mx-1 lang" lang="listDisplay" type="image" data-toggle="tooltip" data-placement="bottom" title="">
</a>
<a href="#" class="text-decoration-none view-btn view-block-btn active">
<img src="../common/img/icon_view_block.svg" alt="" class="list-block-icon mx-1 lang" lang="gridDisplay" type="image" data-toggle="tooltip" data-placement="bottom" title="">
</a>
</div>
\ No newline at end of file
...@@ -21,17 +21,17 @@ ...@@ -21,17 +21,17 @@
<script src="../common/js/constant.js?__UPDATEID__"></script> <script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script> <script src="../common/js/common.js?__UPDATEID__"></script>
<script src="../js/operationList/operationList.js?__UPDATEID__"></script> <script src="../js/operationList/operationList.js?__UPDATEID__"></script>
<script src="../js/topPage/topPage.js?__UPDATEID__"></script> <script src="/abweb/js/dashboardSetting/dashboard-setting.js?__UPDATEID__"></script>
<script src="../js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"></script>
<script src="../js/dashboard/dashboard.js?__UPDATEID__"></script> <script src="../js/dashboard/dashboard.js?__UPDATEID__"></script>
<script src="../common/js/footer.js?__UPDATEID__"></script> <script src="/abweb/common/js/header.js?__UPDATEID__"></script>
<script src="/abweb/js/topPage/topPage.js?__UPDATEID__"></script>
<script src="../common/js/app.js?__UPDATEID__" defer></script> <script src="../common/js/app.js?__UPDATEID__" defer></script>
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
</head> </head>
<body onload="TOP.init();" style="position: relative; margin-top: 53px;"> <body style="position: relative; margin-top: 53px;">
<!--作業一覧画面--> <!--作業一覧画面-->
<section id="operationList" class="page-content" style="display: none;"> <section id="operationList" class="page-content" style="display: none;">
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
<!--ローディング--> <!--ローディング-->
<div id="check_loading" style="display:none; position: relative; overflow:hidden;"> <div id="check_loading" style="display:none; position: relative; overflow:hidden;">
<p id="checkLoadingMessage"></p> <p id="checkLoadingMessage"></p>
<div id="checkLoadingImage"><img src='${check}images/transferLoading.gif' /></div> <div id="checkLoadingImage"><img src='/abweb/img/loading.svg' /></div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<nav class="d-flex justify-content-around"> <nav class="d-flex justify-content-around">
<!--ダッシュボード--> <!--ダッシュボード-->
<a id="dashboardBottomNav" class="d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav" href="javascript:FOOTER.goDashboard();"> <a id="dashboardBottomNav" class="d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav" href="dashboard.html">
<img src="../img/dashboard/icon_dashboard_inactive.svg" data-inactive-src="../img/dashboard/icon_dashboard_inactive.svg" data-src="../img/dashboard/icon_dashboard.svg" alt="buttonDashboard" class="p-1"> <img src="../img/dashboard/icon_dashboard_inactive.svg" data-inactive-src="../img/dashboard/icon_dashboard_inactive.svg" data-src="../img/dashboard/icon_dashboard.svg" alt="buttonDashboard" class="p-1">
<div class="fs-7 multi-lang" data-msg="buttonDashboard"></div> <div class="fs-7 multi-lang" data-msg="buttonDashboard"></div>
</a> </a>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</ul> </ul>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="selection"></button> <button type="button" class="btn btn-primary lang" lang="selection" onclick="NotificationSelect.onClickTempalte();"></button>
<button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button> <button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button>
</div> </div>
</div> </div>
......
...@@ -30,10 +30,14 @@ ...@@ -30,10 +30,14 @@
<script type="text/javascript" src="../js/dashboard/dashboard.js"></script> <script type="text/javascript" src="../js/dashboard/dashboard.js"></script>
<script type="text/javascript" src="../js/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pickup/pickup.js"></script> <script type="text/javascript" src="../js/pickup/pickup.js"></script>
<script type="text/javascript">
$(document).ready(function(){
PICKUP.init();
});
</script>
</head> </head>
<body onload="PICKUP.init();"> <body >
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
......
...@@ -147,8 +147,8 @@ DASHBOARD.updateDataPickups = function (settings, dataDashboard) { ...@@ -147,8 +147,8 @@ DASHBOARD.updateDataPickups = function (settings, dataDashboard) {
item.enabled = enabled; item.enabled = enabled;
} }
item.count = 0; item.count = 0;
if (dataDashboard[item.id]) { if (dataDashboard.dashboard[item.id]) {
item.count = dataDashboard[item.id]; item.count = dataDashboard.dashboard[item.id];
} }
}); });
}; };
......
...@@ -48,24 +48,26 @@ NotificationSelect.selectOperationClick = function () { ...@@ -48,24 +48,26 @@ NotificationSelect.selectOperationClick = function () {
/** /**
* init data, action when screen onload * init data, action when screen onload
*/ */
NotificationSelect.init = function () { NotificationSelect.init = function (selectedCallback) {
NotificationSelect.getNotificationSelectData(function (data) { NotificationSelect.getNotificationSelectData(function (data) {
NotificationSelect.createNotificationSelectList(data); if (typeof data === 'undefined' || data == null) return;
NotificationSelect.createNotificationSelectList(data.pushMessageTemplate);
}); });
NotificationSelect.selectOperationClick(); NotificationSelect.selectOperationClick();
NotificationSelect.changeSelectCallback = selectedCallback;
}; };
/** /**
* Implement notification select html * Implement notification select html
* @returns * @returns
*/ */
NotificationSelect.createNotificationSelectList = function(data) { NotificationSelect.createNotificationSelectList = function(pushMessageTemplate) {
$("#notificationSelectList").empty(); $("#notificationSelectList").empty();
if (typeof data === 'undefined' || data.length < 1) return; if (typeof pushMessageTemplate === 'undefined' || pushMessageTemplate.length < 1) return;
let classSelected = "selected"; let classSelected = "selected";
for (let i = 0; i < data.length; i++) { for (let i = 0; i < pushMessageTemplate.length; i++) {
let divName = $("<div class='pl-5 py-3 h-100 w-100 align-self-center select-label'>" + data[i].name + "</div>"); let divName = $("<div class='pl-5 py-3 h-100 w-100 align-self-center select-label'>" + pushMessageTemplate[i].name + "</div>");
let divIcon = $("<div class='flex-shrink-1 mx-3 align-self-center'>" let divIcon = $("<div class='flex-shrink-1 mx-3 align-self-center'>"
+ "<button class='btn btn-link border collapsed' type='button' data-toggle='collapse' data-target='#collapse" + i + "' aria-expanded='true' aria-controls='collapse" + i + "'>" + "<button class='btn btn-link border collapsed' type='button' data-toggle='collapse' data-target='#collapse" + i + "' aria-expanded='true' aria-controls='collapse" + i + "'>"
+ "<div class='arrow-icon'></div>" + "<div class='arrow-icon'></div>"
...@@ -76,7 +78,7 @@ NotificationSelect.init = function () { ...@@ -76,7 +78,7 @@ NotificationSelect.init = function () {
classSelected = ""; classSelected = "";
let divValue = $("<div id='collapse" + i + "' class='collapse' aria-labelledby='heading" + i + "' data-parent='#accordion" + i + "'></div>"); let divValue = $("<div id='collapse" + i + "' class='collapse' aria-labelledby='heading" + i + "' data-parent='#accordion" + i + "'></div>");
let divBodyValue = $("<div class='card-body'>" + data[i].value + "</div>"); let divBodyValue = $("<div class='card-body'>" + pushMessageTemplate[i].value + "</div>");
let messageli = $("<li class='accordion' id='accordion" + i + "'></li>"); let messageli = $("<li class='accordion' id='accordion" + i + "'></li>");
...@@ -86,7 +88,40 @@ NotificationSelect.init = function () { ...@@ -86,7 +88,40 @@ NotificationSelect.init = function () {
divValue.append(divBodyValue); divValue.append(divBodyValue);
messageli.append(divParentName); messageli.append(divParentName);
messageli.append(divValue); messageli.append(divValue);
if(i == 0)
{
NotificationSelect.nameSelected = pushMessageTemplate[i].name;
NotificationSelect.valueSelected = pushMessageTemplate[i].value;
}
$("#notificationSelectList").append(messageli); $("#notificationSelectList").append(messageli);
} }
} }
/**
* handle click event of select button
*/
NotificationSelect.onClickTempalte = function () {
NotificationSelect.chooseTemplate();
};
/**
* Get operation select and call back function in main page
*/
NotificationSelect.chooseTemplate = function () {
let param = {};
param.nameSelected = NotificationSelect.nameSelected;
param.valueSelected = NotificationSelect.valueSelected;
NotificationSelect.closeModal();
if (NotificationSelect.changeSelectCallback && typeof NotificationSelect.changeSelectCallback === 'function') {
NotificationSelect.changeSelectCallback(param.valueSelected);
}
};
/**
* close setting dialog
*/
NotificationSelect.closeModal = function () {
$('#select-template-modal .close').click();
};
\ No newline at end of file
...@@ -52,7 +52,8 @@ OperationSelect.selectOperationClick = function () { ...@@ -52,7 +52,8 @@ OperationSelect.selectOperationClick = function () {
*/ */
OperationSelect.init = function (selectedCallback) { OperationSelect.init = function (selectedCallback) {
OperationSelect.getOperationSelectData(function (data) { OperationSelect.getOperationSelectData(function (data) {
OperationSelect.createOperationSelectList(data); if (typeof data === 'undefined' || data == null) return;
OperationSelect.createOperationSelectList(data.operationList);
}); });
OperationSelect.selectOperationClick(); OperationSelect.selectOperationClick();
OperationSelect.changeSelectCallback = selectedCallback; OperationSelect.changeSelectCallback = selectedCallback;
...@@ -62,14 +63,14 @@ OperationSelect.init = function (selectedCallback) { ...@@ -62,14 +63,14 @@ OperationSelect.init = function (selectedCallback) {
* Implement operation select html * Implement operation select html
* @returns * @returns
*/ */
OperationSelect.createOperationSelectList = function(data) { OperationSelect.createOperationSelectList = function(operationList) {
$("#operationSelectList").empty(); $("#operationSelectList").empty();
if (typeof data === 'undefined' || data.length < 1) return; if (typeof operationList === 'undefined' || operationList.length < 1) return;
for (let i = 0; i < data.length; i++) { for (let i = 0; i < operationList.length; i++) {
let messageli = $("<li class='card mb-2' name = 'operationId_" + data[i].operationId + "' ></li>"); let messageli = $("<li class='card mb-2' name = 'operationId_" + operationList[i].operationId + "' ></li>");
let ahrefRequiredFlg = $("<a href='#' class='d-block px-5 py-3 text-decoration-none select-label' data-key='" + data[i].operationId + "' data-name='" + data[i].operationName + "' ></a>"); let ahrefRequiredFlg = $("<a href='#' class='d-block px-5 py-3 text-decoration-none select-label' data-key='" + operationList[i].operationId + "' data-name='" + operationList[i].operationName + "' ></a>");
let divText = $("<div class='fs-12 text-truncate d-block'>"+ data[i].operationName + "</div>"); let divText = $("<div class='fs-12 text-truncate d-block'>"+ operationList[i].operationName + "</div>");
ahrefRequiredFlg.append(divText); ahrefRequiredFlg.append(divText);
messageli.append(ahrefRequiredFlg); messageli.append(ahrefRequiredFlg);
...@@ -97,7 +98,7 @@ OperationSelect.init = function (selectedCallback) { ...@@ -97,7 +98,7 @@ OperationSelect.init = function (selectedCallback) {
param.operationNameSelected = OperationSelect.operationNameSelected; param.operationNameSelected = OperationSelect.operationNameSelected;
OperationSelect.closeModal(); OperationSelect.closeModal();
if (OperationSelect.changeSelectCallback && typeof OperationSelect.changeSelectCallback === 'function') { if (OperationSelect.changeSelectCallback && typeof OperationSelect.changeSelectCallback === 'function') {
OperationSelect.changeSelectCallback(param); OperationSelect.changeSelectCallback(param.operationIdSelected,param.operationNameSelected );
} }
}; };
......
...@@ -48,9 +48,9 @@ PICKUP.defaultPickupList = { ...@@ -48,9 +48,9 @@ PICKUP.defaultPickupList = {
} }
PICKUP.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE ; PICKUP.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE ;
PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReport'; PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReport/';
PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'workingFlow'; PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'workingFlow/';
PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'warningWithReport'; PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'warningWithReport/';
/** /**
* Call get new report list api get data * Call get new report list api get data
...@@ -116,9 +116,6 @@ PICKUP.init = function() { ...@@ -116,9 +116,6 @@ PICKUP.init = function() {
console.log("PICKUP.init"); console.log("PICKUP.init");
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadConfirmModal("#includedConfirmModal"); TEMPLATE.loadConfirmModal("#includedConfirmModal");
TEMPLATE.loadDisplaymenu("#includedNewReportMenuDisplay");
TEMPLATE.loadDisplaymenu("#includedContinuousWorkMenuDisplay");
TEMPLATE.loadDisplaymenu("#includedReportWithWarningsMenuDisplay");
PICKUP.initSettingActivePickup(); PICKUP.initSettingActivePickup();
PICKUP.settingPickup(); PICKUP.settingPickup();
...@@ -139,12 +136,12 @@ PICKUP.settingPickup = function() { ...@@ -139,12 +136,12 @@ PICKUP.settingPickup = function() {
if(settings.continousWork) if(settings.continousWork)
{ {
$("#liTabContinousWork").removeClass('d-none'); $("#liTabContinousWork").removeClass('d-none');
//PICKUP.initContinuosWorkTab(); PICKUP.initContinuosWorkTab();
} }
if(settings.reportWarning) if(settings.warningReport)
{ {
$("#liTabReportWithWarning").removeClass('d-none'); $("#liTabReportWithWarning").removeClass('d-none');
//PICKUP.initReportWithWarningsTab(); PICKUP.initReportWithWarningsTab();
} }
}); });
} }
...@@ -272,16 +269,17 @@ PICKUP.sortNewReportList = function(operationList) { ...@@ -272,16 +269,17 @@ PICKUP.sortNewReportList = function(operationList) {
* @returns * @returns
*/ */
PICKUP.createNewReportList = function(operationListOld) { PICKUP.createNewReportList = function(operationListOld) {
if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
PICKUP.showNotFoundPickupItem("#newReport-list");
$('#viewMenuNewReport').addClass('d-none');
return;
}
let operationList = PICKUP.sortNewReportList(operationListOld); let operationList = PICKUP.sortNewReportList(operationListOld);
$('#viewMenuNewReport').removeClass('d-none'); $('#viewMenuNewReport').removeClass('d-none');
$("#newReport-list").empty(); $("#newReport-list").empty();
PICKUP.countNewReportList = 0; PICKUP.countNewReportList = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#newReport-list");
$('#viewMenuNewReport').addClass('d-none');
return;
}
$('#newReport-list').addClass('task-list view-content view-block'); $('#newReport-list').addClass('task-list view-content view-block');
let classIcon ; let classIcon ;
for (let i = 0; i < operationList.length; i++) { for (let i = 0; i < operationList.length; i++) {
...@@ -393,16 +391,17 @@ PICKUP.sortContinousWorkList = function(operationList) { ...@@ -393,16 +391,17 @@ PICKUP.sortContinousWorkList = function(operationList) {
* @returns * @returns
*/ */
PICKUP.createContinousWorkList = function(operationListOld) { PICKUP.createContinousWorkList = function(operationListOld) {
if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
PICKUP.showNotFoundPickupItem("#continousWork-list");
$('#viewMenuContinuousWork').addClass('d-none');
return;
}
let operationList = PICKUP.sortContinousWorkList(operationListOld); let operationList = PICKUP.sortContinousWorkList(operationListOld);
$('#viewMenuContinuousWork').removeClass('d-none'); $('#viewMenuContinuousWork').removeClass('d-none');
$("#continousWork-list").empty(); $("#continousWork-list").empty();
PICKUP.countContinousWorkReport = 0; PICKUP.countContinousWorkReport = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#continousWork-list");
$('#viewMenuContinuousWork').addClass('d-none');
return;
}
$('#continousWork-list').addClass('task-list view-content view-block'); $('#continousWork-list').addClass('task-list view-content view-block');
...@@ -603,16 +602,18 @@ PICKUP.initWarningReportWithContinuousReportType = function(report) { ...@@ -603,16 +602,18 @@ PICKUP.initWarningReportWithContinuousReportType = function(report) {
* @returns * @returns
*/ */
PICKUP.createReportWithWarningList = function(operationListOld) { PICKUP.createReportWithWarningList = function(operationListOld) {
let operationList = PICKUP.sortWarningList(operationListOld);
$('#viewMenuReportWithWarnings').removeClass('d-none');
$("#reportWithWarnings-list").empty();
PICKUP.countReportWithWarning = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) { if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
PICKUP.showNotFoundPickupItem("#reportWithWarnings-list"); PICKUP.showNotFoundPickupItem("#reportWithWarnings-list");
$('#viewMenuReportWithWarnings').addClass('d-none'); $('#viewMenuReportWithWarnings').addClass('d-none');
return; return;
} }
let operationList = PICKUP.sortWarningList(operationListOld);
$('#viewMenuReportWithWarnings').removeClass('d-none');
$("#reportWithWarnings-list").empty();
PICKUP.countReportWithWarning = 0;
$('#reportWithWarnings-list').addClass('task-list view-content view-block'); $('#reportWithWarnings-list').addClass('task-list view-content view-block');
const msgLevelReport = I18N.i18nText('reportLevelReport'); const msgLevelReport = I18N.i18nText('reportLevelReport');
......
...@@ -38,13 +38,6 @@ TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) { ...@@ -38,13 +38,6 @@ TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) {
}); });
} }
/** Template load display menu */
TEMPLATE.loadDisplaymenu = function(elmentId) {
$(elmentId).load("display-menu.html", function() {
I18N.initi18n();
});
}
/** /**
* show confirm model * show confirm model
*/ */
......
...@@ -16,6 +16,7 @@ $(document).ready(function () { ...@@ -16,6 +16,7 @@ $(document).ready(function () {
//setting msg of html //setting msg of html
COMMON.updateLang(); COMMON.updateLang();
TOP.init();
}); });
/** /**
...@@ -23,7 +24,7 @@ $(document).ready(function () { ...@@ -23,7 +24,7 @@ $(document).ready(function () {
*/ */
TOP.init = function () { TOP.init = function () {
COMMON.showLoading(); COMMON.showLoading();
FOOTER.initFooter(); //app should get data after initFooter HEADER.goToHomePage();
COMMON.closeLoading(); COMMON.closeLoading();
}; };
......
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