Commit 1c0c294d authored by fahrur huzain's avatar fahrur huzain

issue dua digit MB dan MR

parent ccdba6ff
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -318,7 +318,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
})
// console.log(dataTable);
console.log(dataTable);
this.setState({ dataTable, loading: false, saveDraft: true }, () => {
this.handleCalculate(dataTable)
})
......@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetMR extends Component {
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={fixNumber(Number(value), 2) == 0 ? "0.0" : fixNumber(Number(value), 2)}
value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={true}
decimalScale={2}
......@@ -1761,7 +1761,7 @@ export default class CorporateAnnualTargetMR extends Component {
style={{ color: this.state.get_for == 'view' ? "black" : handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) ? "#5198ea" : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.0" : Number(value))}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.00" : Number(value))}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={this.state.get_for == 'view' ? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)}
decimalScale={2}
......@@ -1792,21 +1792,33 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<FormControlLabel
style={{ margin: 0 }}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.0" : Number(value)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.0" : Number(value)}
decimalScale={2}
disabled={true}
/>
}
/>
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled={true}
decimalScale={2}
/>
:
<FormControlLabel
style={{ margin: 0 }}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.defaultCurrency.id == 1 ? Number(value) == 0 ? "0.00" : fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
decimalScale={2}
disabled={true}
/>
}
/>
}
</div>
)
......@@ -1896,11 +1908,11 @@ export default class CorporateAnnualTargetMR extends Component {
value={handleScore(tableMeta)}
decimalScale={0}
disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // console.log(dataTable2)
// }}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // console.log(dataTable2)
// }}
/>
}
/>
......@@ -2115,10 +2127,10 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
......@@ -2302,10 +2314,10 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
......
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