Commit a176aeb3 authored by ardiansyah's avatar ardiansyah

Merge branch 'dev/ardi' into 'ENV-DEV'

Update Master Budget Cashflow

See merge request !1635
parents 489b14c4 507224fb
...@@ -2850,93 +2850,96 @@ export default class CashFlow extends Component { ...@@ -2850,93 +2850,96 @@ export default class CashFlow extends Component {
options: { options: {
display: false display: false
} }
}, { },
name: "", // {
options: { // name: "",
display: false // options: {
} // display: false
}, { // }
name: "", // },
options: { // {
display: false, // name: "",
customHeadRender: (columnMeta) => ( // options: {
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} > // display: false,
{/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> // customHeadRender: (columnMeta) => (
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> // <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
</TableCell> */} // {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> // <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> // </TableCell> */}
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}> // <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<span>{"ForeCast"}</span> // <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
</div> // <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
</div> // <span>{"ForeCast"}</span>
</th> // </div>
), // </div>
setCellProps: () => ({ style2 }), // </th>
customBodyRender: (value, tableMeta, updateValue) => { // ),
return ( // setCellProps: () => ({ style2 }),
<div style={{ textAlign: 'right' }}> // customBodyRender: (value, tableMeta, updateValue) => {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? // return (
null // <div style={{ textAlign: 'right' }}>
: // {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
tableMeta.rowData[0] === 7 ? // null
(Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1) <= Number(this.state.maxValue)) ? // :
<NumberFormat // tableMeta.rowData[0] === 7 ?
thousandSeparator={true} // (Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1) <= Number(this.state.maxValue)) ?
style={{ // <NumberFormat
fontSize: 12, // thousandSeparator={true}
textAlign: 'right', // style={{
borderColor: 'transparent', // fontSize: 12,
margin: 0, // textAlign: 'right',
width: 96, // borderColor: 'transparent',
backgroundColor: 'transparent', // margin: 0,
color: 'black' // width: 96,
}} // backgroundColor: 'transparent',
type="text" // color: 'black'
placeholder="" // }}
disabled={true} // type="text"
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)} // placeholder=""
/> : // disabled={true}
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> // value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
<NumberFormat // /> :
thousandSeparator={true} // <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
style={{ // <NumberFormat
fontSize: 12, // thousandSeparator={true}
textAlign: 'right', // style={{
borderColor: 'transparent', // fontSize: 12,
margin: 0, // textAlign: 'right',
width: 96, // borderColor: 'transparent',
backgroundColor: 'transparent', // margin: 0,
color: 'red' // width: 96,
}} // backgroundColor: 'transparent',
type="text" // color: 'red'
placeholder="" // }}
disabled={true} // type="text"
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)} // placeholder=""
/> // disabled={true}
</LightTooltip> // value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
: // />
<div style={{ flex: 1 }}> // </LightTooltip>
<FormControlLabel // :
style={{ margin: 0 }} // <div style={{ flex: 1 }}>
value={value} // <FormControlLabel
control={ // style={{ margin: 0 }}
<NumberFormat // value={value}
thousandSeparator={true} // control={
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // <NumberFormat
type="text" // thousandSeparator={true}
placeholder="" // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
disabled={true} // type="text"
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)} // placeholder=""
/> // disabled={true}
} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/> // />
</div>} // }
</div> // />
) // </div>}
} // </div>
} // )
}, { // }
// }
// },
{
name: `Current`, name: `Current`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
...@@ -2959,43 +2962,43 @@ export default class CashFlow extends Component { ...@@ -2959,43 +2962,43 @@ export default class CashFlow extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null null
: :
tableMeta.rowData[0] === 7 ? // tableMeta.rowData[0] === 7 ?
(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) <= Number(this.state.maxValue)) ? // (Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ // style={{
fontSize: 12, // fontSize: 12,
textAlign: 'right', // textAlign: 'right',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 0, // margin: 0,
width: 96, // width: 96,
backgroundColor: 'transparent', // backgroundColor: 'transparent',
color: 'black' // color: 'black'
}} // }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/> : // /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> // <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ // style={{
fontSize: 12, // fontSize: 12,
textAlign: 'right', // textAlign: 'right',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 0, // margin: 0,
width: 96, // width: 96,
backgroundColor: 'transparent', // backgroundColor: 'transparent',
color: 'red' // color: 'red'
}} // }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/> // />
</LightTooltip> // </LightTooltip>
: // :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -3007,7 +3010,8 @@ export default class CashFlow extends Component { ...@@ -3007,7 +3010,8 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
value={value}
/> />
} }
/> />
...@@ -3016,7 +3020,8 @@ export default class CashFlow extends Component { ...@@ -3016,7 +3020,8 @@ export default class CashFlow extends Component {
) )
} }
} }
},{ },
{
name: `${Number(this.props.periode) + 1}`, name: `${Number(this.props.periode) + 1}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
......
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