Commit 872932b3 authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

Faisal

See merge request !1388
parents 941b8816 b1c3259a
......@@ -81,7 +81,6 @@ export default class CorporateAnnualTargetRO extends Component {
this.getKPIType()
this.getMaxAch()
this.getLatestUpdate()
// this.getItemHierarki()
this.handleViewOnly()
}
......@@ -219,7 +218,6 @@ export default class CorporateAnnualTargetRO extends Component {
})
console.log(dataTable)
this.setState({ dataTable, loading: false, dataReal: res, editable: true }, () => {
// // // console.log(dataCustomerPrs)
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -244,7 +242,6 @@ export default class CorporateAnnualTargetRO extends Component {
handleGetFor(type) {
this.setState({ get_for: type }, () => {
// this.getSettingControl()
this.getLatestUpdate()
this.getItemHierarki()
})
......@@ -257,12 +254,12 @@ export default class CorporateAnnualTargetRO extends Component {
type: 'KPI_TYPE'
}
api.create().getAllSettingByType(body).then(response => {
// // // // // console.log(response)
// console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
let data = response.data.data
// // // // console.log(data)
// console.log(data)
let inputKPI = []
data.map((item) => {
......@@ -274,7 +271,7 @@ export default class CorporateAnnualTargetRO extends Component {
options: inputKPI,
getOptionLabel: (option) => titleCase(option.value),
};
// // // // console.log(defaultProps)
// console.log(defaultProps)
this.setState({ kpiTypeList: defaultProps })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
......@@ -315,9 +312,7 @@ export default class CorporateAnnualTargetRO extends Component {
options: inputMaxAch,
getOptionLabel: (option) => titleCase(option.value),
};
// setTimeout(() => {
this.setState({ maxAchList: defaultProps })
// }, 300);
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -769,12 +764,12 @@ export default class CorporateAnnualTargetRO extends Component {
if (forecast == undefined) {
let convertID = -1
if (tableMeta.rowData[11].value == 'FORMULA') {
let indexIDReport = dataTable2.findIndex((val) => val[1] == formulaAwal)
convertID = dataTable2[indexIDReport][31]
let indexID = dataTable2.findIndex((val) => val[31] == (convertID == -1 ? item : convertID))
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
anjay.push(valuezz == "" ? 0 : valuezz)
if (tableMeta.rowData[10].value == 'FORMULA') {
// let indexIDReport = dataTable2.findIndex((val) => val[1] == formulaAwal)
// convertID = dataTable2[indexIDReport][31]
// let indexID = dataTable2.findIndex((val) => val[31] == (convertID == -1 ? item : convertID))
// let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
// anjay.push(valuezz == "" ? 0 : valuezz)
} else {
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${formulaAwal}`) && val.periode == Number(this.props.periode))
if (indexID !== -1) {
......@@ -954,22 +949,6 @@ export default class CorporateAnnualTargetRO extends Component {
}
}
})
// if (dataTable2[tableMeta.rowIndex][6] == "NPAT" && forecast !== undefined) {
// // // console.log(tableMeta.rowData[3])
// // // console.log(splitFormula)
// // // console.log(baru)
// // // console.log(anjay)
// // // // console.log(item1)
// // // console.log(anjay2)
// // // console.log(total)
// }
// // // console.log(tableMeta.rowData[3])
// // // console.log(splitFormula)
// // // console.log(baru)
// // // console.log(anjay)
// // // console.log(item1)
// // // console.log(anjay2)
// // // console.log(total)
total = R.equals(total, NaN) ? "0.0" : total
// if (dataTable2[tableMeta.rowIndex][6] == "ROIC") {
......@@ -1359,7 +1338,7 @@ export default class CorporateAnnualTargetRO extends Component {
</TableCell>
),
customBodyRender: (value, tableMeta) => {
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
return (
<div style={{ width: 96 }}>
{
......@@ -1456,29 +1435,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1491,21 +1447,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1522,14 +1477,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1545,11 +1498,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -1581,29 +1535,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1616,21 +1547,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 5)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1640,21 +1570,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 5)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1670,11 +1598,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -1706,29 +1635,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1741,21 +1647,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 6)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1765,21 +1670,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 6)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1795,11 +1698,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -1831,29 +1735,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1866,21 +1747,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 7)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1890,21 +1770,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 7)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -1920,11 +1798,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -1956,29 +1835,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1991,21 +1847,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 8)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2015,21 +1870,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 8)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2045,11 +1898,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -2081,29 +1935,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2116,21 +1947,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 9)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2140,21 +1970,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 9)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2170,11 +1998,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -2206,29 +2035,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2241,21 +2047,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 10)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2265,21 +2070,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 10)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2295,11 +2098,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -2331,29 +2135,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2366,21 +2147,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 11)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2390,21 +2170,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 11)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2420,11 +2198,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -2456,29 +2235,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={tableMeta.rowData[0] === 6 ? Number(value.value).toFixed(1) : Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2491,21 +2247,20 @@ export default class CorporateAnnualTargetRO extends Component {
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 12)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2515,21 +2270,19 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(handleValueFormula(value, tableMeta, 12)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2545,11 +2298,12 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
}
</div>
)
}
......@@ -2581,30 +2335,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(handleTotal(tableMeta, 'roic')).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// />
// </div> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2616,22 +2346,22 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// value={Number(handleValueForecast(value, tableMeta, this.props.periode)).toFixed(1)}
value={Number(handleTotal(tableMeta)).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 || tableMeta.rowData[0] === 7 ?
// null
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2641,21 +2371,18 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
value={Number(handleValueFormula(value, tableMeta, 13)).toFixed(1)}
disabled
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -2671,11 +2398,11 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
/>
/>}
</div>
)
}
......@@ -2706,29 +2433,6 @@ export default class CorporateAnnualTargetRO extends Component {
value={Number(value).toFixed(1)}
/>
:
// tableMeta.rowData[5] === 'ROIC' ?
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// value={Number(value).toFixed(1)}
// disabled={true}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// /> :
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
(handleReturnFormula(tableMeta.rowData[2], tableMeta) ?
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2740,39 +2444,13 @@ export default class CorporateAnnualTargetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
}}
/>
}
/>
</div>
:
tableMeta.rowData[10].value === "FORMULA" ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
// value={Number(value).toFixed(1)}
disabled={true}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
......@@ -2795,7 +2473,7 @@ export default class CorporateAnnualTargetRO extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
// // // // console.log(tableMeta.rowData[0])
// console.log(tableMeta.rowData[0])
}}
/>
}
......@@ -2843,10 +2521,10 @@ export default class CorporateAnnualTargetRO extends Component {
disabled={this.props.quarter == 'q1' ? false : true}
defaultValue={value}
onBlur={(event) => {
// // // // console.log(event.target.value)
// console.log(event.target.value)
// updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta)
// // // // console.log(dataTable2)
// console.log(dataTable2)
}}
/>
</ThemeProvider>
......
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