Commit 0721b43f authored by Riri Novita's avatar Riri Novita

oi monthly

parent cf14827e
......@@ -83,11 +83,12 @@ export default class OperatingIndicatorMR extends Component {
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null
}
api.create().getLastestUpdateMROI(payload).then(response => {
// console.log(response.data)
console.log(response.data)
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notesUpdate: response.data.data.notes_update === null ? '-' : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -165,7 +166,7 @@ export default class OperatingIndicatorMR extends Component {
item.description,
item.uom === "" ? null : item.uom,
item.monthly_report.rolling_outlook === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_outlook,
item.monthly_report.master_budget === null ? "10.0" : item.monthly_report.rolling_outlook === "" ? "10.0" : item.monthly_report.master_budget,
item.monthly_report.master_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.master_budget,
item.monthly_report.rolling_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_budget,
item.monthly_report.actual === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.actual,
item.monthly_report.amount_act_vs_mb === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.amount_act_vs_mb,
......@@ -195,7 +196,7 @@ export default class OperatingIndicatorMR extends Component {
item.description,
item.uom === "" ? null : item.uom,
item.monthly_report.rolling_outlook === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_outlook,
item.monthly_report.master_budget === null ? "10.0" : item.monthly_report.rolling_outlook === "" ? "10.0" : item.monthly_report.master_budget,
item.monthly_report.master_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.master_budget,
item.monthly_report.rolling_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_budget,
item.monthly_report.actual === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.actual,
item.monthly_report.amount_act_vs_mb === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.amount_act_vs_mb,
......@@ -1356,15 +1357,15 @@ export default class OperatingIndicatorMR extends Component {
this.props.data.report_id === 22 ? 'Jan' :
this.props.data.report_id === 23 ? 'Feb' :
this.props.data.report_id === 24 ? 'Mar' :
this.props.data.report_id === 23 ? 'Apr' :
this.props.data.report_id === 23 ? 'May' :
this.props.data.report_id === 23 ? 'Jun' :
this.props.data.report_id === 23 ? 'Jul' :
this.props.data.report_id === 23 ? 'Aug' :
this.props.data.report_id === 23 ? 'Sep' :
this.props.data.report_id === 23 ? 'Oct' :
this.props.data.report_id === 23 ? 'Nov' :
this.props.data.report_id === 23 ? 'Dec' : "" } {this.props.data.periode}
this.props.data.report_id === 25 ? 'Apr' :
this.props.data.report_id === 26 ? 'May' :
this.props.data.report_id === 27 ? 'Jun' :
this.props.data.report_id === 28 ? 'Jul' :
this.props.data.report_id === 29 ? 'Aug' :
this.props.data.report_id === 30 ? 'Sep' :
this.props.data.report_id === 31 ? 'Oct' :
this.props.data.report_id === 32 ? 'Nov' :
this.props.data.report_id === 33 ? 'Dec' : "" } {this.props.data.periode}
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
......@@ -1427,6 +1428,7 @@ export default class OperatingIndicatorMR extends Component {
</MuiThemeProvider>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notesUpdate}</Typography>
</div>
<div className="grid grid-2x">
<div className="col-1">
......@@ -1522,15 +1524,15 @@ export default class OperatingIndicatorMR extends Component {
this.props.data.report_id === 22 ? 'Jan' :
this.props.data.report_id === 23 ? 'Feb' :
this.props.data.report_id === 24 ? 'Mar' :
this.props.data.report_id === 23 ? 'Apr' :
this.props.data.report_id === 23 ? 'May' :
this.props.data.report_id === 23 ? 'Jun' :
this.props.data.report_id === 23 ? 'Jul' :
this.props.data.report_id === 23 ? 'Aug' :
this.props.data.report_id === 23 ? 'Sep' :
this.props.data.report_id === 23 ? 'Oct' :
this.props.data.report_id === 23 ? 'Nov' :
this.props.data.report_id === 23 ? 'Dec' : "" } {this.props.data.periode}
this.props.data.report_id === 25 ? 'Apr' :
this.props.data.report_id === 26 ? 'May' :
this.props.data.report_id === 27 ? 'Jun' :
this.props.data.report_id === 28 ? 'Jul' :
this.props.data.report_id === 29 ? 'Aug' :
this.props.data.report_id === 30 ? 'Sep' :
this.props.data.report_id === 31 ? 'Oct' :
this.props.data.report_id === 32 ? 'Nov' :
this.props.data.report_id === 33 ? 'Dec' : "" } {this.props.data.periode}
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</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