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
2488c6d9
Commit
2488c6d9
authored
Oct 25, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.0_check_web_dev_50265' into feature/1.0_check_web_dev_50272
parents
ca8b685f
eb57ef10
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
abvw/js/dashboard/dashboard.js
+15
-14
No files found.
abvw/js/dashboard/dashboard.js
View file @
2488c6d9
...
...
@@ -4,14 +4,14 @@
*/
var
DASHBOARD
=
{};
/
/ pickup dashboard configuration
/
** pickup dashboard configuration */
DASHBOARD
.
pickupItems
=
[
{
id
:
'newReport'
,
href
:
"javascript:DASHBOARD.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_new.svg'
},
msg
:
'newRegistrationTitle'
},
{
id
:
'continousWork'
,
href
:
"javascript:DASHBOARD.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_proccess.svg'
},
msg
:
'continousWorkTitle'
},
{
id
:
'reportWarning'
,
href
:
"javascript:DASHBOARD.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_alert.svg'
},
msg
:
'reportWarningTitle'
},
];
/
/ comunication dashboard configuration
/
** comunication dashboard configuration */
DASHBOARD
.
communicationItems
=
[
{
id
:
'messageList'
,
href
:
"javascript:DASHBOARD.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_message_list.svg'
},
msg
:
'messageListTitle'
},
{
id
:
'sendMessage'
,
href
:
"javascript:DASHBOARD.goSendMessage();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_send_message.svg'
},
msg
:
'sendMessageTitle'
},
...
...
@@ -19,7 +19,7 @@ DASHBOARD.communicationItems = [
{
id
:
'chat'
,
href
:
"javascript:DASHBOARD.goChat();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_chat.svg'
},
msg
:
'chatTitle'
},
];
/
/ Default dashboard setting data
/
** Default dashboard setting data */
DASHBOARD
.
defaultDashboard
=
{
newReport
:
0
,
continousWork
:
0
,
...
...
@@ -30,7 +30,9 @@ DASHBOARD.defaultDashboard = {
DASHBOARD
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'topScreen/'
;
DASHBOARD
.
getDataApiUrl
=
DashboardSetting
.
baseApiUrl
+
'getAllData'
;
// Call api get data
/**
* Call api get data
*/
DASHBOARD
.
getDashboardData
=
function
(
callback
)
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
...
...
@@ -47,8 +49,7 @@ DASHBOARD.getDashboardData = function (callback) {
});
};
//Initialization dashboard pickup items html
/** Initialization dashboard pickup items html */
DASHBOARD
.
initPickups
=
function
()
{
$
(
"#pickupItems"
).
empty
();
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
...
...
@@ -65,7 +66,7 @@ DASHBOARD.initPickups = function() {
}
}
/
/Initialization dashboard communication items html
/
** Initialization dashboard communication items html */
DASHBOARD
.
initCommunications
=
function
()
{
$
(
"#communicationItems"
).
empty
();
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
...
...
@@ -76,7 +77,7 @@ DASHBOARD.initCommunications = function() {
});
}
/
/ Initialization dashboard items html
/
** Initialization dashboard items html */
DASHBOARD
.
initHtmlItem
=
function
(
item
)
{
let
countText
=
''
+
item
.
count
;
if
(
item
.
count
>=
100
)
{
...
...
@@ -99,7 +100,7 @@ DASHBOARD.initHtmlItem = function(item) {
return
html
;
}
/
/ Initialization dashboard screen
/
** Initialization dashboard screen */
DASHBOARD
.
init
=
function
()
{
DASHBOARD
.
loadCommon
();
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
...
...
@@ -112,7 +113,7 @@ DASHBOARD.init = function() {
});
});
}
/
/ load common data
/
** load common data */
DASHBOARD
.
loadCommon
=
function
()
{
$
(
"#includedHeader"
).
load
(
"../common/header.html"
,
function
()
{
I18N
.
initi18n
();
...
...
@@ -126,7 +127,7 @@ DASHBOARD.loadCommon = function() {
});
}
/
/ Update pickup config from setting dashboard data
/
** Update pickup config from setting dashboard data */
DASHBOARD
.
updateDataPickups
=
function
(
settings
,
dataDashboard
)
{
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
const
enabled
=
settings
[
item
.
id
];
...
...
@@ -140,7 +141,7 @@ DASHBOARD.updateDataPickups = function(settings, dataDashboard) {
});
}
/
/Update communication setting from dashboard data
/
** Update communication setting from dashboard data */
DASHBOARD
.
updateDataCommunications
=
function
(
dataDashboard
)
{
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
'messageList'
)
{
...
...
@@ -155,12 +156,12 @@ DASHBOARD.updateDataCommunications = function(dataDashboard) {
});
}
/
/ Direct to pickup screen
/
** Direct to pickup screen */
DASHBOARD
.
goPickup
=
function
(
pickupId
)
{
COMMON
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
}
/
/ Direct to Message list screen
/
** Direct to Message list screen */
DASHBOARD
.
goMessageList
=
function
()
{
COMMON
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
}
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