Commit c71677bd by NGUYEN HOANG SON

Merge branch 'feature/1.0_check_web_dev_50271' into feature/1.0_check_web_dev_50270

# Conflicts:
#	abvw/common/json/lang/lang-en.json
#	abvw/common/json/lang/lang-ja.json
#	abvw/common/json/lang/lang-ko.json
parents b7beffa1 1b2933f3
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="modal-body" id="msgModel"> <div class="modal-body" id="msgModel">
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="confirmYes">はい</button> <button type="button" class="btn btn-primary lang" lang="confirmYes"></button>
<button type="button" class="btn btn-tertiary lang" lang="confirmNo" data-dismiss="modal"></button> <button type="button" class="btn btn-tertiary lang" lang="confirmNo" data-dismiss="modal"></button>
</div> </div>
</div> </div>
......
...@@ -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("../img/icon_arrow_down.svg"); background-image: url("/abvw/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("../img/icon_arrow_right.svg"); background-image: url("/abvw/common/img/icon_arrow_right.svg");
background-size: contain; background-size: contain;
width: 17px; width: 17px;
height: 17px; height: 17px;
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"reportLevelReport":"Report", "reportLevelReport":"Report",
"reportLevelAnswer":"Answer", "reportLevelAnswer":"Answer",
"msgNotFound":"There is no applicable work.", "msgNotFound":"There is no applicable work.",
"confirmation":"confirmation", "confirmation":"Confirmation",
"confirmYes":"Yes", "confirmYes":"Yes",
"confirmNo":"No", "confirmNo":"No",
"messageListEmpty":"No Messages", "messageListEmpty":"No Messages",
...@@ -81,5 +81,9 @@ ...@@ -81,5 +81,9 @@
"buttonSend":"Send", "buttonSend":"Send",
"msgContentRequired":"Content is required", "msgContentRequired":"Content is required",
"msgOperationRequired":"Operation is required", "msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required" "msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select",
"selection":"Selection",
"templateSelection":"Template selection"
} }
\ No newline at end of file
...@@ -81,5 +81,8 @@ ...@@ -81,5 +81,8 @@
"buttonSend":"送信", "buttonSend":"送信",
"msgContentRequired":"Content is required", "msgContentRequired":"Content is required",
"msgOperationRequired":"Operation is required", "msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required" "msgSendTypeRequired":"Send type is required",
"operationSelection":"作業選択",
"selection":"選択",
"templateSelection":"テンプレート選択"
} }
\ No newline at end of file
...@@ -40,28 +40,28 @@ ...@@ -40,28 +40,28 @@
"msgAnonymousLoginErr":"로그인할 수 없습니다. (에러코드 : {0})", "msgAnonymousLoginErr":"로그인할 수 없습니다. (에러코드 : {0})",
"msgAnonymousLoginErr2":"로그인할 수 없습니다.", "msgAnonymousLoginErr2":"로그인할 수 없습니다.",
"dashboard":"Dashboard", "dashboard":"대시보드",
"dashboardSettings":"Dashboard Settings", "dashboardSettings":"대시보드 설정",
"pickup":"Pick up", "pickup":"픽업",
"communication":"Communication", "communication":"커뮤니케이션",
"workList":"Work list", "workList":"Work list",
"profile":"Profile", "profile":"Profile",
"account_setting":"Account setting", "account_setting":"Account setting",
"newRegistrationTitle":"New Registration", "newRegistrationTitle":"신규 보고",
"continousWorkTitle":"Continous Work", "continousWorkTitle":"공정 작업",
"processWorkTitle":"Process work", "processWorkTitle":"Process work",
"reportWarningTitle":"Report With Warning", "reportWarningTitle":"Report With Warning",
"workWithWarningsTitle":"Work with warnings", "workWithWarningsTitle":"경고를 포함한 보고",
"messageListTitle":"Message List", "messageListTitle":"메시지 일람",
"sendMessageTitle":"Send Message", "sendMessageTitle":"메시지 송신",
"distanceSupportTitle":"DistanceSupport", "distanceSupportTitle":"원격지원",
"chatTitle":"Chat", "chatTitle":"채팅",
"makeDashboardAsHome":"Make dashboard your home screen", "makeDashboardAsHome":"Make dashboard your home screen",
"btnKeep":"Keep", "btnKeep":"Keep",
"addNew":"Add New", "addNew":"Add New",
"display":" display", "display":" display",
"reportLevelReport":"Report", "reportLevelReport":"보고",
"reportLevelAnswer":"Answer", "reportLevelAnswer":"응답",
"msgNotFound":"There is no applicable work.", "msgNotFound":"There is no applicable work.",
"confirmation":"confirmation", "confirmation":"confirmation",
"confirmYes":"Yes", "confirmYes":"Yes",
...@@ -81,5 +81,8 @@ ...@@ -81,5 +81,8 @@
"buttonSend":"Send", "buttonSend":"Send",
"msgContentRequired":"Content is required", "msgContentRequired":"Content is required",
"msgOperationRequired":"Operation is required", "msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required" "msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select",
"selection":"Selection",
"templateSelection":"Template selection"
} }
\ No newline at end of file
...@@ -18,13 +18,12 @@ ...@@ -18,13 +18,12 @@
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script> <script type="text/javascript" src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script> <script type="text/javascript" src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/web/i18n.js?__UPDATEID__"></script> <script type="text/javascript" src="/abvw/common/js/web/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/newdash/app.js"></script>
<script type="text/javascript" src="../common/js/newdash/common.js"></script>
<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 type="text/javascript" src="../js/dashboardSetting/dashboard-setting.js"></script> <script type="text/javascript" src="../js/dashboardSetting/dashboard-setting.js"></script>
<script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/dashboard/dashboard.js"></script> <script type="text/javascript" src="../js/dashboard/dashboard.js"></script>
</head> </head>
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
<!-- title --> <!-- title -->
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<h1 class="fs-14 font-weight-bold pt-4 pb-3 mb-0 mr-auto lang" lang="dashboard"></h1> <h1 class="fs-14 font-weight-bold pt-4 pb-3 mb-0 mr-auto lang" lang="dashboard"></h1>
<a href="#" data-toggle="modal" data-target="#dashboard-setting-modal"> <a href="#" data-toggle="modal" data-target="#dashboard-setting-modal" >
<img src="../common/img/icon_dashboard_setting.svg" alt="ダッシュボード設定" class="p-1 w-40px"> <img src="../common/img/icon_dashboard_setting.svg" alt="ダッシュボード設定" class="p-1 w-40px">
</a> </a>
</div> </div>
...@@ -65,6 +64,9 @@ ...@@ -65,6 +64,9 @@
<!-- confirm --> <!-- confirm -->
<div id="includedConfirmModal"></div> <div id="includedConfirmModal"></div>
<script type="text/javascript" src="../common/js/newdash/app.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/newdash/common.js?__UPDATEID__"></script>
</body> </body>
</html> </html>
\ No newline at end of file
<!-- select template modal -->
<div class="modal fade" id="select-template-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header bg-dark10">
<h5 class="modal-title lang" lang="templateSelection"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<ul class="card-list select-card-list" id="notificationSelectList">
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="selection"></button>
<button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button>
</div>
</div>
</div>
</div>
\ No newline at end of file
<!-- task list modal -->
<div class="modal fade" id="task-list-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header bg-dark10">
<h5 class="modal-title lang" lang="operationSelection"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<ul class="card-list select-card-list" id="operationSelectList">
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="selection"></button>
<button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button>
</div>
</div>
</div>
</div>
\ No newline at end of file
...@@ -27,8 +27,7 @@ DASHBOARD.defaultDashboard = { ...@@ -27,8 +27,7 @@ DASHBOARD.defaultDashboard = {
pushMesage: 0, pushMesage: 0,
} }
DASHBOARD.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'topScreen/'; DASHBOARD.getDataApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'dashboard/';
DASHBOARD.getDataApiUrl = DashboardSetting.baseApiUrl + 'getAllData';
/** /**
* Call api get data * Call api get data
...@@ -115,16 +114,9 @@ DASHBOARD.init = function() { ...@@ -115,16 +114,9 @@ DASHBOARD.init = function() {
} }
/** load common data */ /** load common data */
DASHBOARD.loadCommon = function() { DASHBOARD.loadCommon = function() {
$("#includedHeader").load("../common/header.html" , function() { TEMPLATE.loadHearder("#includedHeader");
I18N.initi18n(); TEMPLATE.loadDashboardSetting("#includedDashboardSetting");
}); TEMPLATE.loadConfirmModal("#includedConfirmModal");
$("#includedDashboardSetting").load("dashboard-setting.html", function() {
DashboardSetting.init();
I18N.initi18n();
});
$("#includedConfirmModal").load("../common/confirm-modal.html", function() {
I18N.initi18n();
});
} }
/** Update pickup config from setting dashboard data */ /** Update pickup config from setting dashboard data */
...@@ -150,8 +142,15 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) { ...@@ -150,8 +142,15 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
item.count = dataDashboard['pushMesage']; item.count = dataDashboard['pushMesage'];
} }
} }
// else if (item.id == 'chat') { // if (item.id == 'chat') {
// item.enabled = CHK.isChat; // if(ClientData.serviceOpt_chat_function() == 'Y' )
// {
// item.enabled = true;
// }
// else
// {
// item.enabled = false;
// }
// } // }
}); });
} }
......
/**
* Operation Select js in operation-select.html
*
* @since 1.0 check web
*/
var NotificationSelect = {};
NotificationSelect.nameSelected="";
NotificationSelect.valueSelected="";
/**
* default operation select data JSON
*/
NotificationSelect.defaultNotificationSelectJson = [];
/**
* get operation select data from cms
* @param {function} callback
*/
NotificationSelect.getNotificationSelectData = function (callback) {
let param = {
sid: COMMON.getSid(),
};
const url = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageTemplate/';
COMMON.cmsAjax(url, param, false, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('NotificationSelect.getNotificationSelectData error');
if (callback) {
callback(NotificationSelect.defaultNotificationSelectJson);
}
});
};
/**
* handle click operation setting
*/
NotificationSelect.selectOperationClick = function () {
$('.select-card-list .card .select-label').on('click', function () {
$(this).closest('.select-card-list').find('.card').removeClass('selected');
$(this).closest('.card').addClass('selected');
NotificationSelect.nameSelected = $(this).text();
NotificationSelect.valueSelected = $(this).closest('.accordion').find('.card-body').text();
});
};
/**
* init data, action when screen onload
*/
NotificationSelect.init = function () {
NotificationSelect.getNotificationSelectData(function (data) {
NotificationSelect.createNotificationSelectList(data);
});
NotificationSelect.selectOperationClick();
};
/**
* Implement notification select html
* @returns
*/
NotificationSelect.createNotificationSelectList = function(data) {
$("#notificationSelectList").empty();
if (typeof data === 'undefined' || data.length < 1) return;
let classSelected = "selected";
for (let i = 0; i < data.length; i++) {
let divName = $("<div class='pl-5 py-3 h-100 w-100 align-self-center select-label'>" + data[i].name + "</div>");
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 + "'>"
+ "<div class='arrow-icon'></div>"
+ "</button></div>");
let ahrefName = $("<a href='#' class='d-flex text-decoration-none'></a>");
let divParentName = $("<div class='card mb-2 " + classSelected + "' id='heading" + i + "'></div>");
classSelected = "";
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 messageli = $("<li class='accordion' id='accordion" + i + "'></li>");
ahrefName.append(divName);
ahrefName.append(divIcon);
divParentName.append(ahrefName);
divValue.append(divBodyValue);
messageli.append(divParentName);
messageli.append(divValue);
$("#notificationSelectList").append(messageli);
}
}
/**
* Operation Select js in operation-select.html
*
* @since 1.0 check web
*/
var OperationSelect = {};
OperationSelect.operationIdSelected="";
OperationSelect.operationNameSelected="";
/**
* default operation select data JSON
*/
OperationSelect.defaultOperationSelectJson = [];
/**
* get operation select data from cms
* @param {function} callback
*/
OperationSelect.getOperationSelectData = function (callback) {
let param = {
sid: COMMON.getSid(),
};
const url = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'operationSelect/';
COMMON.cmsAjax(url, param, false, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('OperationSelect.getOperationSelectData error');
if (callback) {
callback(OperationSelect.defaultOperationSelectJson);
}
});
};
/**
* handle click operation setting
*/
OperationSelect.selectOperationClick = function () {
$('.select-card-list .card .select-label').on('click', function () {
$(this).closest('.select-card-list').find('.card').removeClass('selected');
$(this).closest('.card').addClass('selected');
OperationSelect.operationIdSelected = $(this).attr('data-key');
OperationSelect.operationNameSelected = $(this).attr('data-name');
});
};
/**
* init data, action when screen onload
*/
OperationSelect.init = function () {
OperationSelect.getOperationSelectData(function (data) {
OperationSelect.createOperationSelectList(data);
});
OperationSelect.selectOperationClick();
};
/**
* Implement operation select html
* @returns
*/
OperationSelect.createOperationSelectList = function(data) {
$("#operationSelectList").empty();
if (typeof data === 'undefined' || data.length < 1) return;
for (let i = 0; i < data.length; i++) {
let messageli = $("<li class='card mb-2' name = 'operationId_" + data[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 divText = $("<div class='fs-12 text-truncate d-block'>"+ data[i].operationName + "</div>");
ahrefRequiredFlg.append(divText);
messageli.append(ahrefRequiredFlg);
$("#operationSelectList").append(messageli);
}
$("#operationSelectList :first-child").addClass("selected");
}
...@@ -7,6 +7,7 @@ var PICKUP = {}; ...@@ -7,6 +7,7 @@ var PICKUP = {};
PICKUP.newReportList; PICKUP.newReportList;
PICKUP.continousWorkReport; PICKUP.continousWorkReport;
PICKUP.reportWithWarning; PICKUP.reportWithWarning;
PICKUP.pickupDefault = "newReport";
PICKUP.pickupActive = "newReport"; PICKUP.pickupActive = "newReport";
PICKUP.countNewReportList = 0; PICKUP.countNewReportList = 0;
...@@ -47,9 +48,9 @@ PICKUP.defaultPickupList = { ...@@ -47,9 +48,9 @@ PICKUP.defaultPickupList = {
} }
PICKUP.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pickup/'; PICKUP.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pickup/';
PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReportList'; PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReport';
PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'continuousWorkList'; PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'workingFlow';
PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'reportWithWarnings'; PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'warningWithReport';
/** /**
* Call get new report list api get data * Call get new report list api get data
...@@ -113,8 +114,8 @@ PICKUP.getReportWithWarningsListData = function (callback) { ...@@ -113,8 +114,8 @@ PICKUP.getReportWithWarningsListData = function (callback) {
*/ */
PICKUP.init = function() { PICKUP.init = function() {
console.log("PICKUP.init"); console.log("PICKUP.init");
TEMPLATE.loadHearder(); TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadConfirmModal(); TEMPLATE.loadConfirmModal("#includedConfirmModal");
PICKUP.initSettingActivePickup(); PICKUP.initSettingActivePickup();
PICKUP.settingPickup(); PICKUP.settingPickup();
} }
...@@ -148,6 +149,10 @@ PICKUP.settingPickup = function() { ...@@ -148,6 +149,10 @@ PICKUP.settingPickup = function() {
*/ */
PICKUP.initSettingActivePickup = function() { PICKUP.initSettingActivePickup = function() {
var urlParam = COMMON.getUrlParameter(); var urlParam = COMMON.getUrlParameter();
if(urlParam.pickupActive == undefined || urlParam.pickupActive == '' )
{
urlParam.pickupActive = PICKUP.pickupDefault;
}
PICKUP.pickupActive = urlParam.pickupActive; PICKUP.pickupActive = urlParam.pickupActive;
PICKUP.settingActivePickup(PICKUP.pickupActive); PICKUP.settingActivePickup(PICKUP.pickupActive);
} }
......
/** /**
* Header js * template js
* @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 TEMPLATE = {}; var TEMPLATE = {};
/** template load header */
/** load common data */ TEMPLATE.loadHearder = function(elmentId) {
TEMPLATE.loadCommon = function() { $(elmentId).load("../common/header.html" , function() {
$("#includedHeader").load("../common/header.html" , function() {
I18N.initi18n(); I18N.initi18n();
}); });
$("#includedDashboardSetting").load("dashboard-setting.html", function() { }
/** template load dashboard setting */
TEMPLATE.loadDashboardSetting = function(elmentId) {
$(elmentId).load("dashboard-setting.html", function() {
DashboardSetting.init(); DashboardSetting.init();
I18N.initi18n(); I18N.initi18n();
}); });
$("#includedConfirmModal").load("../common/confirm-modal.html", function() {
I18N.initi18n();
});
} }
TEMPLATE.loadHearder = function() { /** Template load confirm model */
$("#includedHeader").load("../common/header.html" , function() { TEMPLATE.loadConfirmModal = function(elmentId) {
$(elmentId).load("../common/confirm-modal.html", function() {
I18N.initi18n(); I18N.initi18n();
}); });
} }
/** Template load operation select */
TEMPLATE.loadDashboardSetting = function() { TEMPLATE.loadOperationSelect = function(elmentId) {
$("#includedDashboardSetting").load("dashboard-setting.html", function() { $(elmentId).load("operation-select.html", function() {
DashboardSetting.init(); OperationSelect.init();
I18N.initi18n(); I18N.initi18n();
}); });
} }
/**
* show confirm model
*/
TEMPLATE.showModalConfirm = function () {
$("#showConfirm").click(function(){
$("#confirm-modal").modal();
});
};
TEMPLATE.loadConfirmModal = function() { /** Template load notification content*/
$("#includedConfirmModal").load("../common/confirm-modal.html", function() { TEMPLATE.loadOperationSelect = function(elmentId) {
$(elmentId).load("notification-content.html", function() {
NotificationSelect.init();
I18N.initi18n(); I18N.initi18n();
}); });
} }
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