Commit 34609fcd authored by Deni Rinaldi's avatar Deni Rinaldi

akhirnya bs bs

parent 6f1d5e77
...@@ -152,16 +152,16 @@ export default class BalanceSheetMR extends Component { ...@@ -152,16 +152,16 @@ export default class BalanceSheetMR extends Component {
item.balance_sheet.master_budget === "" ? "0" : item.balance_sheet.master_budget, item.balance_sheet.master_budget === "" ? "0" : item.balance_sheet.master_budget,
item.balance_sheet.rolling_budget === "" ? "0" : item.balance_sheet.rolling_budget, item.balance_sheet.rolling_budget === "" ? "0" : item.balance_sheet.rolling_budget,
item.balance_sheet.actual === "" ? "0" : item.balance_sheet.actual, item.balance_sheet.actual === "" ? "0" : item.balance_sheet.actual,
item.balance_sheet.actual_previous_month === null ? "0.0" : item.balance_sheet.actual_previous_month === "" ? "0.0" : item.balance_sheet.actual_previous_month, item.balance_sheet.actual_previous_month === null ? "100.0" : item.balance_sheet.actual_previous_month === "" ? "100.0" : item.balance_sheet.actual_previous_month,
item.balance_sheet.amount_act_vs_previous_month === "" ? "0" : item.balance_sheet.amount_act_vs_previous_month, item.balance_sheet.amount_act_vs_previous_month === "" ? "0" : item.balance_sheet.amount_act_vs_previous_month,
item.balance_sheet.percent_act_vs_previous_month === "" ? "0" : item.balance_sheet.percent_act_vs_previous_month, item.balance_sheet.percent_act_vs_previous_month === "" ? "0" : item.balance_sheet.percent_act_vs_previous_month,
item.balance_sheet.amount_act_vs_mb === "" ? "0" : item.balance_sheet.amount_act_vs_mb, item.balance_sheet.amount_act_vs_mb === "" ? "0" : item.balance_sheet.amount_act_vs_mb,
item.balance_sheet.percent_act_vs_mb === "" ? "0" : item.balance_sheet.percent_act_vs_mb, item.balance_sheet.percent_act_vs_mb === "" ? "0" : item.balance_sheet.percent_act_vs_mb,
item.balance_sheet.amount_act_vs_rb === "" ? "0" : item.balance_sheet.amount_act_vs_rb, item.balance_sheet.amount_act_vs_rb === "" ? "0" : item.balance_sheet.amount_act_vs_rb,
item.balance_sheet.percent_act_vs_rb === "" ? "0" : item.balance_sheet.percent_act_vs_rb, item.balance_sheet.percent_act_vs_rb === "" ? "0" : item.balance_sheet.percent_act_vs_rb,
item.balance_sheet.mtd_vs_previous_month === "" ? "-" : item.balance_sheet.mtd_vs_previous_month, item.balance_sheet.mtd_vs_previous_month === null ? "" : item.balance_sheet.mtd_vs_previous_month,
item.balance_sheet.mtd_vs_mb === "" ? "-" : item.balance_sheet.mtd_vs_mb, item.balance_sheet.mtd_vs_mb === null ? "" : item.balance_sheet.mtd_vs_mb,
item.balance_sheet.mtd_vs_rb === "" ? "-" : item.balance_sheet.mtd_vs_rb, item.balance_sheet.mtd_vs_rb === null ? "" : item.balance_sheet.mtd_vs_rb,
item.balance_sheet.actual_formula, item.balance_sheet.actual_formula,
item.order item.order
]) ])
...@@ -186,16 +186,16 @@ export default class BalanceSheetMR extends Component { ...@@ -186,16 +186,16 @@ export default class BalanceSheetMR extends Component {
item.balance_sheet.master_budget === "" ? "0" : item.balance_sheet.master_budget, item.balance_sheet.master_budget === "" ? "0" : item.balance_sheet.master_budget,
item.balance_sheet.rolling_budget === "" ? "0" : item.balance_sheet.rolling_budget, item.balance_sheet.rolling_budget === "" ? "0" : item.balance_sheet.rolling_budget,
item.balance_sheet.actual === "" ? "0" : item.balance_sheet.actual, item.balance_sheet.actual === "" ? "0" : item.balance_sheet.actual,
item.balance_sheet.actual_previous_month === null ? "0.0" : item.balance_sheet.actual_previous_month === "" ? "0.0" : item.balance_sheet.actual_previous_month, item.balance_sheet.actual_previous_month === null ? "100.0" : item.balance_sheet.actual_previous_month === "" ? "100.0" : item.balance_sheet.actual_previous_month,
item.balance_sheet.amount_act_vs_previous_month === "" ? "0" : item.balance_sheet.amount_act_vs_previous_month, item.balance_sheet.amount_act_vs_previous_month === "" ? "0" : item.balance_sheet.amount_act_vs_previous_month,
item.balance_sheet.percent_act_vs_previous_month === "" ? "0" : item.balance_sheet.percent_act_vs_previous_month, item.balance_sheet.percent_act_vs_previous_month === "" ? "0" : item.balance_sheet.percent_act_vs_previous_month,
item.balance_sheet.amount_act_vs_mb === "" ? "0" : item.balance_sheet.amount_act_vs_mb, item.balance_sheet.amount_act_vs_mb === "" ? "0" : item.balance_sheet.amount_act_vs_mb,
item.balance_sheet.percent_act_vs_mb === "" ? "0" : item.balance_sheet.percent_act_vs_mb, item.balance_sheet.percent_act_vs_mb === "" ? "0" : item.balance_sheet.percent_act_vs_mb,
item.balance_sheet.amount_act_vs_rb === "" ? "0" : item.balance_sheet.amount_act_vs_rb, item.balance_sheet.amount_act_vs_rb === "" ? "0" : item.balance_sheet.amount_act_vs_rb,
item.balance_sheet.percent_act_vs_rb === "" ? "0" : item.balance_sheet.percent_act_vs_rb, item.balance_sheet.percent_act_vs_rb === "" ? "0" : item.balance_sheet.percent_act_vs_rb,
item.balance_sheet.mtd_vs_previous_month === "" ? "-" : item.balance_sheet.mtd_vs_previous_month, item.balance_sheet.mtd_vs_previous_month === null ? "" : item.balance_sheet.mtd_vs_previous_month,
item.balance_sheet.mtd_vs_mb === "" ? "-" : item.balance_sheet.mtd_vs_mb, item.balance_sheet.mtd_vs_mb === null ? "" : item.balance_sheet.mtd_vs_mb,
item.balance_sheet.mtd_vs_rb === "" ? "-" : item.balance_sheet.mtd_vs_rb, item.balance_sheet.mtd_vs_rb === null ? "" : item.balance_sheet.mtd_vs_rb,
item.balance_sheet.actual_formula, item.balance_sheet.actual_formula,
item.order item.order
]) ])
...@@ -207,7 +207,7 @@ export default class BalanceSheetMR extends Component { ...@@ -207,7 +207,7 @@ export default class BalanceSheetMR extends Component {
} }
} }
}) })
this.setState({ dataTable, loading: false }) this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true })
} }
console.log(dataTable); console.log(dataTable);
}) })
...@@ -323,11 +323,11 @@ export default class BalanceSheetMR extends Component { ...@@ -323,11 +323,11 @@ export default class BalanceSheetMR extends Component {
] ]
}) })
console.log(dataTable) console.log(dataTable)
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false }, () => {
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[22].length > 0) { if (item[22].length > 0) {
// console.log('masuk') // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true })
} }
}) })
// console.log(this.state.buttonError) // console.log(this.state.buttonError)
...@@ -441,8 +441,8 @@ export default class BalanceSheetMR extends Component { ...@@ -441,8 +441,8 @@ export default class BalanceSheetMR extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
// console.log(this.state.dataTable) let err = false
this.state.dataTable.map(i => { this.state.dataTable.map((i, index) => {
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"rolling_outlook": i[6], "rolling_outlook": i[6],
...@@ -460,40 +460,59 @@ export default class BalanceSheetMR extends Component { ...@@ -460,40 +460,59 @@ export default class BalanceSheetMR extends Component {
"mtd_vs_mb": i[18], "mtd_vs_mb": i[18],
"mtd_vs_rb": i[19] "mtd_vs_rb": i[19]
}) })
}) if (i[17] === "" && (Number(i[12]) < this.state.minValue || Number(i[12]) > this.state.maxValue)) {
// console.log(JSON.stringify(data)) console.log('msk 1');
let payload = { err = true
"monthly_report_id": this.props.monthlyReportId, } else if (i[18] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) {
"company_id": this.props.company.company_id, console.log('msk 2');
"periode": this.props.periode, err = true
"report_id": this.props.report_id, } else if (i[19] === "" && (Number(i[16]) < this.state.minValue || Number(i[16]) > this.state.maxValue)) {
"status": "submitted", console.log('msk 3');
"months": this.props.month.month_id, err = true
"balance_sheet": data
}
api.create().validateSubmitReportMR(payload).then((response) => {
// console.log(response)
if (response.data) {
if (response.data.status === "success") {
if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
} else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
console.log(JSON.stringify(data));
if (err === true) {
console.log('error');
this.setState({ loading: false, buttonError: true, saveDraft: false })
} else {
console.log('g error');
this.setState({ loading: false, buttonError: false, saveDraft: false })
}
// console.log(JSON.stringify(data))
// let payload = {
// "monthly_report_id": this.props.monthlyReportId,
// "company_id": this.props.company.company_id,
// "periode": this.props.periode,
// "report_id": this.props.report_id,
// "status": "submitted",
// "months": this.props.month.month_id,
// "balance_sheet": data
// }
// api.create().validateSubmitReportMR(payload).then((response) => {
// console.log(response)
// if (response.data) {
// if (response.data.status === "success") {
// if (response.data.data.result) {
// this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
// } else {
// this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
// if (response.data.message.includes("Someone Logged In")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
// }
// })
} }
render() { render() {
...@@ -1278,40 +1297,23 @@ export default class BalanceSheetMR extends Component { ...@@ -1278,40 +1297,23 @@ export default class BalanceSheetMR extends Component {
<div style={{ textAlign: 'right', width: 120 }}> <div style={{ textAlign: 'right', width: 120 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null : null :
Number(tableMeta.rowData[12]) <= this.state.minValue || Number(tableMeta.rowData[12]) >= this.state.maxValue ? <div style={{ flex: 1 }}>
<div style={{ flex: 1 }}> <FormControlLabel
<FormControlLabel style={{ margin: 0 }}
style={{ margin: 0 }} value={val}
value={val} control={
control={ <NumberFormat
<NumberFormat thousandSeparator={true}
thousandSeparator={true} style={{ color: Number(tableMeta.rowData[12]) < this.state.minValue || Number(tableMeta.rowData[12]) > this.state.maxValue ? 'red' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: 'red', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} type="text"
type="text" placeholder=""
placeholder="" suffix={'%'}
disabled={true} disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 3)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 1, 3)).toFixed(1)}
/> />
} }
/> />
</div> : </div>
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 3)).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
</div> </div>
...@@ -1346,40 +1348,23 @@ export default class BalanceSheetMR extends Component { ...@@ -1346,40 +1348,23 @@ export default class BalanceSheetMR extends Component {
<div style={{ textAlign: 'right', width: 120 }}> <div style={{ textAlign: 'right', width: 120 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null : null :
Number(tableMeta.rowData[14]) <= this.state.minValue || Number(tableMeta.rowData[14]) >= this.state.maxValue ? <div style={{ flex: 1 }}>
<div style={{ flex: 1 }}> <FormControlLabel
<FormControlLabel style={{ margin: 0 }}
style={{ margin: 0 }} value={val}
value={val} control={
control={ <NumberFormat
<NumberFormat thousandSeparator={true}
thousandSeparator={true} style={{ color: Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue ? 'red' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: 'red', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} type="text"
type="text" placeholder=""
placeholder="" disabled={true}
disabled={true} suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 2, 5)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 2, 5)).toFixed(1)}
/> />
} }
/> />
</div> : </div>
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 2, 5)).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
</div> </div>
...@@ -1414,40 +1399,23 @@ export default class BalanceSheetMR extends Component { ...@@ -1414,40 +1399,23 @@ export default class BalanceSheetMR extends Component {
<div style={{ textAlign: 'right', width: 120 }}> <div style={{ textAlign: 'right', width: 120 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null : null :
Number(tableMeta.rowData[16]) <= this.state.minValue || Number(tableMeta.rowData[16]) >= this.state.maxValue ? <div style={{ flex: 1 }}>
<div style={{ flex: 1 }}> <FormControlLabel
<FormControlLabel style={{ margin: 0 }}
style={{ margin: 0 }} value={val}
value={val} control={
control={ <NumberFormat
<NumberFormat thousandSeparator={true}
thousandSeparator={true} style={{ color: Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue ? 'red' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: 'red', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} type="text"
type="text" placeholder=""
placeholder="" disabled={true}
disabled={true} suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 3, 7)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 3, 7)).toFixed(1)}
/> />
} }
/> />
</div> : </div>
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 3, 7)).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
</div> </div>
...@@ -1499,23 +1467,45 @@ export default class BalanceSheetMR extends Component { ...@@ -1499,23 +1467,45 @@ export default class BalanceSheetMR extends Component {
style={{ margin: 0 }} style={{ margin: 0 }}
// value={value} // value={value}
control={ control={
<Input tableMeta.rowData[17] === "" && (Number(tableMeta.rowData[12]) < this.state.minValue || Number(tableMeta.rowData[12]) > this.state.maxValue) ?
disableUnderline={true} <LightTooltip title={"MTD Explanation vs Prev Month is Reqiured"} arrow>
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} <Input
type="text" disableUnderline={true}
placeholder="" style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
disabled={Number(tableMeta.rowData[12]) <= this.state.minValue || Number(tableMeta.rowData[12]) >= this.state.maxValue ? false : true} type="text"
defaultValue={tableMeta.rowData[17]} placeholder=""
inputProps={{ disabled={false}
style: { defaultValue={tableMeta.rowData[17]}
color: Number(tableMeta.rowData[12]) <= this.state.minValue || Number(tableMeta.rowData[12]) >= this.state.maxValue ? "#5198ea" : 'black', inputProps={{
textAlign: 'right' style: {
} color: "#5198ea",
}} textAlign: 'right',
onBlur={(event) => { backgroundColor: '#ffac99'
handleText(event.target.value, tableMeta, 17) }
}} }}
/> onBlur={(event) => {
handleText(event.target.value, tableMeta, 17)
}}
/>
</LightTooltip>
:
<Input
disableUnderline={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={Number(tableMeta.rowData[12]) < this.state.minValue || Number(tableMeta.rowData[12]) > this.state.maxValue ? false : true}
defaultValue={tableMeta.rowData[17]}
inputProps={{
style: {
color: Number(tableMeta.rowData[12]) < this.state.minValue || Number(tableMeta.rowData[12]) > this.state.maxValue ? "#5198ea" : 'black',
textAlign: 'right'
}
}}
onBlur={(event) => {
handleText(event.target.value, tableMeta, 17)
}}
/>
} }
/>} />}
</div> </div>
...@@ -1529,23 +1519,45 @@ export default class BalanceSheetMR extends Component { ...@@ -1529,23 +1519,45 @@ export default class BalanceSheetMR extends Component {
style={{ margin: 0 }} style={{ margin: 0 }}
// value={value} // value={value}
control={ control={
<Input tableMeta.rowData[18] === "" && (Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue) ?
disableUnderline={true} <LightTooltip title={"MTD Explanation vs MB is Reqiured"} arrow>
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} <Input
type="text" disableUnderline={true}
placeholder="" style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
disabled={Number(tableMeta.rowData[14]) <= this.state.minValue || Number(tableMeta.rowData[14]) >= this.state.maxValue ? false : true} type="text"
defaultValue={tableMeta.rowData[18]} placeholder=""
inputProps={{ disabled={false}
style: { defaultValue={tableMeta.rowData[18]}
color: Number(tableMeta.rowData[14]) <= this.state.minValue || Number(tableMeta.rowData[14]) >= this.state.maxValue ? "#5198ea" : 'black', inputProps={{
textAlign: 'right' style: {
} color: "#5198ea",
}} textAlign: 'right',
onBlur={(event) => { backgroundColor: '#ffac99'
handleText(event.target.value, tableMeta, 18) }
}} }}
/> onBlur={(event) => {
handleText(event.target.value, tableMeta, 18)
}}
/>
</LightTooltip>
:
<Input
disableUnderline={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue ? false : true}
defaultValue={tableMeta.rowData[18]}
inputProps={{
style: {
color: Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue ? "#5198ea" : 'black',
textAlign: 'right'
}
}}
onBlur={(event) => {
handleText(event.target.value, tableMeta, 18)
}}
/>
} }
/>} />}
</div> </div>
...@@ -1559,23 +1571,45 @@ export default class BalanceSheetMR extends Component { ...@@ -1559,23 +1571,45 @@ export default class BalanceSheetMR extends Component {
style={{ margin: 0 }} style={{ margin: 0 }}
// value={value} // value={value}
control={ control={
<Input tableMeta.rowData[19] === "" && (Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue) ?
disableUnderline={true} <LightTooltip title={"MTD Explanation vs RB is Reqiured"} arrow>
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} <Input
type="text" disableUnderline={true}
placeholder="" style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
disabled={Number(tableMeta.rowData[16]) <= this.state.minValue || Number(tableMeta.rowData[16]) >= this.state.maxValue ? false : true} type="text"
defaultValue={tableMeta.rowData[19]} placeholder=""
inputProps={{ disabled={false}
style: { defaultValue={tableMeta.rowData[19]}
color: Number(tableMeta.rowData[16]) <= this.state.minValue || Number(tableMeta.rowData[16]) >= this.state.maxValue ? "#5198ea" : 'black', inputProps={{
textAlign: 'right' style: {
} color: "#5198ea",
}} textAlign: 'right',
onBlur={(event) => { backgroundColor: '#ffac99'
handleText(event.target.value, tableMeta, 19) }
}} }}
/> onBlur={(event) => {
handleText(event.target.value, tableMeta, 19)
}}
/>
</LightTooltip>
:
<Input
disableUnderline={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue ? false : true}
defaultValue={tableMeta.rowData[19]}
inputProps={{
style: {
color: Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue ? "#5198ea" : 'black',
textAlign: 'right'
}
}}
onBlur={(event) => {
handleText(event.target.value, tableMeta, 19)
}}
/>
} }
/>} />}
</div> </div>
...@@ -1746,7 +1780,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1746,7 +1780,7 @@ export default class BalanceSheetMR extends Component {
</div> </div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{!this.state.loading && ( {/* {!this.state.loading && ( */}
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
...@@ -1754,7 +1788,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1754,7 +1788,7 @@ export default class BalanceSheetMR extends Component {
options={options} options={options}
/> />
</MuiThemeProvider> </MuiThemeProvider>
)} {/* )} */}
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
...@@ -1871,7 +1905,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1871,7 +1905,7 @@ export default class BalanceSheetMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{!this.state.loading && ( {/* {!this.state.loading && ( */}
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
...@@ -1879,7 +1913,7 @@ export default class BalanceSheetMR extends Component { ...@@ -1879,7 +1913,7 @@ export default class BalanceSheetMR extends Component {
options={options} options={options}
/> />
</MuiThemeProvider> </MuiThemeProvider>
)} {/* )} */}
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1">
......
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