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
397067a4
Commit
397067a4
authored
Oct 13, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
push conflict index dan hp xiaomi See merge request
!520
parents
f0391691
fb040c34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletion
+39
-1
index.js
src/api/index.js
+2
-0
HomePage.js
src/container/HomePage.js
+37
-1
No files found.
src/api/index.js
View file @
397067a4
...
...
@@ -211,6 +211,7 @@ const create = (type = "") => {
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
const
getDashboardUser
=
()
=>
api
.
get
(
'transaction/get_dashboard_sub_co'
)
const
getDashboardMB
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard_table'
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_id'
,
body
)
const
getSubmitOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_periode_submit'
,
body
)
...
...
@@ -394,6 +395,7 @@ const create = (type = "") => {
getIdDeleteFromExcel
,
getDashboard
,
historyApproval
,
getDashboardMB
,
checkApprover
,
approvalSubmission
,
getCompanySubmitted
,
...
...
src/container/HomePage.js
View file @
397067a4
...
...
@@ -22,9 +22,11 @@ class HomePage extends Component {
{
nama
:
'Dharma Group'
,
status
:
'overdue'
},
{
nama
:
'Daya Group'
,
status
:
'open'
},
],
isApprover
:
true
,
listSubcoMB
:
[],
valueSubmit
:
0
,
isApprover
:
true
listdmb
:
[],
dataTableMB
:
[]
}
}
...
...
@@ -50,6 +52,7 @@ class HomePage extends Component {
// })
this
.
getApprMat
()
this
.
getListUserSubco
()
this
.
getDashboardMB
()
}
componentDidUpdate
()
{
...
...
@@ -111,6 +114,23 @@ class HomePage extends Component {
})
}
getDashboardMB
()
{
api
.
create
().
getDashboardMB
().
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
){
let
data
=
response
.
data
.
data
let
listdmb
=
data
.
sort
((
a
,
b
)
=>
a
.
company_id
-
b
.
company_id
).
map
((
item
,
index
)
=>
{
return
[
item
.
company_name
,
item
.
master_budget
,
item
.
operating_indicator
]
})
this
.
setState
({
dataTableMB
:
listdmb
})
}
})
}
render
()
{
const
columns
=
[
"#"
,
"ID"
,
"Nama Perusahaan"
,
"Jenis Report"
,
"Revisi"
,
"Status"
,
{
name
:
"Action"
,
...
...
@@ -161,6 +181,9 @@ class HomePage extends Component {
rowsPerPage
:
5
,
search
:
false
}
const
columnsMB
=
[
"Company"
,
"Master Budget & CAT"
,
"Operating Indicator"
]
const
dataChart
=
[{
count
:
90
,
color
:
'#5198ea'
,
...
...
@@ -211,6 +234,18 @@ class HomePage extends Component {
/
>
<
/MuiThemeProvider
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Typography
style
=
{{
color
:
'#656565'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
}}
>
Master
Budget
&
CAT
<
/Typography
>
<
div
style
=
{{
marginTop
:
10
,
width
:
'100%'
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
this
.
state
.
dataTableMB
}
columns
=
{
columnsMB
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
{
/* <div style={{ marginTop: 20 }}>
<Typography style={{ color: '#656565', fontSize: '16px', fontWeight: 'bold' }}>Status Laporan</Typography>
<div style={{ marginTop: 10, display: 'flex' }}>
...
...
@@ -392,6 +427,7 @@ class HomePage extends Component {
}
<
/div
>
);
}
}
...
...
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