Commit e489048d authored by Deni Rinaldi's avatar Deni Rinaldi

++

parent 96a2ed8f
...@@ -1686,8 +1686,28 @@ export default class BalanceSheet extends Component { ...@@ -1686,8 +1686,28 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ width: 96, textAlign: 'right' }}> <div style={{ width: 96, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 3 ?
null : tableMeta.rowData[0] === 2 ? <div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(value).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
console.log(dataTable2)
}}
/>
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1697,17 +1717,46 @@ export default class BalanceSheet extends Component { ...@@ -1697,17 +1717,46 @@ export default class BalanceSheet extends Component {
disabled={true} disabled={true}
value={Number(handleValue(tableMeta)).toFixed(1)} value={Number(handleValue(tableMeta)).toFixed(1)}
/> />
</span> : </span>
<span style={{ fontSize: 12, textAlign: 'right' }}> :
<NumberFormat tableMeta.rowData[0] === 4 ?
thousandSeparator={true} null
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} :
type="text" tableMeta.rowData[0] === 6 ?
placeholder="" <NumberFormat
disabled={true} thousandSeparator={true}
value={Number(handleTotal(tableMeta)).toFixed(1)} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
/> type="text"
</span>} placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 5 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 1 ?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null
:
null
}
</div> </div>
) )
} }
...@@ -2161,7 +2210,7 @@ export default class BalanceSheet extends Component { ...@@ -2161,7 +2210,7 @@ export default class BalanceSheet extends Component {
this.uploadBalanceSheet('draft') this.uploadBalanceSheet('draft')
}, 100); }, 100);
})} })}
style={{ marginRight: 20}} style={{ marginRight: 20 }}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</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