Commit 5bb015ed authored by rifkaki's avatar rifkaki

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents 2211ba91 f8011e9e
......@@ -1364,13 +1364,13 @@ export default class SubHolding extends Component {
item.formula,
item.level,
item.description,
item.balance_sheet.last_month,
item.balance_sheet.mtd_last_month,
item.balance_sheet.mtd_actual,
item.balance_sheet.mtd_mb,
item.balance_sheet.percent_of_mb,
item.balance_sheet.mtd_ol,
item.balance_sheet.percent_of_ol,
item.balance_sheet.last_year,
item.balance_sheet.mtd_last_year,
item.balance_sheet.forecast_next_year,
item.balance_sheet.forecast_more_year,
item.order
......@@ -1392,7 +1392,7 @@ export default class SubHolding extends Component {
item.formula,
item.level,
item.description,
item.balance_sheet.last_month,
item.balance_sheet.mtd_last_month,
item.balance_sheet.mtd_actual,
item.balance_sheet.mtd_mb,
item.balance_sheet.percent_of_mb,
......@@ -1435,13 +1435,46 @@ export default class SubHolding extends Component {
if (indexIDzz === -1) {
let mtd_actual = item.profit_loss.mtd_actual == ''? 0 : item.profit_loss.mtd_actual
let mtd_mb = item.profit_loss.mtd_mb == ''? 0 : item.profit_loss.mtd_mb
let persenMtd = Number(mtd_actual/mtd_mb)
let ytd_actual = item.profit_loss.ytd_actual == ''? 0 : item.profit_loss.ytd_actual
let ytd_mb = item.profit_loss.ytd_mb == ''? 0 : item.profit_loss.ytd_mb
let ytd_last_year = item.profit_loss.ytd_last_year == ''? 0 : item.profit_loss.ytd_last_year
let persenYtdMB = Number(ytd_actual/ytd_mb)
let persenYtdLY = Number(ytd_actual/ytd_last_year)
let persenMtd = 0
if (mtd_mb < 0) {
if (mtd_actual >= mtd_mb) {
persenMtd = ((mtd_mb - mtd_actual) / mtd_mb + 1 )
} else {
persenMtd = ((mtd_mb - mtd_actual) / mtd_mb)
}
}
else {
persenMtd = Number(mtd_actual/mtd_mb)
}
let ytd_actual = item.profit_loss.ytd_actual == ''? 0 : Number(item.profit_loss.ytd_actual)
let ytd_mb = item.profit_loss.ytd_mb == ''? 0 : Number(item.profit_loss.ytd_mb)
let ytd_last_year = item.profit_loss.ytd_last_year == ''? 0 : Number(item.profit_loss.ytd_last_year)
let persenYtdMB = 0
if (ytd_mb < 0) {
if (ytd_actual >= ytd_mb) {
persenYtdMB = ((ytd_mb - ytd_actual) / ytd_mb + 1 )
} else {
persenYtdMB = ((ytd_mb - ytd_actual) / ytd_mb)
}
}
else {
persenYtdMB = Number(ytd_actual/ytd_mb)
}
let persenYtdLY = 0
if (ytd_last_year < 0) {
if (ytd_actual >= ytd_last_year) {
persenYtdLY = ((ytd_last_year - ytd_actual) / ytd_last_year + 1 )
} else {
persenYtdLY = (ytd_last_year - ytd_actual) / ytd_last_year
}
}
else {
persenYtdLY = Number(ytd_actual/ytd_last_year)
}
let q1_actual = item.profit_loss.q1_actual == ''? 0 : item.profit_loss.q1_actual
let q1_mb = item.profit_loss.q1_mb == ''? 0 : item.profit_loss.q1_mb
......@@ -1501,9 +1534,20 @@ export default class SubHolding extends Component {
}
}
res.map((item,index) => {
let mtd_actual = item.profit_loss.mtd_actual == ''? 0 : item.profit_loss.mtd_actual
let mtd_mb = item.profit_loss.mtd_mb == ''? 0 : item.profit_loss.mtd_mb
let persenMtd = Number(mtd_actual/mtd_mb)
let mtd_actual = item.profit_loss.mtd_actual == ''? 0 : Number(item.profit_loss.mtd_actual)
let mtd_mb = item.profit_loss.mtd_mb == ''? 0 : Number(item.profit_loss.mtd_mb)
let persenMtd = 0
if (mtd_mb < 0) {
if (mtd_actual >= mtd_mb) {
persenMtd = ((mtd_mb - mtd_actual) / mtd_mb + 1 )
} else {
persenMtd = ((mtd_mb - mtd_actual) / mtd_mb)
}
}
else {
persenMtd = Number(mtd_actual/mtd_mb)
}
let ytd_actual = item.profit_loss.ytd_actual == ''? 0 : item.profit_loss.ytd_actual
let ytd_mb = item.profit_loss.ytd_mb == ''? 0 : item.profit_loss.ytd_mb
......@@ -1555,6 +1599,9 @@ export default class SubHolding extends Component {
item.profit_loss.fy_last_year,
isNaN(persenFyLY) || persenFyLY == 'Infinity' || persenFyLY == '-Infinity'? (item.profit_loss.fy_last_year == '' || item.profit_loss.fy_last_year == 0? -0 : 0) : (item.profit_loss.fy_last_year == '' || item.profit_loss.fy_last_year == 0? persenFyLY * -100 : persenFyLY * 100),
isNaN(persenFyOLMB) || persenFyOLMB == 'Infinity' || persenFyOLMB == '-Infinity'? (item.profit_loss.fy_percent_ach_ol_to_mb == '' || item.profit_loss.fy_percent_ach_ol_to_mb == 0? -0 : 0) : (item.profit_loss.fy_percent_ach_ol_to_mb == '' || item.profit_loss.fy_percent_ach_ol_to_mb == 0? persenFyOLMB * -100 : persenFyOLMB * 100),
item.profit_loss.forecast_next_year,
item.profit_loss.forecast_more_year,
item.profit_loss.notes,
])
if (item.children !== null) {
if (item.children.length > 0) {
......
......@@ -15423,7 +15423,7 @@ export default class TableSubHolding extends Component {
name: "Account",
options: {
customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300, borderRight: '1px #fff solid' }}>
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 300 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
</TableCell>
),
......@@ -15448,10 +15448,10 @@ export default class TableSubHolding extends Component {
options: {
customHeadRender: (columnMeta) => (
dataTable2.length > 0 ?
<TableCell style={{ ...stylenotes, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<TableCell style={{ ...stylenotes, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> :
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
......@@ -15501,17 +15501,17 @@ export default class TableSubHolding extends Component {
name: `MTD ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50 }}>{columnMeta.name}</div>
<th style={{ ...style2, color: '#fff', backgroundColor: '#1c71b8', color: '#fff', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)"}} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50, paddingTop: 15 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, backgroundColor: '#37b5e6', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"Actual"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', color: 'black', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)' }}>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', color: '#000', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)' }}>
<span>{"MB"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', color: 'black', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)' }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, color: '#000', borderRight: "1px #fff solid", backgroundColor: 'rgb(200 224 229)' }}>
<span>{"% of MB"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d06' }}>
......@@ -15542,6 +15542,7 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
decimalScale={1}
disabled={true}
value={Number(tableMeta.rowData[6]).toFixed(1)}
/>
......@@ -15565,6 +15566,7 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
decimalScale={1}
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
/>
......@@ -15588,8 +15590,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
value={Number(tableMeta.rowData[8]).toFixed(2)}
/>
}
/>
......@@ -15629,8 +15632,8 @@ export default class TableSubHolding extends Component {
name: `YTD ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50 }}>{columnMeta.name}</div>
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50, paddingTop: 15 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, backgroundColor: '#37b5e6', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
......@@ -15719,8 +15722,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
value={Number(tableMeta.rowData[12]).toFixed(2)}
/>
}
/>
......@@ -15764,9 +15768,10 @@ export default class TableSubHolding extends Component {
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
suffix={'%'}
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
value={Number(tableMeta.rowData[14]).toFixed(2)}
/>
}
/>
......@@ -15783,8 +15788,8 @@ export default class TableSubHolding extends Component {
name: `Q1 ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50 }}>{columnMeta.name}</div>
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50, paddingTop: 15 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, backgroundColor: '#37b5e6', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
......@@ -15873,8 +15878,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(1)}
value={Number(tableMeta.rowData[17]).toFixed(2)}
/>
}
/>
......@@ -15919,8 +15925,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[19]).toFixed(1)}
value={Number(tableMeta.rowData[19]).toFixed(2)}
/>
}
/>
......@@ -15937,8 +15944,8 @@ export default class TableSubHolding extends Component {
name: `FY ${this.props.periode}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50}}>{columnMeta.name}</div>
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50, paddingTop: 15}}>{columnMeta.name}</div>
<div className="grid grid-2x" style={{ ...style2, backgroundColor: '#37b5e6', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
......@@ -16039,8 +16046,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[22]).toFixed(1)}
value={Number(tableMeta.rowData[22]).toFixed(2)}
/>
}
/>
......@@ -16135,8 +16143,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[26]).toFixed(1)}
value={Number(tableMeta.rowData[26]).toFixed(2)}
/>
}
/>
......@@ -16158,8 +16167,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[27]).toFixed(1)}
value={Number(tableMeta.rowData[27]).toFixed(2)}
/>
}
/>
......@@ -16177,11 +16187,11 @@ export default class TableSubHolding extends Component {
name: `${Number(this.props.periode) + 1}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<th style={{ ...style2, color: '#fff', backgroundColor: '#1c71b8', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
{/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50 }}>{columnMeta.name}</div>
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50, paddingTop: 15 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8', width: 145 }}>
<span>{"ForeCast"}</span>
......@@ -16222,11 +16232,11 @@ export default class TableSubHolding extends Component {
name: `${Number(this.props.periode) + 2}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<th style={{ ...style2, color: '#fff', backgroundColor: '#1c71b8', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
{/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50 }}>{columnMeta.name}</div>
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 50, paddingTop: 15 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8', width: 145 }}>
<span>{"ForeCast"}</span>
......@@ -636,6 +636,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
handleCalculate(datatable2) {
// console.log(datatable2)
this.setState({ loading: true }, () => {
let total = 0
let perfomanceScore = ''
......@@ -690,7 +691,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
}
totalScore = Number(totalScore).toFixed(0)
let totalScorez = Number(totalScore).toFixed(0)
//Score X Weight
let totalSW = 0
......@@ -703,16 +704,21 @@ export default class CorporateAnnualTargetMR extends Component {
if (item[12] == '' || String(item[12]) == '0' || String(item[12]) == '0.0') {
totalSW = 0
} else {
totalSW = (Number(totalScore) * Number(handlePercent) / 100)
totalSW = (Number(totalScorez) * Number(handlePercent) / 1000)
}
totalSW = Number(totalSW).toFixed(2)
// console.log(totalSW)
if (item[0] !== 1 && item[0] !== 4) {
total += Number(totalSW)
}
// console.log(item[5])
// console.log(totalAch);
// console.log(achx100);
// console.log(listParameterFilter);
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalSW)
// console.log(total)
return [
[
item[0],
item[1],
item[2],
......@@ -727,37 +733,39 @@ export default class CorporateAnnualTargetMR extends Component {
item[11],
item[12],
totalAch,
totalScore,
totalScorez,
totalSW,
item[16],
item[17],
item[18],
item[19],
]
// item[19],
// ]
]
})
console.log(totalWeight)
console.log(total)
console.log(datatable3);
totalWeight = Number(totalWeight) / 100
total = Number(Number(total).toFixed(2) / Number(totalWeight)).toFixed(2)
if (total >= 1.00 && total <= 2.00) {
// console.log(totalWeight)
// console.log(total)
// console.log(datatable3);
let totalWeightz = Number(totalWeight) / 100
let totalz = Number(Number(total).toFixed(2) / Number(totalWeightz)).toFixed(2)
let lastTotal = R.equals(totalz, NaN) ? 0.0 : totalz
// console.log(Number(Number(total).toFixed(2) / Number(totalWeightz)).toFixed(2))
if (lastTotal >= 1.00 && lastTotal <= 2.00) {
perfomanceScore = 'K'
} else if (total >= 2.01 && total <= 2.75) {
} else if (lastTotal >= 2.01 && lastTotal <= 2.75) {
perfomanceScore = 'C'
} else if (total >= 2.76 && total <= 3.00) {
} else if (lastTotal >= 2.76 && lastTotal <= 3.00) {
perfomanceScore = 'B-'
} else if (total >= 3.01 && total <= 3.75) {
} else if (lastTotal >= 3.01 && lastTotal <= 3.75) {
perfomanceScore = 'B'
} else if (total >= 3.76 && total <= 4.00) {
} else if (lastTotal >= 3.76 && lastTotal <= 4.00) {
perfomanceScore = 'B+'
} else if (total >= 4.01 && total <= 4.75) {
} else if (lastTotal >= 4.01 && lastTotal <= 4.75) {
perfomanceScore = 'BS'
} else if (total >= 4.76 && total <= 5.00) {
} else if (lastTotal >= 4.76 && lastTotal <= 5.00) {
perfomanceScore = 'IST'
}
setTimeout(() => {
this.setState({ totalScore: total, perfomanceScore, loading: false}, () => {
this.setState({ totalScore: lastTotal, perfomanceScore, loading: false}, () => {
this.setState({loading: true})
setTimeout(() => {
this.setState({loading: false})
......@@ -1044,10 +1052,10 @@ export default class CorporateAnnualTargetMR extends Component {
if (dataTable2[tableMeta.rowIndex][5] == "ROIC") {
dataTable2[tableMeta.rowIndex][column] = 0
} else {
dataTable2[tableMeta.rowIndex][column] = total
dataTable2[tableMeta.rowIndex][column] = Number(total).toFixed(1)
}
return total
return Number(total).toFixed(1)
}
const handleChangeText = (value, tableMeta) => {
......
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