Commit 719e204f by Takumi Imai

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

Feature/1.0 check web dev 50272

See merge request !21
parents 99b9347d 42019b9c
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<img src="../common/img/menu_icon_account_setting.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="account_setting"> <img src="../common/img/menu_icon_account_setting.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="account_setting">
<span class="lang" style=" color: #6c757d;" lang="account_setting"></span> <span class="lang" style=" color: #6c757d;" lang="account_setting"></span>
</a> </a>
<a class="dropdown-item " href="#" data-toggle="modal" data-target="#confirm-modal"> <a class="dropdown-item " href="login.html" >
<img src="../common/img/menu_icon_logout.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="dspLogout"> <img src="../common/img/menu_icon_logout.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="dspLogout">
<span class="lang" style=" color: #6c757d;" lang="dspLogout"></span> <span class="lang" style=" color: #6c757d;" lang="dspLogout"></span>
</a> </a>
......
/** /**
* 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');
}
};
/**
* change inactive all footer bottom
*/
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');
} }
else
{
HEADER.goOperationList();
} }
};
});
}
/** /**
* 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. * Change specific footer bottom to active.
* If it is no active tab, go to page in settings. *
* @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,15 +21,15 @@ ...@@ -21,15 +21,15 @@
<script src="/abvw/common/js/constant.js?__UPDATEID__"></script> <script src="/abvw/common/js/constant.js?__UPDATEID__"></script>
<script src="/abvw/common/js/common.js?__UPDATEID__"></script> <script src="/abvw/common/js/common.js?__UPDATEID__"></script>
<script src="/abvw/js/operationList/operationList.js?__UPDATEID__"></script> <script src="/abvw/js/operationList/operationList.js?__UPDATEID__"></script>
<script src="/abvw/js/topPage/topPage.js?__UPDATEID__"></script> <script src="/abvw/js/dashboardSetting/dashboard-setting.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboard/dashboard.js?__UPDATEID__"></script> <script src="/abvw/js/dashboard/dashboard.js?__UPDATEID__"></script>
<script src="/abvw/common/js/footer.js?__UPDATEID__"></script> <script src="/abvw/common/js/header.js?__UPDATEID__"></script>
<script src="/abvw/js/topPage/topPage.js?__UPDATEID__"></script>
<script src="/abvw/common/js/app.js?__UPDATEID__" defer></script> <script src="/abvw/common/js/app.js?__UPDATEID__" defer></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;">
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,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='/abvw/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="/abvw/img/dashboard/icon_dashboard_inactive.svg" data-inactive-src="/abvw/img/dashboard/icon_dashboard_inactive.svg" data-src="/abvw/img/dashboard/icon_dashboard.svg" alt="buttonDashboard" class="p-1"> <img src="/abvw/img/dashboard/icon_dashboard_inactive.svg" data-inactive-src="/abvw/img/dashboard/icon_dashboard_inactive.svg" data-src="/abvw/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/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>
<!-- pickup --> <!-- pickup -->
...@@ -76,7 +80,14 @@ ...@@ -76,7 +80,14 @@
<nav aria-label="view" class="view-menu mt-2" id="viewMenuNewReport"> <nav aria-label="view" class="view-menu mt-2" id="viewMenuNewReport">
<div class="d-flex justify-content-between align-items-center"> <div class="d-flex justify-content-between align-items-center">
<div class="fs-9" id="count-NewReport"></div> <div class="fs-9" id="count-NewReport"></div>
<div id="includedNewReportMenuDisplay"></div> <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>
</div> </div>
</nav> </nav>
<!-- task list --> <!-- task list -->
...@@ -89,7 +100,14 @@ ...@@ -89,7 +100,14 @@
<nav aria-label="view" class="view-menu mt-2" id="viewMenuContinuousWork"> <nav aria-label="view" class="view-menu mt-2" id="viewMenuContinuousWork">
<div class="d-flex justify-content-between align-items-center"> <div class="d-flex justify-content-between align-items-center">
<div class="fs-9" id="count-ContinuousWork"></div> <div class="fs-9" id="count-ContinuousWork"></div>
<div id="includedContinuousWorkMenuDisplay"></div> <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>
</div> </div>
</nav> </nav>
<!-- task list --> <!-- task list -->
...@@ -102,7 +120,14 @@ ...@@ -102,7 +120,14 @@
<nav aria-label="view" class="view-menu mt-2" id="viewMenuReportWithWarnings"> <nav aria-label="view" class="view-menu mt-2" id="viewMenuReportWithWarnings">
<div class="d-flex justify-content-between align-items-center"> <div class="d-flex justify-content-between align-items-center">
<div class="fs-9" id="count-ReportWithWarnings"></div> <div class="fs-9" id="count-ReportWithWarnings"></div>
<div id="includedReportWithWarningsMenuDisplay"></div> <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>
</div> </div>
</nav> </nav>
<!-- task list --> <!-- task list -->
......
...@@ -127,8 +127,8 @@ DASHBOARD.updateDataPickups = function(settings, dataDashboard) { ...@@ -127,8 +127,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];
} }
}); });
} }
...@@ -139,7 +139,7 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) { ...@@ -139,7 +139,7 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
if (item.id == 'messageList') { if (item.id == 'messageList') {
item.count = 0; item.count = 0;
if (dataDashboard['pushMesage']) { if (dataDashboard['pushMesage']) {
item.count = dataDashboard['pushMesage']; item.count = dataDashboard.dashboard['pushMesage'];
} }
} }
}); });
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* @since 1.0 check web * @since 1.0 check web
*/ */
var NotificationSelect = {}; var NotificationSelect = {};
NotificationSelect.changeSelectCallback = function() {};
NotificationSelect.nameSelected=""; NotificationSelect.nameSelected="";
NotificationSelect.valueSelected=""; NotificationSelect.valueSelected="";
...@@ -48,24 +49,26 @@ NotificationSelect.selectOperationClick = function () { ...@@ -48,24 +49,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 +79,7 @@ NotificationSelect.init = function () { ...@@ -76,7 +79,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 +89,40 @@ NotificationSelect.init = function () { ...@@ -86,7 +89,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,18 @@ PICKUP.sortContinousWorkList = function(operationList) { ...@@ -393,16 +391,18 @@ 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 +603,18 @@ PICKUP.initWarningReportWithContinuousReportType = function(report) { ...@@ -603,16 +603,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,12 +38,6 @@ TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) { ...@@ -38,12 +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,8 @@ $(document).ready(function () { ...@@ -16,6 +16,8 @@ $(document).ready(function () {
//setting msg of html //setting msg of html
COMMON.updateLang(); COMMON.updateLang();
TOP.init();
}); });
/** /**
...@@ -23,7 +25,7 @@ $(document).ready(function () { ...@@ -23,7 +25,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