Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
7c68bef8
Commit
7c68bef8
authored
Mar 01, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
update mayan See merge request
!1236
parents
23469c2f
10738301
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
508 additions
and
204 deletions
+508
-204
index.js
src/api/index.js
+1
-1
Home.js
src/container/Home.js
+1
-1
HomePage.js
src/container/HomePage.js
+475
-190
DashboardCAT.js
src/container/Laporan/DashboardCAT.js
+29
-10
StrategiMap.js
src/container/Laporan/StrategiMap.js
+1
-1
Constant.js
src/library/Constant.js
+1
-1
No files found.
src/api/index.js
View file @
7c68bef8
...
@@ -284,7 +284,7 @@ const create = (type = "") => {
...
@@ -284,7 +284,7 @@ const create = (type = "") => {
const
getReportFRLastMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki'
,
body
)
const
getReportFRLastMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki'
,
body
)
const
getReportBSSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_balance_sheet/summary/get_report_hierarki'
,
body
)
const
getReportBSSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_balance_sheet/summary/get_report_hierarki'
,
body
)
const
getDashboardCAT
=
(
body
)
=>
api
.
post
(
'/transaction/dashboard/get_dashboard_cat'
,
body
)
const
getDashboardCAT
=
(
body
)
=>
api
.
post
(
'/transaction/dashboard/get_dashboard_cat'
,
body
)
const
getListChildDashboardCAT
=
(
body
)
=>
api
.
get
(
`/transaction/dashboard/get_item_cat/
${
body
}
`
)
const
getListChildDashboardCAT
=
(
periode
,
month
)
=>
api
.
get
(
`/transaction/dashboard/get_home_cat/
${
periode
}
/
${
month
}
`
)
const
getDashboardCATDetail
=
(
body
)
=>
api
.
post
(
'/transaction/dashboard/get_dashboard_cat_detail'
,
body
)
const
getDashboardCATDetail
=
(
body
)
=>
api
.
post
(
'/transaction/dashboard/get_dashboard_cat_detail'
,
body
)
const
getHierarkiReportYtd
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ytd/summary/get_report_hierarki'
,
body
)
const
getHierarkiReportYtd
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ytd/summary/get_report_hierarki'
,
body
)
const
getHierarkiReportHistorical
=
(
body
)
=>
api
.
post
(
'/transaction/summary_historical/summary/get_report_hierarki'
,
body
)
const
getHierarkiReportHistorical
=
(
body
)
=>
api
.
post
(
'/transaction/summary_historical/summary/get_report_hierarki'
,
body
)
...
...
src/container/Home.js
View file @
7c68bef8
...
@@ -227,7 +227,7 @@ export default function MiniDrawer() {
...
@@ -227,7 +227,7 @@ export default function MiniDrawer() {
},
{
},
{
img
:
'beranda'
,
img
:
'beranda'
,
label
:
'CAT Dashboard'
,
label
:
'CAT Dashboard'
,
path
:
'
dashboard-cat
'
,
path
:
'
cat-dashboard
'
,
}
}
],
],
collapse
:
false
,
collapse
:
false
,
...
...
src/container/HomePage.js
View file @
7c68bef8
This diff is collapsed.
Click to expand it.
src/container/Laporan/DashboardCAT.js
View file @
7c68bef8
...
@@ -36,12 +36,22 @@ export default class DashboardCAT extends Component {
...
@@ -36,12 +36,22 @@ export default class DashboardCAT extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getDetailUser
()
this
.
props
.
selectIndex
(
'CAT Dashboard'
)
console
.
log
(
this
.
props
);
let
dataStorageCAT
=
localStorage
.
getItem
(
Constant
.
DATACAT
)
// this.getMonth()
if
(
dataStorageCAT
!=
'datacat'
)
{
this
.
setState
({
selectedKPI
:
JSON
.
parse
(
dataStorageCAT
).
listKPI
})
}
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
getDetailUser
()
})
}
else
{
this
.
getDetailUser
()
}
}
}
getDetailUser
()
{
getDetailUser
()
{
console
.
log
(
this
.
state
.
rawData
)
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -92,7 +102,7 @@ export default class DashboardCAT extends Component {
...
@@ -92,7 +102,7 @@ export default class DashboardCAT extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
comID
=
this
.
state
.
rawData
?
this
.
state
.
rawData
.
company
_i
d
:
0
let
comID
=
this
.
state
.
rawData
?
this
.
state
.
rawData
.
company
I
d
:
0
let
companyData
=
data
.
map
((
item
)
=>
{
let
companyData
=
data
.
map
((
item
)
=>
{
return
{
return
{
company_id
:
item
.
company_id
,
company_id
:
item
.
company_id
,
...
@@ -157,6 +167,7 @@ export default class DashboardCAT extends Component {
...
@@ -157,6 +167,7 @@ export default class DashboardCAT extends Component {
let
data
=
[]
let
data
=
[]
console
.
log
(
response
.
data
.
data
)
console
.
log
(
response
.
data
.
data
)
console
.
log
(
this
.
state
.
lastPeriod
)
console
.
log
(
this
.
state
.
lastPeriod
)
let
periodeID
=
this
.
state
.
rawData
?
this
.
state
.
rawData
.
periode
:
0
response
.
data
.
data
.
map
((
item
)
=>
{
response
.
data
.
data
.
map
((
item
)
=>
{
if
(
this
.
state
.
isApprover
)
{
if
(
this
.
state
.
isApprover
)
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)
+
1
))
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)
+
1
))
{
...
@@ -174,17 +185,17 @@ export default class DashboardCAT extends Component {
...
@@ -174,17 +185,17 @@ export default class DashboardCAT extends Component {
}
}
})
})
let
defaultProps
=
{
let
defaultProps
=
{
options
:
periodeData
,
options
:
periodeData
.
sort
((
a
,
b
)
=>
a
.
periode
-
b
.
periode
)
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
let
index
=
periodeData
.
sort
((
a
,
b
)
=>
a
.
periode
-
b
.
periode
).
findIndex
((
val
)
=>
periodeID
==
0
?
val
.
periode
===
periode
:
val
.
periode
==
periodeID
)
// // console.log(this.props.location.state.rawData)
// // console.log(this.props.location.state.rawData)
// console.log(this.state.lastPeriod)
// console.log(this.state.lastPeriod)
console
.
log
(
data
)
console
.
log
(
data
)
console
.
log
(
periodeData
)
console
.
log
(
periodeData
)
console
.
log
(
defaultProps
)
console
.
log
(
defaultProps
)
// // //
console.log(index)
console
.
log
(
index
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
getMonth
()
this
.
getMonth
()
})
})
...
@@ -202,6 +213,7 @@ export default class DashboardCAT extends Component {
...
@@ -202,6 +213,7 @@ export default class DashboardCAT extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
console
.
log
(
response
);
console
.
log
(
response
);
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
monthID
=
this
.
state
.
rawData
?
this
.
state
.
rawData
.
month
:
0
let
monthData
=
data
.
map
((
item
)
=>
{
let
monthData
=
data
.
map
((
item
)
=>
{
return
{
return
{
month_id
:
item
.
id
,
month_id
:
item
.
id
,
...
@@ -212,8 +224,9 @@ export default class DashboardCAT extends Component {
...
@@ -212,8 +224,9 @@ export default class DashboardCAT extends Component {
options
:
monthData
,
options
:
monthData
,
getOptionLabel
:
(
option
)
=>
option
.
month_value
,
getOptionLabel
:
(
option
)
=>
option
.
month_value
,
};
};
let
index
=
data
.
findIndex
((
val
)
=>
val
.
month_name
==
month
)
let
index
=
data
.
findIndex
((
val
)
=>
monthID
==
0
?
val
.
month_name
==
month
:
val
.
id
==
monthID
)
// console.log(index);
console
.
log
(
index
);
this
.
setState
({
listMonth
:
defaultProps
,
month
:
index
==
-
1
?
monthData
[
0
]
:
monthData
[
index
]
},
()
=>
{
this
.
setState
({
listMonth
:
defaultProps
,
month
:
index
==
-
1
?
monthData
[
0
]
:
monthData
[
index
]
},
()
=>
{
this
.
getDasboardCAT
()
this
.
getDasboardCAT
()
})
})
...
@@ -266,7 +279,13 @@ export default class DashboardCAT extends Component {
...
@@ -266,7 +279,13 @@ export default class DashboardCAT extends Component {
}
}
setSelectedKPI
(
data
)
{
setSelectedKPI
(
data
)
{
this
.
setState
({
selectedKPI
:
data
})
this
.
setState
({
selectedKPI
:
data
},
()
=>
{
let
payloadData
=
{
userID
:
localStorage
.
getItem
(
Constant
.
USER
),
listKPI
:
this
.
state
.
selectedKPI
}
localStorage
.
setItem
(
Constant
.
DATACAT
,
this
.
state
.
selectedKPI
.
length
==
0
?
'datacat'
:
JSON
.
stringify
(
payloadData
))
})
}
}
render
()
{
render
()
{
...
...
src/container/Laporan/StrategiMap.js
View file @
7c68bef8
...
@@ -59,7 +59,7 @@ export default class StrategiMap extends Component {
...
@@ -59,7 +59,7 @@ export default class StrategiMap extends Component {
<
div
style
=
{{
display
:
'grid'
,
alignContent
:
'center'
,
backgroundColor
:
'#6885a6'
,
width
:
155
,
borderTopLeftRadius
:
6
,
borderBottomLeftRadius
:
6
,
padding
:
10
}}
>
<
div
style
=
{{
display
:
'grid'
,
alignContent
:
'center'
,
backgroundColor
:
'#6885a6'
,
width
:
155
,
borderTopLeftRadius
:
6
,
borderBottomLeftRadius
:
6
,
padding
:
10
}}
>
<
Typography
style
=
{{
color
:
'#fff'
,
fontSize
:
12
,
textAlign
:
'center'
}}
>
{
items
.
item_name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'#fff'
,
fontSize
:
12
,
textAlign
:
'center'
}}
>
{
items
.
item_name
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
backgroundColor
:
this
.
state
.
radioValue
?
(
items
.
is_higher_actual
==
'-'
?
'#d8d8d8'
:
(
items
.
is_higher_actual
==
'true'
?
'#cbf4a8'
:
'#faaaaa'
))
:
(
items
.
is_higher_yoy
==
'-'
?
'
white'
:
(
items
.
is_higher_yoy
?
'#cbf4a8'
:
'#faaaaa'
)),
width
:
68
,
borderTopRightRadius
:
6
,
borderBottomRightRadius
:
6
,
textAlign
:
'center'
,
paddingTop
:
10
,
paddingBottom
:
10
}}
>
<
div
style
=
{{
backgroundColor
:
this
.
state
.
radioValue
?
(
items
.
is_higher_actual
==
'-'
?
'#d8d8d8'
:
(
items
.
is_higher_actual
==
'true'
?
'#cbf4a8'
:
'#faaaaa'
))
:
(
items
.
is_higher_yoy
==
'-'
?
'
#d8d8d8'
:
(
items
.
is_higher_yoy
==
'true'
?
'#cbf4a8'
:
'#faaaaa'
)),
width
:
68
,
borderTopRightRadius
:
6
,
borderBottomRightRadius
:
6
,
textAlign
:
'center'
,
paddingTop
:
10
,
paddingBottom
:
10
}}
>
{
items
.
is_higher_actual
==
'-'
?
{
items
.
is_higher_actual
==
'-'
?
<
Typography
style
=
{{
color
:
'#4b4b4b'
,
fontSize
:
10
,
textAlign
:
'center'
}}
>
{
'-'
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'#4b4b4b'
,
fontSize
:
10
,
textAlign
:
'center'
}}
>
{
'-'
}
<
/Typography
>
:
:
...
...
src/library/Constant.js
View file @
7c68bef8
...
@@ -9,7 +9,7 @@ const Constant = {
...
@@ -9,7 +9,7 @@ const Constant = {
URL_FE_DEV
:
'https://tia.eksad.com/tia-web-dev'
,
URL_FE_DEV
:
'https://tia.eksad.com/tia-web-dev'
,
URL_FE_DEMO
:
'https://tia.eksad.com/tia-web-demo'
,
URL_FE_DEMO
:
'https://tia.eksad.com/tia-web-demo'
,
URL_FE_PROD
:
'https://dashboard.triputra-group.com/tia-web'
,
URL_FE_PROD
:
'https://dashboard.triputra-group.com/tia-web'
,
DATACAT
:
'datacat'
// URL_BE_MAIN : Constant.URL_BE_DEV,
// URL_BE_MAIN : Constant.URL_BE_DEV,
// URL_FE_MAIN : Constant.URL_FE_DEV,
// URL_FE_MAIN : Constant.URL_FE_DEV,
}
}
...
...
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