Commit 6b26d654 authored by Riri Novita's avatar Riri Novita

oioi

parent ec9c55ae
......@@ -396,6 +396,7 @@ export default class OperatingIndicatorMR extends Component {
monthly_report: payload
}
console.log(body)
console.log(JSON.stringify(body));
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
}
});
......@@ -409,11 +410,22 @@ export default class OperatingIndicatorMR extends Component {
if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleOI: false, loading: true })
let total = 0
let err = false
let dataTable = response.data.data.map((item, index) => {
console.log(item);
if (item.type_report_id != null) {
total += 1
}
// if (item.type_report_id === 3) {
// if (item.mtd_vs_mb === "" && (Number(item.percent_act_vs_mb) < this.state.minValue || Number(item.percent_act_vs_mb) > this.state.maxValue)) {
// err = true
// }
// if (item.mtd_vs_rb === "" && (Number(item.percent_act_vs_rb) < this.state.minValue || Number(item.percent_act_vs_rb) > this.state.maxValue)) {
// console.log('msk 2');
// err = true
// }
// }
return [
item.type_report_id,
item.item_report_id,
......@@ -440,6 +452,7 @@ export default class OperatingIndicatorMR extends Component {
item.error
]
})
console.log(dataTable);
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, templateNull : total > 0 ? true : false })
}
}
......@@ -1397,7 +1410,7 @@ export default class OperatingIndicatorMR extends Component {
defaultValue={tableMeta.rowData[15]}
inputProps={{
style: {
color: Number(tableMeta.rowData[12]) < this.state.minValue || Number(tableMeta.rowData[12]) > this.state.maxValue ? "#5198ea" : '#5198ea',
color: Number(tableMeta.rowData[12]) < this.state.minValue || Number(tableMeta.rowData[12]) > this.state.maxValue ? "#000000b0" : '#000000b0',
textAlign: 'left'
}
}}
......@@ -1477,7 +1490,7 @@ export default class OperatingIndicatorMR extends Component {
defaultValue={tableMeta.rowData[16]}
inputProps={{
style: {
color: Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue ? "#5198ea" : '#5198ea',
color: Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue ? "#000000b0" : '#000000b0',
textAlign: 'left'
}
}}
......
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