Commit 369f2fe7 authored by d.arizona's avatar d.arizona

apdet paling susah

parent 8bb935da
...@@ -110,6 +110,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -110,6 +110,7 @@ export default class CorporateAnnualTarget extends Component {
const handlePushChild = (item) => { const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id) let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) { if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
dataTable.push([ dataTable.push([
item.type_report_id, item.type_report_id,
item.id, item.id,
...@@ -119,7 +120,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -119,7 +120,7 @@ export default class CorporateAnnualTarget extends Component {
"", "",
item.description, item.description,
item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : item.cat.weight, item.type_report_id == 1 ? `${Number(item.weight) * 100}%` : item.cat.weight,
item.cat.uom, parentTrue? item.cat.uom : item.uom,
item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type }, item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type },
item.cat.max_ach == "" ? null : { value: item.cat.max_ach }, item.cat.max_ach == "" ? null : { value: item.cat.max_ach },
item.cat.formula == "" ? null : { value: item.cat.formula }, item.cat.formula == "" ? null : { value: item.cat.formula },
...@@ -296,6 +297,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -296,6 +297,7 @@ export default class CorporateAnnualTarget extends Component {
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
status: '',
cat: payload cat: payload
} }
console.log(body) console.log(body)
...@@ -308,6 +310,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -308,6 +310,7 @@ export default class CorporateAnnualTarget extends Component {
let dataDelete = this.state.dataDelete let dataDelete = this.state.dataDelete
api.create().getIdDeleteFromExcel(this.state.payload).then((response) => { api.create().getIdDeleteFromExcel(this.state.payload).then((response) => {
if (response.data) { if (response.data) {
// console.log(response.data)
let idDelete = response.data.data.item_report_id let idDelete = response.data.data.item_report_id
if (idDelete.length > 0) { if (idDelete.length > 0) {
idDelete.map((item, index) => { idDelete.map((item, index) => {
...@@ -317,7 +320,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -317,7 +320,7 @@ export default class CorporateAnnualTarget extends Component {
} }
} }
}) })
console.log(JSON.stringify(this.state.payload))
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
console.log(response) console.log(response)
...@@ -450,13 +453,47 @@ export default class CorporateAnnualTarget extends Component { ...@@ -450,13 +453,47 @@ export default class CorporateAnnualTarget extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
console.log(this.state.dataTable) console.log(this.state.dataTable)
this.state.dataTable.map(i => { let totalWeight = 0
// console.log(i[9] == null? "" : i[9].value) let dataTableBaru = this.state.dataTable
let dataTampung = []
let weightReal = null
this.state.dataTable.map((i, index) => {
if (i[0] ==1) {
dataTampung.push({
id: i[1],
maxValue: i[7],
valChild: 0
})
}
if (i[0] !== 1 && i[0] !== 4) {
totalWeight += Number(i[7] == "" || i[7] == undefined? 0 : i[7].replace('%', ''))
}
if (i[2] !== null) {
let indexID = dataTampung.findIndex((val) => val.id == i[2])
if (indexID !== -1) {
let weightParent = Number(dataTampung[indexID].maxValue == "" || dataTampung[indexID].maxValue == undefined? 0 : dataTampung[indexID].maxValue.replace('%', ''))
let valChild = Number(dataTampung[indexID].valChild)
let valReal = Number(i[7] == "" || i[7] == undefined? 0 : i[7].replace('%', ''))
let totalBaru = valChild + valReal
if (totalBaru > weightParent) {
dataTableBaru[index][7] = `${(weightParent - valChild)}%`
dataTampung[indexID].valChild = dataTampung[indexID].valChild + weightParent - valChild
weightReal = `${(weightParent - valChild)}%`
} else {
dataTableBaru[index][7] = i[7]
weightReal = i[7]
dataTampung[indexID].valChild = dataTampung[indexID].valChild + Number(i[7] == "" || i[7] == undefined? 0 : i[7].replace('%', ''))
}
}
}
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"item_name": i[1] == "" ? null : String(i[6]), "item_name": i[6] == "" ? null : String(i[6]),
"parent": i[1] == "" ? null : i[2], "parent": i[2] == "" ? null : i[2],
"weight": String(i[7]), "weight": weightReal == null? String(i[7]) : weightReal,
"uom": String(i[8]), "uom": String(i[8]),
"kpi_type": i[9] == null ? "" : i[9].value, "kpi_type": i[9] == null ? "" : i[9].value,
"max_ach": i[10] == null ? "" : i[10].value, "max_ach": i[10] == null ? "" : i[10].value,
...@@ -481,6 +518,8 @@ export default class CorporateAnnualTarget extends Component { ...@@ -481,6 +518,8 @@ export default class CorporateAnnualTarget extends Component {
"pic": String(i[29]) "pic": String(i[29])
}) })
}) })
console.log(dataTableBaru)
console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
let payload = { let payload = {
"submission_id": this.props.submissionID, "submission_id": this.props.submissionID,
...@@ -490,16 +529,10 @@ export default class CorporateAnnualTarget extends Component { ...@@ -490,16 +529,10 @@ export default class CorporateAnnualTarget extends Component {
"status": "submitted", "status": "submitted",
"cat": data "cat": data
} }
let totalWeight = 0
this.state.dataTable.map((items, indexs) => {
if (items[0] !== 1 || items[0] !== 4) {
console.log(items[7])
totalWeight += Number(items[7].replace('%', ''))
}
})
console.log(totalWeight) console.log(totalWeight)
// this.setState({dataTable: dataTampung})
if (totalWeight < 100) { if (totalWeight < 100) {
this.setState({ alert: true, messageAlert: 'Total weight less than 100%', tipeAlert: 'warning', loading: false, buttonError: true, editable: true }) this.setState({ alert: true, messageAlert: 'Total weight less than 100%', tipeAlert: 'warning', loading: false, buttonError: true, editable: true})
} else { } else {
api.create().validateSubmitReport(payload).then((response) => { api.create().validateSubmitReport(payload).then((response) => {
console.log(response) console.log(response)
...@@ -581,7 +614,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -581,7 +614,7 @@ export default class CorporateAnnualTarget extends Component {
// }) // })
}) })
} else { } else {
console.log('sini jing') // console.log('sini jing')
// api.create().validateSubmitReport(payloadBro).then((response) => { // api.create().validateSubmitReport(payloadBro).then((response) => {
// console.log(response) // console.log(response)
// if (response.data.data.result) { // if (response.data.data.result) {
...@@ -702,21 +735,21 @@ export default class CorporateAnnualTarget extends Component { ...@@ -702,21 +735,21 @@ export default class CorporateAnnualTarget extends Component {
let dataDelete = this.state.dataDelete let dataDelete = this.state.dataDelete
const handleChange = (value, tableMeta) => { const handleChange = (value, tableMeta) => {
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
let total = 0 // let total = 0
let lastValz = 0 // let lastValz = 0
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
dataTable2[tableMeta.rowIndex].map((item, index) => { // dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 13 && index <= 24) { // if (index >= 13 && index <= 24) {
let valItem = item == undefined || item == "" ? 0 : item // let valItem = item == undefined || item == "" ? 0 : item
total += Number(valItem) // total += Number(valItem)
if (index == 24) { // if (index == 24) {
lastValz += Number(valItem) // lastValz += Number(valItem)
} // }
} // }
}) // })
let valz = dataTable2[tableMeta.rowIndex][11] == null ? 'SUM' : dataTable2[tableMeta.rowIndex][11].value // let valz = dataTable2[tableMeta.rowIndex][11] == null ? 'SUM' : dataTable2[tableMeta.rowIndex][11].value
dataTable2[tableMeta.rowIndex][25] = (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz)) // dataTable2[tableMeta.rowIndex][25] = (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz))
console.log(dataTable2[tableMeta.rowIndex]) // console.log(dataTable2[tableMeta.rowIndex])
} }
const handleChangeDropdown = (value, tableMeta) => { const handleChangeDropdown = (value, tableMeta) => {
...@@ -739,36 +772,33 @@ export default class CorporateAnnualTarget extends Component { ...@@ -739,36 +772,33 @@ export default class CorporateAnnualTarget extends Component {
} }
const handleChangePercentage = (value, tableMeta) => { const handleChangePercentage = (value, tableMeta) => {
let valueReal = value.replace('%', '') // let valueReal = value.replace('%', '')
let indexParentDatatable = dataTable2.findIndex((val) => val[1] == tableMeta.rowData[2]) // let indexParentDatatable = dataTable2.findIndex((val) => val[1] == tableMeta.rowData[2])
let indexParentReal = this.state.dataReal.findIndex((val) => val.id == tableMeta.rowData[2]) // let indexParentReal = this.state.dataReal.findIndex((val) => val.id == tableMeta.rowData[2])
// console.log(indexParentDatatable) // let valParent = dataTable2[indexParentDatatable][7]
// console.log(indexParentReal) // valParent.replace('%', '')
let valParent = dataTable2[indexParentDatatable][7] // let valChild = 0
valParent.replace('%', '')
let valChild = 0
dataTable2.map((item, index) => { // dataTable2.map((item, index) => {
if (item[2] == dataTable2[indexParentDatatable][1] && item[1] !== tableMeta.rowData[1]) { // if (item[2] == dataTable2[indexParentDatatable][1] && item[1] !== tableMeta.rowData[1]) {
let weightItem = item[7] == "" ? 0 : item[7].replace('%', '') // let weightItem = item[7] == "" ? 0 : item[7].replace('%', '')
console.log(weightItem) // console.log(weightItem)
valChild += Number(weightItem) // valChild += Number(weightItem)
} // }
}) // })
let endVal = '' // let endVal = ''
// console.log(Number(valueReal) + Number(valChild)) // if ((Number(valueReal) + Number(valChild)) > Number(valParent.replace('%', ''))) {
// console.log(valueReal) // endVal = `${Number(valParent.replace('%', '')) - (Number(valChild))}%`
// console.log(Number(valParent.replace('%', '')))
if ((Number(valueReal) + Number(valChild)) > Number(valParent.replace('%', ''))) {
endVal = `${Number(valParent.replace('%', '')) - (Number(valChild))}%`
console.log(endVal)
} else {
endVal = `${Number(valueReal)}%`
console.log(endVal)
}
// console.log(endVal) // console.log(endVal)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = endVal // } else {
// endVal = `${Number(valueReal)}%`
// console.log(endVal)
// }
// // console.log(endVal)
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = endVal
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
} }
const handleChangeText = (value, tableMeta) => { const handleChangeText = (value, tableMeta) => {
...@@ -851,6 +881,24 @@ export default class CorporateAnnualTarget extends Component { ...@@ -851,6 +881,24 @@ export default class CorporateAnnualTarget extends Component {
}) })
} }
const handleTotal = (tableMeta) => {
// let val = String(value).split(",").join("")
let total = 0
let lastValz = 0
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 13 && index <= 24) {
let valItem = item == undefined || item == "" ? 0 : item
total += Number(valItem)
if (index == 24) {
lastValz += Number(valItem)
}
}
})
let valz = dataTable2[tableMeta.rowIndex][11] == null ? 'SUM' : dataTable2[tableMeta.rowIndex][11].value
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz))
return (valz == 'SUM' ? total : (valz == 'AVG' ? (total / 12) : lastValz))
}
const columns = [{ const columns = [{
name: "", name: "",
options: { options: {
...@@ -965,8 +1013,8 @@ export default class CorporateAnnualTarget extends Component { ...@@ -965,8 +1013,8 @@ export default class CorporateAnnualTarget extends Component {
</div> </div>
: :
<div style={{ width: 300 }}> <div style={{ width: 300 }}>
{tableMeta.rowData[22] ? {tableMeta.rowData[30] ?
tableMeta.rowData[22].length > 0 ? tableMeta.rowData[30].length > 0 ?
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}> <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<LightTooltip title={"Report Items Not Registered"} arrow> <LightTooltip title={"Report Items Not Registered"} arrow>
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span> <span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
...@@ -1232,7 +1280,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1232,7 +1280,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1273,7 +1321,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1273,7 +1321,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1314,7 +1362,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1314,7 +1362,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1355,7 +1403,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1355,7 +1403,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={this.props.isApprover} disabled={this.props.isApprover}
onBlur={(event) => { onBlur={(event) => {
...@@ -1396,7 +1444,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1396,7 +1444,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1438,7 +1486,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1438,7 +1486,7 @@ export default class CorporateAnnualTarget extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={this.props.isApprover} disabled={this.props.isApprover}
value={value} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -1479,7 +1527,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1479,7 +1527,7 @@ export default class CorporateAnnualTarget extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={this.props.isApprover} disabled={this.props.isApprover}
value={value} value={Number(value).toFixed(1)}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -1519,7 +1567,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1519,7 +1567,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1560,7 +1608,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1560,7 +1608,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1603,7 +1651,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1603,7 +1651,7 @@ export default class CorporateAnnualTarget extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
value={value} value={Number(value).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1642,7 +1690,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1642,7 +1690,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1683,7 +1731,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1683,7 +1731,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1724,7 +1772,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1724,7 +1772,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1763,7 +1811,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1763,7 +1811,7 @@ export default class CorporateAnnualTarget 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={value} value={Number(handleTotal(tableMeta)).toFixed(1)}
decimalScale={1} decimalScale={1}
disabled={true} disabled={true}
// onBlur={(event) => { // onBlur={(event) => {
...@@ -1803,7 +1851,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1803,7 +1851,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
...@@ -1844,7 +1892,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -1844,7 +1892,7 @@ export default class CorporateAnnualTarget extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={value} value={Number(value).toFixed(1)}
disabled={this.props.isApprover} disabled={this.props.isApprover}
decimalScale={1} decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
......
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