Commit 2b709459 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

hp xiaomi

parent a37d520f
...@@ -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,
......
...@@ -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' }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment