Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
23d38ca7
Commit
23d38ca7
authored
Oct 24, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change english comment
parent
280de0b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
138 deletions
+31
-138
abvw/html/index.html
+1
-1
abvw/js/dashboard/check-dashboard.js
+0
-114
abvw/js/dashboard/dashboard.js
+30
-23
No files found.
abvw/html/index.html
View file @
23d38ca7
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/topPage/topPage.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/topPage/topPage.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboard/
check-
dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboard/dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/footer.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/footer.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/app.js?__UPDATEID__"
defer
></script>
<script
src=
"/abvw/common/js/app.js?__UPDATEID__"
defer
></script>
...
...
abvw/js/dashboard/check-dashboard.js
deleted
100644 → 0
View file @
280de0b5
var
CHK_Dashboard
=
{};
CHK_Dashboard
.
pickupItems
=
[
{
id
:
'newReport'
,
href
:
"javascript:CHK_Dashboard.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_new.svg'
},
msg
:
'newRegistrationTitle'
},
{
id
:
'continousWork'
,
href
:
"javascript:CHK_Dashboard.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_proccess.svg'
},
msg
:
'continousWorkTitle'
},
{
id
:
'reportWarning'
,
href
:
"javascript:CHK_Dashboard.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_alert.svg'
},
msg
:
'reportWarningTitle'
},
];
CHK_Dashboard
.
communicationItems
=
[
{
id
:
'messageList'
,
href
:
"javascript:CHK_Dashboard.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_message_lsit.svg'
},
msg
:
'messageListTitle'
},
{
id
:
'sendMessage'
,
href
:
"javascript:CHK.sendAppCommand('goSendMessage');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_send_message.svg'
},
msg
:
'sendMessageTitle'
},
{
id
:
'distanceSupport'
,
href
:
"javascript:CHK.sendAppCommand('goDistanceSupport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_remote.svg'
},
msg
:
'distanceSupportTitle'
},
{
id
:
'chat'
,
href
:
"javascript:CHK.sendAppCommand('goChat');"
,
count
:
0
,
enabled
:
false
,
img
:
{
src
:
'img/icon_chat.svg'
},
msg
:
'chatTitle'
},
];
//CHK_Dashboard.pickupItemsに設定した情報をhtmlに表示する
CHK_Dashboard
.
initPickups
=
function
()
{
$
(
"#pickupItems"
).
empty
();
CHK_Dashboard
.
pickupItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
CHK_Dashboard
.
initHtmlItem
(
item
);
$
(
"#pickupItems"
).
append
(
html
);
}
});
//pickup empty
if
(
$
(
"#pickupItems"
).
children
().
length
>
0
)
{
$
(
"#pickupHeader"
).
removeClass
(
'd-none'
);
}
else
{
$
(
"#pickupHeader"
).
addClass
(
'd-none'
);
}
}
//CHK_Dashboard.communicationItemsに設定した情報をhtmlに表示する
CHK_Dashboard
.
initCommunications
=
function
()
{
$
(
"#communicationItems"
).
empty
();
CHK_Dashboard
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
CHK_Dashboard
.
initHtmlItem
(
item
);
$
(
"#communicationItems"
).
append
(
html
);
}
});
}
//設定されている情報からhtmlを表示する
CHK_Dashboard
.
initHtmlItem
=
function
(
item
)
{
var
countText
=
''
+
item
.
count
;
if
(
item
.
count
>=
100
)
{
countText
=
'99+'
;
}
var
countDClass
=
''
;
if
(
typeof
item
.
count
==
'undefined'
||
item
.
count
<
1
)
{
countDClass
=
' d-none'
;
}
var
countSpan
=
'<span class="count fs-7'
+
countDClass
+
'">'
+
countText
+
'</span>'
;
var
html
=
$
(
'<div class="item" id="'
+
item
.
id
+
'">'
+
'<a href="'
+
item
.
href
+
'" class="d-block text-dark text-decoration-none mb-1 p-3">'
+
'<img src="'
+
item
.
img
.
src
+
'">'
+
'<div class="fs-8 multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
getMsg
(
item
.
msg
)
+
'</div>'
+
countSpan
+
'</a>'
+
'</div>'
);
return
html
;
}
//ダッシュボード画面の初期表示
CHK_Dashboard
.
init
=
function
()
{
CHK_Dashboard
.
updateDataPickups
();
CHK_Dashboard
.
initPickups
();
CHK_Dashboard
.
updateDataCommunications
();
CHK_Dashboard
.
initCommunications
();
}
//変数として設定しているガジェットに初期表示で取得したデータを設定
CHK_Dashboard
.
updateDataPickups
=
function
()
{
CHK_Dashboard
.
pickupItems
.
forEach
(
function
(
item
)
{
let
enabled
=
CHK
.
dashboardSetting
[
item
.
id
];
if
(
enabled
==
true
||
enabled
==
false
)
{
item
.
enabled
=
enabled
;
}
item
.
count
=
0
;
if
(
CHK
.
dashboardBatch
[
item
.
id
])
{
item
.
count
=
CHK
.
dashboardBatch
[
item
.
id
];
}
});
}
//変数として設定しているコミュニケーションに初期表示で取得したデータを設定
CHK_Dashboard
.
updateDataCommunications
=
function
()
{
CHK_Dashboard
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
'messageList'
)
{
item
.
count
=
0
;
if
(
typeof
CHK
.
pushMessageList
!==
'undefined'
)
{
//読んでいないメッセージがあればカウントを +1
CHK
.
pushMessageList
.
forEach
(
function
(
message
)
{
if
(
!
message
.
readingFlg
)
{
item
.
count
+=
1
;
}
});
}
}
else
if
(
item
.
id
==
'chat'
)
{
item
.
enabled
=
CHK
.
isChat
;
}
});
}
//ガジェット画面に移動
CHK_Dashboard
.
goPickup
=
function
(
pickupId
)
{
CHK
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
}
//コミュニケーション画面に移動
CHK_Dashboard
.
goMessageList
=
function
()
{
CHK
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
}
\ No newline at end of file
abvw/js/dashboard/dashboard.js
View file @
23d38ca7
/**
* Dashboard js in dashboard.html
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
DASHBOARD
=
{};
var
DASHBOARD
=
{};
// pickup dashboard configuration
DASHBOARD
.
pickupItems
=
[
DASHBOARD
.
pickupItems
=
[
{
id
:
'newReport'
,
href
:
"javascript:DASHBOARD.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_new.svg'
},
msg
:
'newRegistrationTitle'
,
defaultMessage
:
'New report'
},
{
id
:
'newReport'
,
href
:
"javascript:DASHBOARD.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_new.svg'
},
msg
:
'newRegistrationTitle'
,
defaultMessage
:
'New report'
},
{
id
:
'continousWork'
,
href
:
"javascript:DASHBOARD.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_proccess.svg'
},
msg
:
'continousWorkTitle'
,
defaultMessage
:
'Continuous Work'
},
{
id
:
'continousWork'
,
href
:
"javascript:DASHBOARD.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_proccess.svg'
},
msg
:
'continousWorkTitle'
,
defaultMessage
:
'Continuous Work'
},
{
id
:
'reportWarning'
,
href
:
"javascript:DASHBOARD.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_alert.svg'
},
msg
:
'reportWarningTitle'
,
defaultMessage
:
'Warning report'
},
{
id
:
'reportWarning'
,
href
:
"javascript:DASHBOARD.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_alert.svg'
},
msg
:
'reportWarningTitle'
,
defaultMessage
:
'Warning report'
},
];
];
// comunication dashboard configuration
DASHBOARD
.
communicationItems
=
[
DASHBOARD
.
communicationItems
=
[
{
id
:
'messageList'
,
href
:
"javascript:DASHBOARD.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_message_list.svg'
},
msg
:
'messageListTitle'
,
defaultMessage
:
'Message list'
},
{
id
:
'messageList'
,
href
:
"javascript:DASHBOARD.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_message_list.svg'
},
msg
:
'messageListTitle'
,
defaultMessage
:
'Message list'
},
{
id
:
'sendMessage'
,
href
:
"javascript:DASHBOARD.goSendMessage();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_send_message.svg'
},
msg
:
'sendMessageTitle'
,
defaultMessage
:
'Message'
},
{
id
:
'sendMessage'
,
href
:
"javascript:DASHBOARD.goSendMessage();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_send_message.svg'
},
msg
:
'sendMessageTitle'
,
defaultMessage
:
'Message'
},
...
@@ -12,19 +19,18 @@ DASHBOARD.communicationItems = [
...
@@ -12,19 +19,18 @@ DASHBOARD.communicationItems = [
{
id
:
'chat'
,
href
:
"javascript:DASHBOARD.goChat();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_chat.svg'
},
msg
:
'chatTitle'
,
defaultMessage
:
'Chat'
},
{
id
:
'chat'
,
href
:
"javascript:DASHBOARD.goChat();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_chat.svg'
},
msg
:
'chatTitle'
,
defaultMessage
:
'Chat'
},
];
];
// Default dashboard setting data
DASHBOARD
.
defaultDashboard
=
{
DASHBOARD
.
defaultDashboard
=
{
newReport
:
12
,
newReport
:
0
,
continousWork
:
10
0
,
continousWork
:
0
,
reportWarning
:
13
,
reportWarning
:
0
,
pushMesage
:
7
,
pushMesage
:
0
,
}
}
DASHBOARD
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'topScreen/'
;
DASHBOARD
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'topScreen/'
;
DASHBOARD
.
getDataApiUrl
=
DashboardSetting
.
baseApiUrl
+
'getAllData'
;
DASHBOARD
.
getDataApiUrl
=
DashboardSetting
.
baseApiUrl
+
'getAllData'
;
// Call api get data
// Call api get data
DASHBOARD
.
getDashboardData
=
function
(
callback
)
{
DASHBOARD
.
getDashboardData
=
function
(
callback
)
{
let
param
=
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
sid
:
COMMON
.
getSid
(),
...
@@ -42,7 +48,7 @@ DASHBOARD.getDashboardData = function (callback) {
...
@@ -42,7 +48,7 @@ DASHBOARD.getDashboardData = function (callback) {
};
};
//
CHK_Dashboard.pickupItemsに設定した情報をhtmlに表示する
//
Initialization dashboard pickup items html
DASHBOARD
.
initPickups
=
function
()
{
DASHBOARD
.
initPickups
=
function
()
{
$
(
"#pickupItems"
).
empty
();
$
(
"#pickupItems"
).
empty
();
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
...
@@ -59,30 +65,30 @@ DASHBOARD.initPickups = function() {
...
@@ -59,30 +65,30 @@ DASHBOARD.initPickups = function() {
}
}
}
}
//
CHK_Dashboard.communicationItemsに設定した情報をhtmlに表示する
//
Initialization dashboard communication items html
DASHBOARD
.
initCommunications
=
function
()
{
DASHBOARD
.
initCommunications
=
function
()
{
$
(
"#communicationItems"
).
empty
();
$
(
"#communicationItems"
).
empty
();
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
DASHBOARD
.
initHtmlItem
(
item
);
const
html
=
DASHBOARD
.
initHtmlItem
(
item
);
$
(
"#communicationItems"
).
append
(
html
);
$
(
"#communicationItems"
).
append
(
html
);
}
}
});
});
}
}
//
設定されている情報からhtmlを表示する
//
Initialization dashboard items html
DASHBOARD
.
initHtmlItem
=
function
(
item
)
{
DASHBOARD
.
initHtmlItem
=
function
(
item
)
{
var
countText
=
''
+
item
.
count
;
let
countText
=
''
+
item
.
count
;
if
(
item
.
count
>=
100
)
{
if
(
item
.
count
>=
100
)
{
countText
=
'99+'
;
countText
=
'99+'
;
}
}
var
countDClass
=
''
;
let
countDClass
=
''
;
var
countSpan
=
''
let
countSpan
=
''
if
(
typeof
item
.
count
!=
'undefined'
&&
item
.
count
>
0
)
{
if
(
typeof
item
.
count
!=
'undefined'
&&
item
.
count
>
0
)
{
countDClass
=
' '
;
countDClass
=
' '
;
countSpan
=
'<span class="fs-8 circle-tag-danger'
+
countDClass
+
'">'
+
countText
+
'</span>'
;
countSpan
=
'<span class="fs-8 circle-tag-danger'
+
countDClass
+
'">'
+
countText
+
'</span>'
;
}
}
var
html
=
$
(
'<li class="card mb-2 position-relative" id="'
+
item
.
id
+
'">'
let
html
=
$
(
'<li class="card mb-2 position-relative" id="'
+
item
.
id
+
'">'
+
'<a href="'
+
item
.
href
+
'" class="d-block text-dark text-decoration-none mb-1 p-3 text-center">'
+
'<a href="'
+
item
.
href
+
'" class="d-block text-dark text-decoration-none mb-1 p-3 text-center">'
+
'<div class="bg-lightblue p-2 d-inline-block rounded-circle mb-3">'
+
'<div class="bg-lightblue p-2 d-inline-block rounded-circle mb-3">'
+
'<img src="'
+
item
.
img
.
src
+
'" alt="'
+
DASHBOARD
.
getMsg
(
item
.
msg
,
item
.
defaultMessage
)
+
'" class="img-fluid"> </div>'
+
'<img src="'
+
item
.
img
.
src
+
'" alt="'
+
DASHBOARD
.
getMsg
(
item
.
msg
,
item
.
defaultMessage
)
+
'" class="img-fluid"> </div>'
...
@@ -93,7 +99,7 @@ DASHBOARD.initHtmlItem = function(item) {
...
@@ -93,7 +99,7 @@ DASHBOARD.initHtmlItem = function(item) {
return
html
;
return
html
;
}
}
//
ダッシュボード画面の初期表示
//
Initialization dashboard screen
DASHBOARD
.
init
=
function
()
{
DASHBOARD
.
init
=
function
()
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
DASHBOARD
.
getDashboardData
(
function
(
dataDashboard
)
{
DASHBOARD
.
getDashboardData
(
function
(
dataDashboard
)
{
...
@@ -105,10 +111,10 @@ DASHBOARD.init = function() {
...
@@ -105,10 +111,10 @@ DASHBOARD.init = function() {
});
});
}
}
//
変数として設定しているガジェットに初期表示で取得したデータを設定
//
Update pickup config from setting dashboard data
DASHBOARD
.
updateDataPickups
=
function
(
settings
,
dataDashboard
)
{
DASHBOARD
.
updateDataPickups
=
function
(
settings
,
dataDashboard
)
{
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
le
t
enabled
=
settings
[
item
.
id
];
cons
t
enabled
=
settings
[
item
.
id
];
if
(
enabled
==
true
||
enabled
==
false
)
{
if
(
enabled
==
true
||
enabled
==
false
)
{
item
.
enabled
=
enabled
;
item
.
enabled
=
enabled
;
}
}
...
@@ -119,7 +125,7 @@ DASHBOARD.updateDataPickups = function(settings, dataDashboard) {
...
@@ -119,7 +125,7 @@ DASHBOARD.updateDataPickups = function(settings, dataDashboard) {
});
});
}
}
//
変数として設定しているコミュニケーションに初期表示で取得したデータを設定
//
Update communication setting from dashboard data
DASHBOARD
.
updateDataCommunications
=
function
(
dataDashboard
)
{
DASHBOARD
.
updateDataCommunications
=
function
(
dataDashboard
)
{
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
'messageList'
)
{
if
(
item
.
id
==
'messageList'
)
{
...
@@ -134,17 +140,17 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
...
@@ -134,17 +140,17 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
});
});
}
}
//
ガジェット画面に移動
//
Direct to pickup screen
DASHBOARD
.
goPickup
=
function
(
pickupId
)
{
DASHBOARD
.
goPickup
=
function
(
pickupId
)
{
C
HK
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
C
OMMON
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
}
}
//
コミュニケーション画面に移動
//
Direct to Message list screen
DASHBOARD
.
goMessageList
=
function
()
{
DASHBOARD
.
goMessageList
=
function
()
{
C
HK
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
C
OMMON
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
}
}
//
コミュニケーション画面に移動
//
get message language
DASHBOARD
.
getMsg
=
function
(
message
,
defaultMessage
)
{
DASHBOARD
.
getMsg
=
function
(
message
,
defaultMessage
)
{
return
defaultMessage
;
return
defaultMessage
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment