Commit b1c3259a authored by faisalhamdi's avatar faisalhamdi

update ro cat!

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