Commit c465bc6e authored by r.kurnia's avatar r.kurnia

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents c8551f0b 998401fe
...@@ -213,6 +213,7 @@ const create = (type = "") => { ...@@ -213,6 +213,7 @@ const create = (type = "") => {
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 getDashboardMB = (body) => api.get('transaction/get_dashboard_table')
const getReportHierarkiFR = (body) => api.post('transaction/db_ratio/get_report_hierarki', body) const getReportHierarkiFR = (body) => api.post('transaction/db_ratio/get_report_hierarki', body)
const getDetailHierarkiCF = (body) => api.post('transaction/master_budget/get_report_hierarki_cashflow', body)
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)
...@@ -441,7 +442,8 @@ const create = (type = "") => { ...@@ -441,7 +442,8 @@ const create = (type = "") => {
getDetailReportCF, getDetailReportCF,
getReportHierarkiPL, getReportHierarkiPL,
getMonthlyReportID, getMonthlyReportID,
getReportHierarkiFR getReportHierarkiFR,
getDetailHierarkiCF,
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -37,7 +37,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -37,7 +37,7 @@ export default class OperatingIndicatorMR extends Component {
super(props) super(props)
this.state = { this.state = {
dataTable: [], dataTable: [],
loading: true loading: true,
} }
} }
...@@ -86,7 +86,6 @@ export default class OperatingIndicatorMR extends Component { ...@@ -86,7 +86,6 @@ export default class OperatingIndicatorMR extends Component {
pavrb: item.operating_indicator.percent_act_vs_rb === "" ? "0.0" : item.operating_indicator.percent_act_vs_rb, pavrb: item.operating_indicator.percent_act_vs_rb === "" ? "0.0" : item.operating_indicator.percent_act_vs_rb,
}, },
{ {
mtdvpm: item.operating_indicator.mtd_vs_previous_month === "" ? "0.0" : item.operating_indicator.mtd_vs_previous_month,
mtdvmb: item.operating_indicator.mtd_vs_mb === "" ? "0.0" : item.operating_indicator.mtd_vs_mb, mtdvmb: item.operating_indicator.mtd_vs_mb === "" ? "0.0" : item.operating_indicator.mtd_vs_mb,
mtdvrb: item.operating_indicator.mtd_vs_rb === "" ? "0.0" : item.operating_indicator.mtd_vs_rb, mtdvrb: item.operating_indicator.mtd_vs_rb === "" ? "0.0" : item.operating_indicator.mtd_vs_rb,
} }
...@@ -115,10 +114,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -115,10 +114,7 @@ export default class OperatingIndicatorMR extends Component {
rb: item.operating_indicator.rolling_budget === "" ? "0.0" : item.operating_indicator.rolling_budget, rb: item.operating_indicator.rolling_budget === "" ? "0.0" : item.operating_indicator.rolling_budget,
actual: item.operating_indicator.actual === "" ? "0.0" : item.operating_indicator.actual actual: item.operating_indicator.actual === "" ? "0.0" : item.operating_indicator.actual
}, },
item.operating_indicator.actual_previous_month === null ? "0.0" : item.operating_indicator.actual_previous_month === "" ? "0.0" : item.operating_indicator.actual_previous_month,
{ {
aavpm: item.operating_indicator.amount_act_vs_previous_month === "" ? "0.0" : item.operating_indicator.amount_act_vs_previous_month,
pavpm: item.operating_indicator.percent_act_vs_previous_month === "" ? "0.0" : item.operating_indicator.percent_act_vs_previous_month,
aavmb: item.operating_indicator.amount_act_vs_mb === "" ? "0.0" : item.operating_indicator.amount_act_vs_mb, aavmb: item.operating_indicator.amount_act_vs_mb === "" ? "0.0" : item.operating_indicator.amount_act_vs_mb,
pavmb: item.operating_indicator.percent_act_vs_mb === "" ? "0.0" : item.operating_indicator.percent_act_vs_mb, pavmb: item.operating_indicator.percent_act_vs_mb === "" ? "0.0" : item.operating_indicator.percent_act_vs_mb,
aavrb: item.operating_indicator.amount_act_vs_rb === "" ? "0.0" : item.operating_indicator.amount_act_vs_rb, aavrb: item.operating_indicator.amount_act_vs_rb === "" ? "0.0" : item.operating_indicator.amount_act_vs_rb,
...@@ -279,7 +275,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -279,7 +275,7 @@ export default class OperatingIndicatorMR extends Component {
} }
}), }),
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (val, tableMeta, updateValue) => {
// console.log(tableMeta); console.log(tableMeta);
return ( return (
<div> <div>
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
...@@ -313,48 +309,14 @@ export default class OperatingIndicatorMR extends Component { ...@@ -313,48 +309,14 @@ export default class OperatingIndicatorMR extends Component {
} }
} }
}, },
{
name: "Actual Previous Month",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
val
}
</div>
)
}
}
},
{ {
name: `Variance`, name: `Variance`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 40 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 40 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-2x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, border: '1px #fff solid', backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, border: '1px #fff solid', backgroundColor: '#07a7d0' }}>
<div style={{ borderBottom: '1px #fff solid', backgroundColor: '#37b5e6' }}>
<span>{"Act vs Previous Month"}</span>
</div>
<div className="grid grid-2x">
<div className="column-1" style={{ borderRight: '1px #fff solid', backgroundColor: '#37b5e6' }}>
<span>{"Amount"}</span>
</div>
<div className="column-2" style={{ borderLeft: '1px #fff solid', backgroundColor: '#37b5e6' }}>
<span>{"%"}</span>
</div>
</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, border: '1px #fff solid', backgroundColor: '#07a7d0' }}>
<div style={{ borderBottom: '1px #fff solid' }}> <div style={{ borderBottom: '1px #fff solid' }}>
<span>{"Act vs MB"}</span> <span>{"Act vs MB"}</span>
</div> </div>
...@@ -367,7 +329,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -367,7 +329,7 @@ export default class OperatingIndicatorMR extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, border: '1px #fff solid', backgroundColor: '#07a7d0' }}> <div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, border: '1px #fff solid', backgroundColor: '#07a7d0' }}>
<div style={{ borderBottom: '1px #fff solid' }}> <div style={{ borderBottom: '1px #fff solid' }}>
<span>{"Act vs RB"}</span> <span>{"Act vs RB"}</span>
</div> </div>
...@@ -392,28 +354,8 @@ export default class OperatingIndicatorMR extends Component { ...@@ -392,28 +354,8 @@ export default class OperatingIndicatorMR extends Component {
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (val, tableMeta, updateValue) => {
return ( return (
<div> <div>
<div className="grid grid-3x content-center"> <div className="grid grid-2x content-center">
<div className="column-1"> <div className="column-1">
<div className="grid grid-2x content-center">
<div className="column-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
val.aavpm
}
</div>
</div>
<div className="column-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
val.pavpm
}
</div>
</div>
</div>
</div>
<div className="column-2">
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="column-1"> <div className="column-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
...@@ -433,7 +375,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -433,7 +375,7 @@ export default class OperatingIndicatorMR extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className="column-3"> <div className="column-2">
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="column-1"> <div className="column-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
...@@ -468,14 +410,11 @@ export default class OperatingIndicatorMR extends Component { ...@@ -468,14 +410,11 @@ export default class OperatingIndicatorMR extends Component {
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */} </TableCell> */}
<div style={{ borderBottom: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 40 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 40 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-2x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45 }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45 }}>
<span>{"vs Prev Month"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45 }}>
<span>{"vs MB"}</span> <span>{"vs MB"}</span>
</div> </div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45 }}> <div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45 }}>
<span>{"vs RB"}</span> <span>{"vs RB"}</span>
</div> </div>
</div> </div>
...@@ -490,16 +429,8 @@ export default class OperatingIndicatorMR extends Component { ...@@ -490,16 +429,8 @@ export default class OperatingIndicatorMR extends Component {
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (val, tableMeta, updateValue) => {
return ( return (
<div> <div>
<div className="grid grid-3x content-center"> <div className="grid grid-2x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
val.mtdvpm
}
</div>
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : null :
...@@ -507,7 +438,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -507,7 +438,7 @@ export default class OperatingIndicatorMR extends Component {
} }
</div> </div>
</div> </div>
<div className="col-3"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : null :
...@@ -523,6 +454,10 @@ export default class OperatingIndicatorMR extends Component { ...@@ -523,6 +454,10 @@ export default class OperatingIndicatorMR extends Component {
}, },
] ]
let dataDummy = [
["", "", "", "", "", "acc", "uom", "rolling", { mb: "", rb: "", actual: "" }, { aavmb: "", pavmb: "", aavrb: "", pavrb: "" }, { mtdvmb: "", mtdvrb: "" }]
]
return ( return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}> <div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
...@@ -592,7 +527,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -592,7 +527,7 @@ export default class OperatingIndicatorMR extends Component {
{!this.state.loading && ( {!this.state.loading && (
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={this.state.dataTable} data={dataDummy}
columns={columns} columns={columns}
options={options} options={options}
/> />
......
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