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
2b709459
Commit
2b709459
authored
Oct 13, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hp xiaomi
parent
a37d520f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
index.js
src/api/index.js
+2
-0
HomePage.js
src/container/HomePage.js
+36
-1
No files found.
src/api/index.js
View file @
2b709459
...
@@ -210,6 +210,7 @@ const create = (type = "") => {
...
@@ -210,6 +210,7 @@ const create = (type = "") => {
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
const
getDashboardMB
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard_table'
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_id'
,
body
)
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
)
const
getSubmitOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_periode_submit'
,
body
)
...
@@ -393,6 +394,7 @@ const create = (type = "") => {
...
@@ -393,6 +394,7 @@ const create = (type = "") => {
getIdDeleteFromExcel
,
getIdDeleteFromExcel
,
getDashboard
,
getDashboard
,
historyApproval
,
historyApproval
,
getDashboardMB
,
checkApprover
,
checkApprover
,
approvalSubmission
,
approvalSubmission
,
getCompanySubmitted
,
getCompanySubmitted
,
...
...
src/container/HomePage.js
View file @
2b709459
...
@@ -22,7 +22,9 @@ class HomePage extends Component {
...
@@ -22,7 +22,9 @@ class HomePage extends Component {
{
nama
:
'Dharma Group'
,
status
:
'overdue'
},
{
nama
:
'Dharma Group'
,
status
:
'overdue'
},
{
nama
:
'Daya Group'
,
status
:
'open'
},
{
nama
:
'Daya Group'
,
status
:
'open'
},
],
],
isApprover
:
true
isApprover
:
true
,
listdmb
:
[],
dataTableMB
:
[]
}
}
}
}
...
@@ -47,6 +49,7 @@ class HomePage extends Component {
...
@@ -47,6 +49,7 @@ class HomePage extends Component {
// }
// }
// })
// })
this
.
getApprMat
()
this
.
getApprMat
()
this
.
getDashboardMB
()
}
}
componentDidUpdate
()
{
componentDidUpdate
()
{
...
@@ -88,6 +91,23 @@ class HomePage extends Component {
...
@@ -88,6 +91,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
()
{
render
()
{
const
columns
=
[
"#"
,
"ID"
,
"Nama Perusahaan"
,
"Jenis Report"
,
"Revisi"
,
"Status"
,
{
const
columns
=
[
"#"
,
"ID"
,
"Nama Perusahaan"
,
"Jenis Report"
,
"Revisi"
,
"Status"
,
{
name
:
"Action"
,
name
:
"Action"
,
...
@@ -138,6 +158,9 @@ class HomePage extends Component {
...
@@ -138,6 +158,9 @@ class HomePage extends Component {
rowsPerPage
:
5
,
rowsPerPage
:
5
,
search
:
false
search
:
false
}
}
const
columnsMB
=
[
"Company"
,
"Master Budget & CAT"
,
"Operating Indicator"
]
const
dataChart
=
[{
const
dataChart
=
[{
count
:
90
,
count
:
90
,
color
:
'#5198ea'
,
color
:
'#5198ea'
,
...
@@ -188,6 +211,18 @@ class HomePage extends Component {
...
@@ -188,6 +211,18 @@ class HomePage extends Component {
/
>
/
>
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
<
/div
>
<
/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
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Typography
style
=
{{
color
:
'#656565'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
}}
>
Status
Laporan
<
/Typography
>
<
Typography
style
=
{{
color
:
'#656565'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
}}
>
Status
Laporan
<
/Typography
>
<
div
style
=
{{
marginTop
:
10
,
display
:
'flex'
}}
>
<
div
style
=
{{
marginTop
:
10
,
display
:
'flex'
}}
>
...
...
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