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 @@
<div class="modal-body" id="msgModel">
</div>
<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>
</div>
</div>
......
......@@ -11038,7 +11038,7 @@ ul.card-list > li:not(.selected):not(.not-found):hover{
}
.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-repeat: no-repeat;
width: 14px;
......@@ -20590,7 +20590,7 @@ button {
list-style: none;
}
.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;
width: 17px;
height: 17px;
......
......@@ -63,7 +63,7 @@
"reportLevelReport":"Report",
"reportLevelAnswer":"Answer",
"msgNotFound":"There is no applicable work.",
"confirmation":"confirmation",
"confirmation":"Confirmation",
"confirmYes":"Yes",
"confirmNo":"No",
"messageListEmpty":"No Messages",
......@@ -81,5 +81,9 @@
"buttonSend":"Send",
"msgContentRequired":"Content 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 @@
"buttonSend":"送信",
"msgContentRequired":"Content 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 @@
"msgAnonymousLoginErr":"로그인할 수 없습니다. (에러코드 : {0})",
"msgAnonymousLoginErr2":"로그인할 수 없습니다.",
"dashboard":"Dashboard",
"dashboardSettings":"Dashboard Settings",
"pickup":"Pick up",
"communication":"Communication",
"dashboard":"대시보드",
"dashboardSettings":"대시보드 설정",
"pickup":"픽업",
"communication":"커뮤니케이션",
"workList":"Work list",
"profile":"Profile",
"account_setting":"Account setting",
"newRegistrationTitle":"New Registration",
"continousWorkTitle":"Continous Work",
"newRegistrationTitle":"신규 보고",
"continousWorkTitle":"공정 작업",
"processWorkTitle":"Process work",
"reportWarningTitle":"Report With Warning",
"workWithWarningsTitle":"Work with warnings",
"messageListTitle":"Message List",
"sendMessageTitle":"Send Message",
"distanceSupportTitle":"DistanceSupport",
"chatTitle":"Chat",
"workWithWarningsTitle":"경고를 포함한 보고",
"messageListTitle":"메시지 일람",
"sendMessageTitle":"메시지 송신",
"distanceSupportTitle":"원격지원",
"chatTitle":"채팅",
"makeDashboardAsHome":"Make dashboard your home screen",
"btnKeep":"Keep",
"addNew":"Add New",
"display":" display",
"reportLevelReport":"Report",
"reportLevelAnswer":"Answer",
"reportLevelReport":"보고",
"reportLevelAnswer":"응답",
"msgNotFound":"There is no applicable work.",
"confirmation":"confirmation",
"confirmYes":"Yes",
......@@ -81,5 +81,8 @@
"buttonSend":"Send",
"msgContentRequired":"Content 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 @@
<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/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/common.js?__UPDATEID__"></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>
</head>
......@@ -39,7 +38,7 @@
<!-- title -->
<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>
<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">
</a>
</div>
......@@ -65,6 +64,9 @@
<!-- confirm -->
<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>
</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 = {
pushMesage: 0,
}
DASHBOARD.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'topScreen/';
DASHBOARD.getDataApiUrl = DashboardSetting.baseApiUrl + 'getAllData';
DASHBOARD.getDataApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'dashboard/';
/**
* Call api get data
......@@ -115,16 +114,9 @@ DASHBOARD.init = function() {
}
/** load common data */
DASHBOARD.loadCommon = function() {
$("#includedHeader").load("../common/header.html" , function() {
I18N.initi18n();
});
$("#includedDashboardSetting").load("dashboard-setting.html", function() {
DashboardSetting.init();
I18N.initi18n();
});
$("#includedConfirmModal").load("../common/confirm-modal.html", function() {
I18N.initi18n();
});
TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadDashboardSetting("#includedDashboardSetting");
TEMPLATE.loadConfirmModal("#includedConfirmModal");
}
/** Update pickup config from setting dashboard data */
......@@ -150,8 +142,15 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
item.count = dataDashboard['pushMesage'];
}
}
// else if (item.id == 'chat') {
// item.enabled = CHK.isChat;
// if (item.id == 'chat') {
// 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 = {};
PICKUP.newReportList;
PICKUP.continousWorkReport;
PICKUP.reportWithWarning;
PICKUP.pickupDefault = "newReport";
PICKUP.pickupActive = "newReport";
PICKUP.countNewReportList = 0;
......@@ -47,9 +48,9 @@ PICKUP.defaultPickupList = {
}
PICKUP.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pickup/';
PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReportList';
PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'continuousWorkList';
PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'reportWithWarnings';
PICKUP.getNewReportListApiUrl = PICKUP.baseApiUrl + 'newReport';
PICKUP.getContinuousWorkListApiUrl = PICKUP.baseApiUrl + 'workingFlow';
PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + 'warningWithReport';
/**
* Call get new report list api get data
......@@ -113,8 +114,8 @@ PICKUP.getReportWithWarningsListData = function (callback) {
*/
PICKUP.init = function() {
console.log("PICKUP.init");
TEMPLATE.loadHearder();
TEMPLATE.loadConfirmModal();
TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadConfirmModal("#includedConfirmModal");
PICKUP.initSettingActivePickup();
PICKUP.settingPickup();
}
......@@ -148,6 +149,10 @@ PICKUP.settingPickup = function() {
*/
PICKUP.initSettingActivePickup = function() {
var urlParam = COMMON.getUrlParameter();
if(urlParam.pickupActive == undefined || urlParam.pickupActive == '' )
{
urlParam.pickupActive = PICKUP.pickupDefault;
}
PICKUP.pickupActive = urlParam.pickupActive;
PICKUP.settingActivePickup(PICKUP.pickupActive);
}
......
/**
* Header js
* template js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var TEMPLATE = {};
/** load common data */
TEMPLATE.loadCommon = function() {
$("#includedHeader").load("../common/header.html" , function() {
/** template load header */
TEMPLATE.loadHearder = function(elmentId) {
$(elmentId).load("../common/header.html" , function() {
I18N.initi18n();
});
$("#includedDashboardSetting").load("dashboard-setting.html", function() {
}
/** template load dashboard setting */
TEMPLATE.loadDashboardSetting = function(elmentId) {
$(elmentId).load("dashboard-setting.html", function() {
DashboardSetting.init();
I18N.initi18n();
});
$("#includedConfirmModal").load("../common/confirm-modal.html", function() {
I18N.initi18n();
});
}
TEMPLATE.loadHearder = function() {
$("#includedHeader").load("../common/header.html" , function() {
/** Template load confirm model */
TEMPLATE.loadConfirmModal = function(elmentId) {
$(elmentId).load("../common/confirm-modal.html", function() {
I18N.initi18n();
});
}
TEMPLATE.loadDashboardSetting = function() {
$("#includedDashboardSetting").load("dashboard-setting.html", function() {
DashboardSetting.init();
/** Template load operation select */
TEMPLATE.loadOperationSelect = function(elmentId) {
$(elmentId).load("operation-select.html", function() {
OperationSelect.init();
I18N.initi18n();
});
}
/**
* show confirm model
*/
TEMPLATE.showModalConfirm = function () {
$("#showConfirm").click(function(){
$("#confirm-modal").modal();
});
};
TEMPLATE.loadConfirmModal = function() {
$("#includedConfirmModal").load("../common/confirm-modal.html", function() {
/** Template load notification content*/
TEMPLATE.loadOperationSelect = function(elmentId) {
$(elmentId).load("notification-content.html", function() {
NotificationSelect.init();
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