Commit 397067a4 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'rifka' into 'master'

push conflict index dan hp xiaomi

See merge request !520
parents f0391691 fb040c34
...@@ -211,6 +211,7 @@ const create = (type = "") => { ...@@ -211,6 +211,7 @@ const create = (type = "") => {
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 getDashboardUser = () => api.get('transaction/get_dashboard_sub_co') 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 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)
...@@ -394,6 +395,7 @@ const create = (type = "") => { ...@@ -394,6 +395,7 @@ const create = (type = "") => {
getIdDeleteFromExcel, getIdDeleteFromExcel,
getDashboard, getDashboard,
historyApproval, historyApproval,
getDashboardMB,
checkApprover, checkApprover,
approvalSubmission, approvalSubmission,
getCompanySubmitted, getCompanySubmitted,
......
...@@ -22,9 +22,11 @@ class HomePage extends Component { ...@@ -22,9 +22,11 @@ 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,
listSubcoMB: [], listSubcoMB: [],
valueSubmit: 0, valueSubmit: 0,
isApprover: true listdmb: [],
dataTableMB: []
} }
} }
...@@ -50,6 +52,7 @@ class HomePage extends Component { ...@@ -50,6 +52,7 @@ class HomePage extends Component {
// }) // })
this.getApprMat() this.getApprMat()
this.getListUserSubco() this.getListUserSubco()
this.getDashboardMB()
} }
componentDidUpdate() { componentDidUpdate() {
...@@ -111,6 +114,23 @@ class HomePage extends Component { ...@@ -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() { render() {
const columns = ["#", "ID", "Nama Perusahaan", "Jenis Report", "Revisi", "Status", { const columns = ["#", "ID", "Nama Perusahaan", "Jenis Report", "Revisi", "Status", {
name: "Action", name: "Action",
...@@ -161,6 +181,9 @@ class HomePage extends Component { ...@@ -161,6 +181,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',
...@@ -211,6 +234,18 @@ class HomePage extends Component { ...@@ -211,6 +234,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' }}>
...@@ -392,6 +427,7 @@ class HomePage extends Component { ...@@ -392,6 +427,7 @@ class HomePage extends Component {
} }
</div> </div>
); );
} }
} }
......
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