Commit ac475e82 by Kang Donghun

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

Feature/1.0 check web dev imai

See merge request !42
parents deb21e90 179667e2
......@@ -97,6 +97,7 @@
"templateSelection":"Template selection",
"logo":"logo",
"listDisplay":"List display",
"gridDisplay":"Grid display"
"gridDisplay":"Grid display",
"reportForm": "Report",
"periodicInspectionPeriod": "Periodic Inspection Period"
}
\ No newline at end of file
......@@ -95,5 +95,7 @@
"templateSelection":"テンプレート選択",
"logo":"ロゴ",
"listDisplay":"リスト表示",
"gridDisplay":"グリッド表示"
"gridDisplay":"グリッド表示",
"reportForm": "報告",
"periodicInspectionPeriod": "定期点検期間"
}
\ No newline at end of file
......@@ -94,5 +94,7 @@
"templateSelection":"Template selection",
"logo":"logo",
"listDisplay":"list display",
"gridDisplay":"Grid display"
"gridDisplay":"Grid display",
"reportForm": "보고서",
"periodicInspectionPeriod": "정기점검기간"
}
\ No newline at end of file
......@@ -16,8 +16,6 @@
<script src="../common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script src="../common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<!-- <script src="../common/js/web/common.js?__UPDATEID__"></script>
<script src="../common/js/web/avweb.js?__UPDATEID__"></script> -->
<script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script>
<script src="../js/operationList/operationList.js?__UPDATEID__"></script>
......@@ -26,6 +24,7 @@
<script src="../common/js/header.js?__UPDATEID__"></script>
<script src="../js/topPage/topPage.js?__UPDATEID__"></script>
<script src="../common/js/app.js?__UPDATEID__" defer></script>
<script src="../js/reportForm/reportForm.js?__UPDATEID__" defer></script>
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
......
<!DOCTYPE html>
<html lang="ja-JP">
<head>
<meta charset="utf-8">
<title class="lang" lang="reportForm"></title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- main css -->
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/app.css">
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/header.css">
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/style.css">
<!-- vender css -->
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/fontawesome_relative_path.css">
<script type="text/javascript" src="../common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/web/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/constant.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script>
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
</head>
<body onload="RF.init();">
<!-- header -->
<div id="includedHeader"></div>
<!-- report list -->
<main>
<div class="container-wrap">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="task-list.html" class="text-decoration-none text-underline">作業一覧</a></li>
<li class="breadcrumb-item active" aria-current="page"><span>報告一覧</span></li>
<li class="breadcrumb-item active" aria-current="page"><span>報告</span></li>
</ol>
</nav>
<!-- title -->
<div class="d-flex align-items-center">
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 mr-auto" lang="reportForm"></h1>
<div style="display: none;">
<div><span style="font-size:18px;" lang="periodicInspectionPeriod"></span></div>
<div><span id="inspectDate"></span></div>
</div>
<div class="quickReportBtn" id="quickReportBtn" onclick="submitForm();">
<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdfPrint">
</div>
</div>
</div>
</main>
<div class="mb-5" id="report-form"></div>
<!-- confirm -->
<div id="includedConfirmModal"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<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
......@@ -121,6 +121,9 @@ DASHBOARD.initHtmlItem = function (item) {
/** Initialization dashboard screen */
DASHBOARD.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD;
DASHBOARD.loadCommon();
DashboardSetting.getSettingData(function (settings) {
......
/**
* Dashboard Setting js in dashboard.html
*
* @since 1.0 check web
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var DashboardSetting = {};
DashboardSetting.changeSettingCallback = function() {};
DashboardSetting.changeSettingCallback = function () {};
/**
* Html element array, map with json key from setting data API
......@@ -27,33 +27,33 @@ DashboardSetting.defaultSetting = {
continousWork: 1,
warningReport: 1,
dashboardHome: 0,
}
};
/** dummy setting json reponse */
DashboardSetting.dummySettingJson = {
dashboardSettingList: [
{
"id": 1,
"settingName": "New Report",
"settingValue": 1
id: 1,
settingName: 'New Report',
settingValue: 1,
},
{
"id": 2,
"settingName": "Continous Work",
"settingValue": 1
id: 2,
settingName: 'Continous Work',
settingValue: 1,
},
{
"id": 3,
"settingName": "Warning Report",
"settingValue": 1
id: 3,
settingName: 'Warning Report',
settingValue: 1,
},
{
"id": 4,
"settingName": "Dashboard Home",
"settingValue": 0
}
id: 4,
settingName: 'Dashboard Home',
settingValue: 0,
},
],
}
};
/**
* get setting data from cms
......@@ -64,34 +64,40 @@ DashboardSetting.getSettingData = function (callback) {
sid: COMMON.getSid(),
};
const url = DashboardSetting.baseApiUrl;
COMMON.cmsAjax(url, param, false, function (json) {
let settings = {};
//map id with key when save setting
const mapKeys = {
1: 'newReport',
2: 'continousWork',
3: 'warningReport',
4: 'dashboardHome'
};
if (json && json.dashboardSettingList) {
for (const item of json.dashboardSettingList) {
if (mapKeys.hasOwnProperty(item.id)) {
const settingKey = mapKeys[item.id];
settings[settingKey] = item.settingValue;
COMMON.cmsAjax(
url,
param,
false,
function (json) {
let settings = {};
//map id with key when save setting
const mapKeys = {
1: 'newReport',
2: 'continousWork',
3: 'warningReport',
4: 'dashboardHome',
};
if (json && json.dashboardSettingList) {
for (const item of json.dashboardSettingList) {
if (mapKeys.hasOwnProperty(item.id)) {
const settingKey = mapKeys[item.id];
settings[settingKey] = item.settingValue;
}
}
}
}
if (callback) {
callback(settings);
}
}, function() {
console.log('DashboardSetting.getSettingData error');
});
if (callback) {
callback(settings);
}
},
function () {
console.log('DashboardSetting.getSettingData error');
},
);
};
/**
* apply settings to screen
* @param {JSON} settings
* @param {JSON} settings
*/
DashboardSetting.applySettings = function (settings) {
for (const key in settings) {
......@@ -123,15 +129,21 @@ DashboardSetting.saveSetting = function () {
param[key] = element.enabled ? 1 : 0;
}
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.SAVE_DASHBOARD_SETTING;
COMMON.cmsAjax(url, param, false, function (json) {
DashboardSetting.closeModal();
if (DashboardSetting.changeSettingCallback && typeof DashboardSetting.changeSettingCallback === 'function') {
DashboardSetting.changeSettingCallback();
}
}, function() {
console.log('DashboardSetting.saveSetting error');
DashboardSetting.closeModal();
});
COMMON.cmsAjax(
url,
param,
false,
function (json) {
DashboardSetting.closeModal();
if (DashboardSetting.changeSettingCallback && typeof DashboardSetting.changeSettingCallback === 'function') {
DashboardSetting.changeSettingCallback();
}
},
function () {
console.log('DashboardSetting.saveSetting error');
DashboardSetting.closeModal();
},
);
};
/**
......
/**
* Operation Select js in operationSelect.html
*
* @since 1.0 check web
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var NotificationSelect = {};
NotificationSelect.nameSelected="";
NotificationSelect.valueSelected="";
NotificationSelect.nameSelected = '';
NotificationSelect.valueSelected = '';
/**
* default operation select data JSON
*/
......@@ -14,23 +14,29 @@ NotificationSelect.defaultNotificationSelectJson = [];
/**
* get operation select data from cms
* @param {function} callback
* @param {function} callback
*/
NotificationSelect.getNotificationSelectData = function (callback) {
let param = {
sid: COMMON.getSid(),
};
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PUSH_MESSAGE_TEMPLATE;
COMMON.cmsAjax(url, param, false, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('NotificationSelect.getNotificationSelectData error');
if (callback) {
callback(NotificationSelect.defaultNotificationSelectJson);
}
});
COMMON.cmsAjax(
url,
param,
false,
function (json) {
if (callback) {
callback(json);
}
},
function () {
console.log('NotificationSelect.getNotificationSelectData error');
if (callback) {
callback(NotificationSelect.defaultNotificationSelectJson);
}
},
);
};
/**
......@@ -48,7 +54,7 @@ NotificationSelect.selectOperationClick = function () {
/**
* init data, action when screen onload
*/
NotificationSelect.init = function (selectedCallback) {
NotificationSelect.init = function (selectedCallback) {
NotificationSelect.getNotificationSelectData(function (data) {
if (typeof data === 'undefined' || data == null) return;
NotificationSelect.createNotificationSelectList(data.pushMessageTemplate);
......@@ -59,57 +65,59 @@ NotificationSelect.selectOperationClick = function () {
/**
* Implement notification select html
* @returns
* @returns
*/
NotificationSelect.createNotificationSelectList = function(pushMessageTemplate) {
$("#notificationSelectList").empty();
NotificationSelect.createNotificationSelectList = function (pushMessageTemplate) {
$('#notificationSelectList').empty();
if (typeof pushMessageTemplate === 'undefined' || pushMessageTemplate.length < 1) return;
let classSelected = "selected";
let classSelected = 'selected';
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'>" + pushMessageTemplate[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 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'>" +
"<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 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'>" + pushMessageTemplate[i].value + "</div>");
let divValue = $("<div id='collapse" + i + "' class='collapse' aria-labelledby='heading" + i + "' data-parent='#accordion" + i + "'></div>");
let divBodyValue = $("<div class='card-body'>" + pushMessageTemplate[i].value + '</div>');
let messageli = $("<li class='accordion' id='accordion" + i + "'></li>");
ahrefName.append(divName);
ahrefName.append(divIcon);
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);
if(i == 0)
{
messageli.append(divParentName);
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.onClickTempalte = function () {
NotificationSelect.chooseTemplate();
};
/**
* Get operation select and call back function in main page
*/
NotificationSelect.chooseTemplate = function () {
NotificationSelect.chooseTemplate = function () {
let param = {};
param.nameSelected = NotificationSelect.nameSelected;
param.valueSelected = NotificationSelect.valueSelected;
......@@ -122,6 +130,6 @@ NotificationSelect.selectOperationClick = function () {
/**
* close setting dialog
*/
NotificationSelect.closeModal = function () {
NotificationSelect.closeModal = function () {
$('#select-template-modal .close').click();
};
\ No newline at end of file
};
......@@ -507,8 +507,13 @@ OL.sendOperation = function (operationId, operationType, reportType, enableAddRe
//save operation logs. needed for sorting
OL.saveOperationReadingLog(operationId, operationType, reportType);
//Transition to the report form or operation list screen
sessionStorage.OL_operationId = operationId;
COMMON.avwScreenMove("reportList.html");
if (enableAddReport == '1' || reportType == CONSTANT.REPORT_TYPE.ROUTINE) {
sessionStorage.OL_operationId = operationId;
COMMON.avwScreenMove('reportList.html');
} else {
const url = 'reportForm.html?operationId=' + operationId;
COMMON.avwScreenMove(url);
}
};
/**
......@@ -542,6 +547,6 @@ OL.createUrlOfOperation = function (enableAddReport, reportType) {
if (reportType == CONSTANT.REPORT_TYPE.ROUTINE || enableAddReport == '1') {
return baseUrl + CONSTANT.URL.CMS.HTML.TASK_REPORT_LIST;
} else {
return baseUrl + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM + '/' + CONSTANT.REPLY_NO.REPORT;
return baseUrl + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
}
};
/**
* Operation Select js in operationSelect.html
*
* @since 1.0 check web
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var OperationSelect = {};
OperationSelect.changeSelectCallback = function() {};
OperationSelect.changeSelectCallback = function () {};
OperationSelect.operationIdSelected="";
OperationSelect.operationNameSelected="";
OperationSelect.operationIdSelected = '';
OperationSelect.operationNameSelected = '';
/**
* default operation select data JSON
......@@ -16,23 +16,29 @@ OperationSelect.defaultOperationSelectJson = [];
/**
* get operation select data from cms
* @param {function} callback
* @param {function} callback
*/
OperationSelect.getOperationSelectData = function (callback) {
let param = {
sid: COMMON.getSid(),
};
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.OPERATION_SELECT;
COMMON.cmsAjax(url, param, false, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('OperationSelect.getOperationSelectData error');
if (callback) {
callback(OperationSelect.defaultOperationSelectJson);
}
});
COMMON.cmsAjax(
url,
param,
false,
function (json) {
if (callback) {
callback(json);
}
},
function () {
console.log('OperationSelect.getOperationSelectData error');
if (callback) {
callback(OperationSelect.defaultOperationSelectJson);
}
},
);
};
/**
......@@ -61,50 +67,49 @@ OperationSelect.init = function (selectedCallback) {
/**
* Implement operation select html
* @returns
* @returns
*/
OperationSelect.createOperationSelectList = function(operationList) {
$("#operationSelectList").empty();
OperationSelect.createOperationSelectList = function (operationList) {
$('#operationSelectList').empty();
if (typeof operationList === 'undefined' || operationList.length < 1) return;
for (let i = 0; i < operationList.length; i++) {
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='" + operationList[i].operationId + "' data-name='" + operationList[i].operationName + "' ></a>");
let divText = $("<div class='fs-12 text-truncate d-block'>"+ operationList[i].operationName + "</div>");
ahrefRequiredFlg.append(divText);
messageli.append(ahrefRequiredFlg);
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='" + operationList[i].operationId + "' data-name='" + operationList[i].operationName + "' ></a>",
);
let divText = $("<div class='fs-12 text-truncate d-block'>" + operationList[i].operationName + '</div>');
$("#operationSelectList").append(messageli);
}
$("#operationSelectList :first-child").addClass("selected");
}
ahrefRequiredFlg.append(divText);
messageli.append(ahrefRequiredFlg);
$('#operationSelectList').append(messageli);
}
$('#operationSelectList :first-child').addClass('selected');
};
/**
* handle click event of select button
*/
OperationSelect.onClickSelect = function () {
OperationSelect.onClickSelect = function () {
OperationSelect.chooseOperationSelect();
};
/**
* Get operation select and call back function in main page
*/
OperationSelect.chooseOperationSelect = function () {
OperationSelect.chooseOperationSelect = function () {
let param = {};
param.operationIdSelected = OperationSelect.operationIdSelected;
param.operationNameSelected = OperationSelect.operationNameSelected;
OperationSelect.closeModal();
if (OperationSelect.changeSelectCallback && typeof OperationSelect.changeSelectCallback === 'function') {
OperationSelect.changeSelectCallback(param.operationIdSelected,param.operationNameSelected );
OperationSelect.changeSelectCallback(param.operationIdSelected, param.operationNameSelected);
}
};
/**
* close setting dialog
*/
OperationSelect.closeModal = function () {
OperationSelect.closeModal = function () {
$('#task-list-modal .close').click();
};
\ No newline at end of file
};
// PDF PRINT function js
/**
* PDF PRINT function js
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
**/
var PP = {};
PP.init = function() {
console.log("PP.init");
PP.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
console.log('PP.init');
PP.loadCommon();
PP.initPdfList();
};
PP.loadCommon = function() {
$("#includedHeader").load("../html/common/header.html" , function() {
PP.loadCommon = function () {
$('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n();
HEADER.init();
});
$("#includedConfirmModal").load("../html/common/confirmModal.html", function() {
});
$('#includedConfirmModal').load('../html/common/confirmModal.html', function () {
I18N.initi18n();
});
}
});
};
PP.initPdfList = function() {
PP.initPdfList = function () {
if (sessionStorage.OL_operationId) {
let params = {};
params.sid = COMMON.getSid();
params.operationId = sessionStorage.OL_operationId;
params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST;
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.QUICK_REPORT_PRINT;
$("#pdfPrint").load(url, params);
$('#pdfPrint').load(url, params);
} else {
COMMON.displayAlert("error");
COMMON.avwScreenMove("reportList.html");
COMMON.displayAlert('error');
COMMON.avwScreenMove('reportList.html');
}
}
\ No newline at end of file
};
/**
* js for pushing detailed messages
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var PushMessageDetail = {};
PushMessageDetail.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PUSH_MESSAGE_DETAIL;
......@@ -7,18 +12,20 @@ PushMessageDetail.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Clie
*/
PushMessageDetail.dummyMessageDetailJson = {
pushMessageId: 1,
pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。",
pushSendDate: "2022/07/06 14:14",
operationName: "絞り検索",
pushSendLoginId: "agentec"
}
pushMessage: '内容が入ります。内容が入ります。内容が入ります。内容が入ります。',
pushSendDate: '2022/07/06 14:14',
operationName: '絞り検索',
pushSendLoginId: 'agentec',
};
/**
* init when html loaded
*/
PushMessageDetail.init = function() {
PushMessageDetail.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
//load common html
TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadHearder('#includedHeader');
const navs = [
{
titleLang: 'dashboard',
......@@ -32,44 +39,50 @@ PushMessageDetail.init = function() {
titleLang: 'messageDetail',
},
];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageDetail", navs, null);
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageDetail', navs, null);
//request message detail data
let urlParam = COMMON.getUrlParameter();
if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') {
return;
}
PushMessageDetail.getMessageDetail(urlParam.pushMessageId, function(message) {
return;
}
PushMessageDetail.getMessageDetail(urlParam.pushMessageId, function (message) {
PushMessageDetail.showMessage(message);
});
}
};
/**
* request message data
* @param {string} pushMessageId
* @param {object} callback
* @param {string} pushMessageId
* @param {object} callback
*/
PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
PushMessageDetail.getMessageDetail = function (pushMessageId, callback) {
let param = {
sid: COMMON.getSid(),
pushMessageId: pushMessageId
pushMessageId: pushMessageId,
};
const url = PushMessageDetail.baseApiUrl;
COMMON.cmsAjax(url, param, true, function (json) {
if (callback && json && json.pushMessage) {
callback(json.pushMessage);
}
}, function() {
console.log('PushMessageDetail.getMessageDetail error');
});
}
COMMON.cmsAjax(
url,
param,
true,
function (json) {
if (callback && json && json.pushMessage) {
callback(json.pushMessage);
}
},
function () {
console.log('PushMessageDetail.getMessageDetail error');
},
);
};
/**
* Show message data
* @param {object} message
* @param {object} message
*/
PushMessageDetail.showMessage = function(message) {
PushMessageDetail.showMessage = function (message) {
$('#content').text(message.pushMessage);
$('#sendDate').text(message.pushSendDate);
$('#operationName').text(message.operationName);
$('#sender').text(message.pushSendLoginId);
}
};
......@@ -8,8 +8,10 @@ PushMessageList.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Client
/**
* Init when html onload
*/
PushMessageList.init = function() {
TEMPLATE.loadHearder("#includedHeader");
PushMessageList.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
TEMPLATE.loadHearder('#includedHeader');
const navs = [
{
titleLang: 'dashboard',
......@@ -19,44 +21,50 @@ PushMessageList.init = function() {
titleLang: 'messageListTitle',
},
];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageListTitle", navs, null);
PushMessageList.getMessageList(function(messageList) {
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageListTitle', navs, null);
PushMessageList.getMessageList(function (messageList) {
PushMessageList.generateMessageListHtml(messageList.pushMessageList);
});
}
};
/**
* get Message List from CMS
* @param {function} callback
* @param {function} callback
*/
PushMessageList.getMessageList = function (callback) {
let param = {
sid: COMMON.getSid(),
};
const url = PushMessageList.baseApiUrl;
COMMON.cmsAjax(url, param, true, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('PushMessageList.getMessageList error');
});
COMMON.cmsAjax(
url,
param,
true,
function (json) {
if (callback) {
callback(json);
}
},
function () {
console.log('PushMessageList.getMessageList error');
},
);
};
/**
* handle click message event
* @param {string} pushMessageId
* @param {string} pushMessageId
*/
PushMessageList.clickMessage = function(pushMessageId) {
COMMON.goUrlWithCurrentParams('pushMessageDetail.html', {pushMessageId: pushMessageId});
}
PushMessageList.clickMessage = function (pushMessageId) {
COMMON.goUrlWithCurrentParams('pushMessageDetail.html', { pushMessageId: pushMessageId });
};
/**
* generate message list html
* @param {array} messageList
* @returns
* @param {array} messageList
* @returns
*/
PushMessageList.generateMessageListHtml = function(messageList) {
PushMessageList.generateMessageListHtml = function (messageList) {
if (typeof messageList === 'undefined' || messageList.length < 1) {
//show not found
$('#messageList .not-found').removeClass('d-none');
......@@ -69,42 +77,45 @@ PushMessageList.generateMessageListHtml = function(messageList) {
var mTitle = message.pushMessage;
var mDate = message.pushSendDate;
var mSubtitle = message.operationName;
var messageLi = $('<li class="card mb-2" id="pushMessageId_' + messageId + '"/>');
var messageLi = $('<li class="card mb-2" id="pushMessageId_' + messageId + '"/>');
if (message.readingFlg) {
messageLi.addClass('read');
} else {
messageLi.addClass('unread');
}
var messageA = $('<a class="d-block px-3 py-2 text-decoration-none text-dark"/>');
messageA.attr('href', "javascript:PushMessageList.clickMessage('" + messageId +"');");
messageA.attr('href', "javascript:PushMessageList.clickMessage('" + messageId + "');");
var titleDiv = $('<div class="fs-12 text-truncate">' + mTitle + '</div>');
var subTitleMainDiv = $('<div class="d-flex justify-content-between align-items-center"></div>');
var subTitleDiv = $('<div class="fs-10 text-truncate">' + mSubtitle + '</div>');
var subTitleDiv = $('<div class="fs-10 text-truncate">' + mSubtitle + '</div>');
var dateDiv = $('<div class="fs-8 text-secondary text-nowrap">' + mDate + '</div>');
subTitleMainDiv.append(subTitleDiv);
subTitleMainDiv.append(dateDiv);
messageA.append(titleDiv);
messageA.append(subTitleMainDiv);
messageLi.append(messageA);
$('#messageList').append(messageLi);
}
$('#messageList').append(messageLi);
}
};
/**
* dummy message list JSON for test
*/
PushMessageList.dummyMessageListJson = {
pushMessageList: [{
pushMessageId: 1,
pushMessage: 'メッセージ内容が入ります。',
pushSendDate: '2022/07/06 14:14',
operationName: '作業名が入ります。',
readingFlg: 0,
}, {
pushMessageId: 2,
pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。',
pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。',
readingFlg: 1,
}]
pushMessageList: [
{
pushMessageId: 1,
pushMessage: 'メッセージ内容が入ります。',
pushSendDate: '2022/07/06 14:14',
operationName: '作業名が入ります。',
readingFlg: 0,
},
{
pushMessageId: 2,
pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。',
pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。',
readingFlg: 1,
},
],
};
/**
* ReportForm function js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var RF = {};
RF.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
RF.loadCommon();
RF.initFormView();
};
RF.loadCommon = function () {
$('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n();
HEADER.init();
});
$('#includedConfirmModal').load('../html/common/confirm-modal.html', function () {
I18N.initi18n();
});
};
RF.initFormView = function () {
const urlParameterList = COMMON.getUrlParameter();
const operationId = urlParameterList['operationId'];
if (operationId) {
let params = {};
const taskKey = urlParameterList['taskKey'];
const replyNo = urlParameterList['replyNo'];
const processKey = urlParameterList['processKey'];
const phaseNo = urlParameterList['phaseNo'];
params.sid = COMMON.getSid();
params.operationId = operationId;
if (taskKey) params.taskKey = taskKey;
if (replyNo) params.replyNo = replyNo;
if (processKey) params.processKey = processKey;
if (phaseNo) params.phaseNo = phaseNo;
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
$('#report-form').load(url, params, function () {
initPageLoad();
});
} else {
COMMON.avwScreenMove('index.html');
}
};
// ReportList function js
/**
* ReportList function js
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
**/
var RL = {};
RL.init = function() {
console.log("ReportList init start");
// COMMON.checkAuth(true);
RL.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
console.log('ReportList init start');
RL.loadCommon();
RL.initTaskReportList();
};
RL.loadCommon = function() {
$("#includedHeader").load("../html/common/header.html" , function() {
RL.loadCommon = function () {
$('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n();
HEADER.init();
});
$("#includedConfirmModal").load("../html/common/confirmModal.html", function() {
});
$('#includedConfirmModal').load('../html/common/confirmModal.html', function () {
I18N.initi18n();
});
}
});
};
RL.initTaskReportList = function() {
RL.initTaskReportList = function () {
if (sessionStorage.OL_operationId) {
let params = {};
params.sid = COMMON.getSid();
params.operationId = sessionStorage.OL_operationId;
params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST;
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.TASK_REPORT_LIST;
$("#reportList").load(url, params);
$('#reportList').load(url, params);
} else {
COMMON.displayAlert("error");
COMMON.avwScreenMove("index.html");
COMMON.displayAlert('error');
COMMON.avwScreenMove('index.html');
}
}
RL.goPdfPrint = function() {
COMMON.avwScreenMove("pdfPrint.html");
}
};
RL.goPdfPrint = function () {
COMMON.avwScreenMove('pdfPrint.html');
};
/**
* Send Message js in sendMessage.html
*
* @since 1.0 check web
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var SendMessage = {};
......@@ -12,49 +12,49 @@ SendMessage.contentMaxLength = 207;
* Get input content
* @returns string
*/
SendMessage.getCurrentMessageContent = function() {
SendMessage.getCurrentMessageContent = function () {
return $('#messageContent').val();
}
};
/**
* Get operation id selected
* @returns string
*/
SendMessage.getCurrentOperationId = function() {
SendMessage.getCurrentOperationId = function () {
return $('#operationSelected').attr('data-operation-id');
}
};
/**
* Get send type selected
* @returns string
*/
SendMessage.getCurrentSendType = function() {
SendMessage.getCurrentSendType = function () {
return $('input[name="sendType"]:checked').val();
}
};
/**
* Check data required when send message request to cms
* @returns boolean
*/
SendMessage.checkValidation = function() {
SendMessage.checkValidation = function () {
const message = SendMessage.getCurrentMessageContent();
if (!ValidationUtil.CheckRequiredForText(message)) {
alert(I18N.i18nText('msgContentRequired'));
return false;
}
return false;
}
if (!ValidationUtil.CheckMaxLengthForByte(message, SendMessage.contentMaxLength)) {
alert(COMMON.format(I18N.i18nText('msgContentInvalidLength'), SendMessage.contentMaxLength));
return false;
return false;
}
const operationId = SendMessage.getCurrentOperationId();
if (!ValidationUtil.IsNumber(operationId)) {
alert(I18N.i18nText('msgOperationRequired'));
return false;
return false;
}
const sendType = SendMessage.getCurrentSendType();
if (!ValidationUtil.IsNumber(sendType)) {
alert(I18N.i18nText('msgSendTypeRequired'));
return false;
return false;
}
return true;
};
......@@ -62,7 +62,7 @@ SendMessage.checkValidation = function() {
/**
* handle click event of send button
*/
SendMessage.onClickSend = function() {
SendMessage.onClickSend = function () {
if (!SendMessage.checkValidation()) {
return;
}
......@@ -74,39 +74,44 @@ SendMessage.onClickSend = function() {
/**
* post message data to cms
* @param {string} message
* @param {long} operationId
* @param {string} message
* @param {long} operationId
* @param {int} sendType - 0: Group, 1: All
*/
SendMessage.postMessage = function(message, operationId, sendType) {
SendMessage.postMessage = function (message, operationId, sendType) {
let param = {
sid: COMMON.getSid(),
message: message,
operationId: operationId,
sendType: sendType
sendType: sendType,
};
COMMON.cmsAjax(SendMessage.baseApiUrl, param, false, function (json) {
}, function() {
console.log('SendMessage.postMessage error');
});
COMMON.cmsAjax(
SendMessage.baseApiUrl,
param,
false,
function (json) {},
function () {
console.log('SendMessage.postMessage error');
},
);
};
SendMessage.operationSelectedCallback = function(operationId, operationName) {
SendMessage.operationSelectedCallback = function (operationId, operationName) {
$('#operationSelected').attr('data-operation-id', operationId);
$('#operationSelected').text(operationName);
}
};
SendMessage.templateSelectedCallback = function(template) {
SendMessage.templateSelectedCallback = function (template) {
$('#messageContent').val(template);
}
};
/**
* init data, action when screen onload
*/
SendMessage.init = function () {
TEMPLATE.loadHearder("#includedHeader");
//Check if user is logged in
COMMON.checkAuth(false);
TEMPLATE.loadHearder('#includedHeader');
const navs = [
{
titleLang: 'dashboard',
......@@ -116,7 +121,7 @@ SendMessage.init = function () {
titleLang: 'sendMessageTitle',
},
];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "sendMessageTitle", navs, null);
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'sendMessageTitle', navs, null);
TEMPLATE.loadOperationSelect('#includeOperationSelect', SendMessage.operationSelectedCallback);
TEMPLATE.loadNotificationSelect('#includeTemplateModal', SendMessage.templateSelectedCallback);
$('#messageContent').attr('maxlength', SendMessage.contentMaxLength);
......@@ -124,4 +129,4 @@ SendMessage.init = function () {
I18N.initi18n();
$("label[for='sendTypeGroup']").append(I18N.i18nText('labelSendTypeGroup'));
$("label[for='sendTypeAll']").append(I18N.i18nText('labelSendTypeAll'));
};
\ No newline at end of file
};
/// Account Settings function js
/**
* Account Settings function js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
**/
var SETTINGS = {};
// Init function of page
$(document).ready(function () {
//Check if user is logged in
COMMON.checkAuth(false);
SETTINGS.initScreen();
$("#dspPwdUpd1").click(SETTINGS.dspPwdUpd1_Click);
$('#dspPwdUpd1').click(SETTINGS.dspPwdUpd1_Click);
});
// Process changing password
SETTINGS.dspPwdUpd1_Click = function(e) {
SETTINGS.dspPwdUpd1_Click = function (e) {
e.preventDefault();
var isOK = true;
var msgError = $('#main-error-message');
var msgError = $('#main-error-message');
// Check validation
if (!ValidationUtil.CheckRequiredForText(SETTINGS.getCurrentPassword())) {
isOK = false;
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdCurr')).toString());
msgError.show();
}
else {
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdCurr')).toString());
msgError.show();
} else {
if (!ValidationUtil.CheckRequiredForText(SETTINGS.getNewPassword())) {
isOK = false;
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNew')).toString());
msgError.show();
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNew')).toString());
msgError.show();
} else if (!ValidationUtil.CheckRequiredForText(SETTINGS.getNewPasswordRe())) {
isOK = false;
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNewRe')).toString());
......@@ -38,7 +41,6 @@ SETTINGS.dspPwdUpd1_Click = function(e) {
}
}
if (isOK) {
// Check min length
if (!ValidationUtil.CheckMinLengthForByte(SETTINGS.getNewPassword(), 6)) {
isOK = false;
......@@ -53,58 +55,53 @@ SETTINGS.dspPwdUpd1_Click = function(e) {
}
// Check at least 3 consecutive characters
if (ValidationUtil.HasSeqChar(SETTINGS.getNewPassword(), 3)) {
isOK = false;
isOK = false;
msgError.html(I18N.i18nText('msgHasSeqChar'));
msgError.show();
}
// Check 4 same characters in before password
if (ValidationUtil.ContainSameSeqChar(SETTINGS.getCurrentPassword(), SETTINGS.getNewPassword(), 4)) {
isOK = false;
isOK = false;
msgError.html(I18N.i18nText('msgContainSameSeqChar'));
msgError.show();
}
}
// Do changing password
if (isOK) {
var params = {
sid: ClientData.userInfo_sid(),
loginId: ClientData.userInfo_loginId_session(),
password: SETTINGS.getCurrentPassword(),
newPassword: SETTINGS.getNewPassword(),
language: I18N.getCurrentLanguage(),
appId: 4
appId: 4,
};
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PASSWORD_CHANGE;
COMMON.cmsAjax(url, params, false,
SETTINGS.avwCmsApi_passwordChange_success,
SETTINGS.avwCmsApi_passwordChange_fail);
}
else {
COMMON.cmsAjax(url, params, false, SETTINGS.avwCmsApi_passwordChange_success, SETTINGS.avwCmsApi_passwordChange_fail);
} else {
//alert('error');
}
};
SETTINGS.avwCmsApi_passwordChange_success = function(data) {
SETTINGS.avwCmsApi_passwordChange_success = function (data) {
// OK
var msgError = $('#main-error-message');
var msgError = $('#main-error-message');
if (data.httpStatus != CONSTANT.HTTP_STATUS.OK) {
msgError.html(I18N.i18nText('msgPwdChangeNG'));
msgError.show();
}
else {
} else {
msgError.html('');
$("#txtPwdCur").val("");
$("#txtPwdNew").val("");
$("#txtPwdNewRe").val("");
$('#txtPwdCur').val('');
$('#txtPwdNew').val('');
$('#txtPwdNewRe').val('');
/* show messages */
COMMON.displayAlert('msgPwdChangeOK');
}
};
SETTINGS.avwCmsApi_passwordChange_fail = function(xhr, b, c) {
SETTINGS.avwCmsApi_passwordChange_fail = function (xhr, b, c) {
/* show error messages */
var msgError = $('#main-error-message');
if (xhr.errorMessage && xhr.httpStatus != 0) {
......@@ -115,7 +112,6 @@ SETTINGS.avwCmsApi_passwordChange_fail = function(xhr, b, c) {
msgError.show();
};
/*
----------------------------------------------------------------------------
Event groups [ end ]
......@@ -123,33 +119,32 @@ Event groups [ end ]
*/
// Get input current password
SETTINGS.getCurrentPassword = function() {
return $("#txtPwdCur").val();
SETTINGS.getCurrentPassword = function () {
return $('#txtPwdCur').val();
};
// Get input new password
SETTINGS.getNewPassword = function() {
return $("#txtPwdNew").val();
SETTINGS.getNewPassword = function () {
return $('#txtPwdNew').val();
};
// Get input new password
SETTINGS.getNewPasswordRe = function() {
return $("#txtPwdNewRe").val();
SETTINGS.getNewPasswordRe = function () {
return $('#txtPwdNewRe').val();
};
// Initalize screen
SETTINGS.initScreen = function() {
$("#includedHeader").load("../html/common/header.html" , function() {
SETTINGS.initScreen = function () {
$('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n();
HEADER.init();
});
$("#includedConfirmModal").load("../html/common/confirmModal.html", function() {
});
$('#includedConfirmModal').load('../html/common/confirmModal.html', function () {
I18N.initi18n();
});
});
// Login ID
$("#txtLoginId").text(ClientData.userInfo_loginId_session());
$('#txtLoginId').text(ClientData.userInfo_loginId_session());
// Account Path
$("#txtLoginAccPath").text(ClientData.userInfo_accountPath_session());
$('#txtLoginAccPath').text(ClientData.userInfo_accountPath_session());
// Recent login date
$("#txtLastLoginTime").text(ClientData.userInfo_lastLoginTime());
$('#txtLastLoginTime').text(ClientData.userInfo_lastLoginTime());
};
/**
* template js
* template js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var TEMPLATE = {};
/** template load header */
TEMPLATE.loadHearder = function(elmentId) {
$(elmentId).load("../html/common/header.html" , function() {
$("#iconHomeDashboard").removeClass('active');
$("#iconHomeWorkList").removeClass('active');
if(sessionStorage.activeHomePage == CONSTANT.PAGE_NAME.OPERATION_LIST)
{
$("#iconHomeWorkList").addClass('active');
}
else
{
$("#iconHomeDashboard").addClass('active');
TEMPLATE.loadHearder = function (elmentId) {
$(elmentId).load('../html/common/header.html', function () {
$('#iconHomeDashboard').removeClass('active');
$('#iconHomeWorkList').removeClass('active');
if (sessionStorage.activeHomePage == CONSTANT.PAGE_NAME.OPERATION_LIST) {
$('#iconHomeWorkList').addClass('active');
} else {
$('#iconHomeDashboard').addClass('active');
}
I18N.initi18n();
});
}
});
};
/**
* template load dashboard setting
* template load dashboard setting
* @param {string} elmentId - element to load setting html
* @param {*} changeCallback - callback when setting changed
*/
TEMPLATE.loadDashboardSetting = function(elmentId, changeCallback) {
$(elmentId).load("dashboardSetting.html", function() {
TEMPLATE.loadDashboardSetting = function (elmentId, changeCallback) {
$(elmentId).load('dashboardSetting.html', function () {
DashboardSetting.init(changeCallback);
I18N.initi18n();
});
}
});
};
/** Template load confirm model */
TEMPLATE.loadConfirmModal = function(elmentId) {
$(elmentId).load("../html/common/confirmModal.html", function() {
TEMPLATE.loadConfirmModal = function (elmentId) {
$(elmentId).load('../html/common/confirmModal.html', function () {
I18N.initi18n();
});
}
});
};
/** Template load operation select */
TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) {
$(elmentId).load("operationSelect.html", function() {
TEMPLATE.loadOperationSelect = function (elmentId, selectCallback) {
$(elmentId).load('operationSelect.html', function () {
OperationSelect.init(selectCallback);
I18N.initi18n();
});
}
});
};
/**
* show confirm model
*/
TEMPLATE.showModalConfirm = function () {
$("#showConfirm").click(function(){
$("#confirm-modal").modal();
TEMPLATE.showModalConfirm = function () {
$('#showConfirm').click(function () {
$('#confirm-modal').modal();
});
};
/** Template load notification content*/
TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
$(elmentId).load("notificationContent.html", function() {
TEMPLATE.loadNotificationSelect = function (elmentId, selectCallback) {
$(elmentId).load('notificationContent.html', function () {
NotificationSelect.init(selectCallback);
I18N.initi18n();
});
}
});
};
/**
* load main navs title html to a element by id
......@@ -71,15 +68,15 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
* @param {string} titleLang - lang of title
* @param {Array} navs - array nav items (titleLang, href)
*/
TEMPLATE.loadMainNavsTitle = function(elmentId, titleLang, navs, completeCallback) {
var titleHtmlPath = '../common/mainTitle.html';
TEMPLATE.loadMainNavsTitle = function (elmentId, titleLang, navs, completeCallback) {
var titleHtmlPath = '../common/html/mainTitle.html';
if (navs) {
titleHtmlPath = '../common/mainNavTitle.html';
titleHtmlPath = '../common/html/mainNavTitle.html';
}
$(elmentId).load(titleHtmlPath , function(data) {
$(elmentId).load(titleHtmlPath, function (data) {
$(elmentId).replaceWith(data);
if (titleLang) {
$('#mainTitleHeader').attr("lang", titleLang);
$('#mainTitleHeader').attr('lang', titleLang);
}
if (navs) {
var olElm = $('#mainTitleNavs ol');
......@@ -109,4 +106,4 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
completeCallback();
}
});
}
};
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