Commit 5310be93 by NGO THI HONG

Update direct home screen

parent 26fbd48e
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
<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="#" 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>
......
<!-- 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,9 +21,9 @@ ...@@ -21,9 +21,9 @@
<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/js/topPage/topPage.js?__UPDATEID__"></script>
<script src="/abvw/common/js/footer.js?__UPDATEID__"></script> <script src="/abvw/common/js/footer.js?__UPDATEID__"></script>
<script src="/abvw/common/js/app.js?__UPDATEID__" defer></script> <script src="/abvw/common/js/app.js?__UPDATEID__" defer></script>
......
...@@ -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>
......
...@@ -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'];
} }
} }
}); });
......
...@@ -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();
} }
}); });
} }
...@@ -230,7 +227,7 @@ PICKUP.showCountDisplayPickupItem = function(elementId, count) { ...@@ -230,7 +227,7 @@ PICKUP.showCountDisplayPickupItem = function(elementId, count) {
*/ */
PICKUP.initNewReportTab = function() { PICKUP.initNewReportTab = function() {
PICKUP.getNewreportListData(function (json) { PICKUP.getNewreportListData(function (json) {
PICKUP.createNewReportList(json.operationList); PICKUP.createNewReportList(json.operationtList);
}); });
} }
...@@ -240,7 +237,7 @@ PICKUP.initNewReportTab = function() { ...@@ -240,7 +237,7 @@ PICKUP.initNewReportTab = function() {
*/ */
PICKUP.initContinuosWorkTab = function() { PICKUP.initContinuosWorkTab = function() {
PICKUP.getContinuousWorkListData(function (json) { PICKUP.getContinuousWorkListData(function (json) {
PICKUP.createContinousWorkList(json.operationList); PICKUP.createContinousWorkList(json.operationtList);
}); });
} }
...@@ -249,7 +246,7 @@ PICKUP.initNewReportTab = function() { ...@@ -249,7 +246,7 @@ PICKUP.initNewReportTab = function() {
*/ */
PICKUP.initReportWithWarningsTab = function() { PICKUP.initReportWithWarningsTab = function() {
PICKUP.getReportWithWarningsListData(function (json) { PICKUP.getReportWithWarningsListData(function (json) {
PICKUP.createReportWithWarningList(json.operationList); PICKUP.createReportWithWarningList(json.operationtList);
}); });
} }
...@@ -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,17 +391,19 @@ PICKUP.sortContinousWorkList = function(operationList) { ...@@ -393,17 +391,19 @@ PICKUP.sortContinousWorkList = function(operationList) {
* @returns * @returns
*/ */
PICKUP.createContinousWorkList = function(operationListOld) { PICKUP.createContinousWorkList = function(operationListOld) {
let operationList = PICKUP.sortContinousWorkList(operationListOld); if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
$('#viewMenuContinuousWork').removeClass('d-none');
$("#continousWork-list").empty();
PICKUP.countContinousWorkReport = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#continousWork-list"); PICKUP.showNotFoundPickupItem("#continousWork-list");
$('#viewMenuContinuousWork').addClass('d-none'); $('#viewMenuContinuousWork').addClass('d-none');
return; return;
} }
let operationList = PICKUP.sortContinousWorkList(operationListOld);
$('#viewMenuContinuousWork').removeClass('d-none');
$("#continousWork-list").empty();
PICKUP.countContinousWorkReport = 0;
$('#continousWork-list').addClass('task-list view-content view-block'); $('#continousWork-list').addClass('task-list view-content view-block');
for (let i = 0; i < operationList.length; i++) { for (let i = 0; i < operationList.length; i++) {
...@@ -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) {
if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
PICKUP.showNotFoundPickupItem("#reportWithWarnings-list");
$('#viewMenuReportWithWarnings').addClass('d-none');
return;
}
let operationList = PICKUP.sortWarningList(operationListOld); let operationList = PICKUP.sortWarningList(operationListOld);
$('#viewMenuReportWithWarnings').removeClass('d-none'); $('#viewMenuReportWithWarnings').removeClass('d-none');
$("#reportWithWarnings-list").empty(); $("#reportWithWarnings-list").empty();
PICKUP.countReportWithWarning = 0; PICKUP.countReportWithWarning = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#reportWithWarnings-list");
$('#viewMenuReportWithWarnings').addClass('d-none');
return;
}
$('#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) { ...@@ -38,12 +38,6 @@ TEMPLATE.loadOperationSelect = function(elmentId) {
}); });
} }
/** Template load display menu */
TEMPLATE.loadDisplaymenu = function(elmentId) {
$(elmentId).load("display-menu.html", function() {
I18N.initi18n();
});
}
/** /**
* show confirm model * show confirm model
......
...@@ -23,10 +23,23 @@ $(document).ready(function () { ...@@ -23,10 +23,23 @@ $(document).ready(function () {
*/ */
TOP.init = function () { TOP.init = function () {
COMMON.showLoading(); COMMON.showLoading();
FOOTER.initFooter(); //app should get data after initFooter TOP.goToHomePage();
COMMON.closeLoading(); COMMON.closeLoading();
}; };
/** Direct home page setting */
TOP.goToHomePage = function (pageId) {
DashboardSetting.getSettingData(function (settings) {
if(settings.dashboardHome == 1)
{
COMMON.avwScreenMove("dashboard.html");
}
else
{
FOOTER.initFooter(); //app should get data after initFooter
}
});
}
/** /**
* Show page by arbitrary id * Show page by arbitrary id
* *
......
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