Commit 6a9f9e77 authored by Deni Rinaldi's avatar Deni Rinaldi

papalipapali

parent 7df99554
......@@ -200,14 +200,17 @@ export default class BudgetTahunan extends Component {
item.revision
]
})
let dataTableRevision = response.data.data.map((item, index) => {
return [
let dataTableRevision = []
response.data.data.map((item, index) => {
if (item.report_name !== 'Cash Flow') {
dataTableRevision.push([
item.report_id,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name,
""
]
])
}
})
// console.log(dataTable);
// console.log(dataTableRevision);
this.setState({ dataTable, loading: false, dataTableRevision, dataForRevision: response.data.data }, ()=> {
document.body.style.overflow = 'unset';
})
......
......@@ -37,13 +37,33 @@ export default class CashFlow extends Component {
super(props)
this.state = {
dataTable: [],
loading: false
loading: false,
minValue: "0",
maxValue: "0"
}
}
componentDidMount() {
this.setState({ loading: true })
this.getSettingControl()
}
getSettingControl() {
let body = {
group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id,
type: 'CASH_FLOW'
}
api.create().getAllSettingByType(body).then(response => {
console.log(response);
this.setState({
minValue: response.data.data[0] ? response.data.data[0].min_value : null,
maxValue: response.data.data[0] ? response.data.data[0].max_value : null,
}, () => {
this.getItemHierarki()
})
})
}
getItemHierarki() {
......@@ -585,7 +605,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -601,26 +621,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -698,7 +700,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -714,26 +716,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -748,7 +732,7 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -811,7 +795,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -827,26 +811,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -934,7 +900,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -950,26 +916,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1059,7 +1007,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1075,26 +1023,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1182,7 +1112,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1198,26 +1128,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1305,7 +1217,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1321,26 +1233,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1428,7 +1322,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1444,26 +1338,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1553,7 +1429,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1569,26 +1445,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1676,7 +1534,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1692,26 +1550,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1799,7 +1639,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1815,26 +1655,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -1922,7 +1744,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1938,26 +1760,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -2074,7 +1878,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(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
thousandSeparator={true}
style={{
......@@ -2090,26 +1894,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......@@ -2173,7 +1959,7 @@ export default class CashFlow extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ?
(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2189,26 +1975,8 @@ export default class CashFlow extends Component {
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} 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
thousandSeparator={true}
style={{
......
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