Commit 5310be93 by NGO THI HONG

Update direct home screen

parent 26fbd48e
......@@ -29,7 +29,8 @@
<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>
</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">
<span class="lang" style=" color: #6c757d;" lang="dspLogout"></span>
</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 @@
<script src="/abvw/common/js/constant.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/topPage/topPage.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboardSetting/dashboard-setting.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/app.js?__UPDATEID__" defer></script>
......
......@@ -2,7 +2,7 @@
<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">
<div class="fs-7 multi-lang" data-msg="buttonDashboard"></div>
</a>
......
......@@ -30,10 +30,14 @@
<script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pickup/pickup.js"></script>
<script type="text/javascript">
$(document).ready(function(){
PICKUP.init();
});
</script>
</head>
<body onload="PICKUP.init();">
<body >
<!-- header -->
<div id="includedHeader"></div>
<!-- pickup -->
......@@ -76,7 +80,14 @@
<nav aria-label="view" class="view-menu mt-2" id="viewMenuNewReport">
<div class="d-flex justify-content-between align-items-center">
<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>
</nav>
<!-- task list -->
......@@ -89,7 +100,14 @@
<nav aria-label="view" class="view-menu mt-2" id="viewMenuContinuousWork">
<div class="d-flex justify-content-between align-items-center">
<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>
</nav>
<!-- task list -->
......@@ -102,7 +120,14 @@
<nav aria-label="view" class="view-menu mt-2" id="viewMenuReportWithWarnings">
<div class="d-flex justify-content-between align-items-center">
<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>
</nav>
<!-- task list -->
......
......@@ -127,8 +127,8 @@ DASHBOARD.updateDataPickups = function(settings, dataDashboard) {
item.enabled = enabled;
}
item.count = 0;
if (dataDashboard[item.id]) {
item.count = dataDashboard[item.id];
if (dataDashboard.dashboard[item.id]) {
item.count = dataDashboard.dashboard[item.id];
}
});
}
......@@ -139,7 +139,7 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
if (item.id == 'messageList') {
item.count = 0;
if (dataDashboard['pushMesage']) {
item.count = dataDashboard['pushMesage'];
item.count = dataDashboard.dashboard['pushMesage'];
}
}
});
......
......@@ -48,9 +48,9 @@ PICKUP.defaultPickupList = {
}
PICKUP.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE ;
PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReport';
PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'workingFlow';
PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'warningWithReport';
PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReport/';
PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'workingFlow/';
PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'warningWithReport/';
/**
* Call get new report list api get data
......@@ -116,9 +116,6 @@ PICKUP.init = function() {
console.log("PICKUP.init");
TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadConfirmModal("#includedConfirmModal");
TEMPLATE.loadDisplaymenu("#includedNewReportMenuDisplay");
TEMPLATE.loadDisplaymenu("#includedContinuousWorkMenuDisplay");
TEMPLATE.loadDisplaymenu("#includedReportWithWarningsMenuDisplay");
PICKUP.initSettingActivePickup();
PICKUP.settingPickup();
......@@ -139,12 +136,12 @@ PICKUP.settingPickup = function() {
if(settings.continousWork)
{
$("#liTabContinousWork").removeClass('d-none');
//PICKUP.initContinuosWorkTab();
PICKUP.initContinuosWorkTab();
}
if(settings.reportWarning)
if(settings.warningReport)
{
$("#liTabReportWithWarning").removeClass('d-none');
//PICKUP.initReportWithWarningsTab();
PICKUP.initReportWithWarningsTab();
}
});
}
......@@ -230,7 +227,7 @@ PICKUP.showCountDisplayPickupItem = function(elementId, count) {
*/
PICKUP.initNewReportTab = function() {
PICKUP.getNewreportListData(function (json) {
PICKUP.createNewReportList(json.operationList);
PICKUP.createNewReportList(json.operationtList);
});
}
......@@ -240,7 +237,7 @@ PICKUP.initNewReportTab = function() {
*/
PICKUP.initContinuosWorkTab = function() {
PICKUP.getContinuousWorkListData(function (json) {
PICKUP.createContinousWorkList(json.operationList);
PICKUP.createContinousWorkList(json.operationtList);
});
}
......@@ -249,7 +246,7 @@ PICKUP.initNewReportTab = function() {
*/
PICKUP.initReportWithWarningsTab = function() {
PICKUP.getReportWithWarningsListData(function (json) {
PICKUP.createReportWithWarningList(json.operationList);
PICKUP.createReportWithWarningList(json.operationtList);
});
}
......@@ -272,16 +269,17 @@ PICKUP.sortNewReportList = function(operationList) {
* @returns
*/
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);
$('#viewMenuNewReport').removeClass('d-none');
$("#newReport-list").empty();
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');
let classIcon ;
for (let i = 0; i < operationList.length; i++) {
......@@ -393,16 +391,18 @@ PICKUP.sortContinousWorkList = function(operationList) {
* @returns
*/
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);
$('#viewMenuContinuousWork').removeClass('d-none');
$("#continousWork-list").empty();
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');
......@@ -603,16 +603,18 @@ PICKUP.initWarningReportWithContinuousReportType = function(report) {
* @returns
*/
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");
$('#viewMenuReportWithWarnings').addClass('d-none');
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');
const msgLevelReport = I18N.i18nText('reportLevelReport');
......
......@@ -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
......
......@@ -23,10 +23,23 @@ $(document).ready(function () {
*/
TOP.init = function () {
COMMON.showLoading();
FOOTER.initFooter(); //app should get data after initFooter
TOP.goToHomePage();
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
*
......
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