Commit 726a7cf1 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

Ggmac

See merge request !1428
parents 7e67aa40 fd1c77a4
......@@ -238,7 +238,7 @@ export default class CorporateAnnualTargetMR extends Component {
item.order
])
// let index = dataTable.findIndex((val) => val[5] == item.description)
console.log(index, length - 1)
// console.log(index, length - 1)
if (index == length - 1 && item.parent_name == "LEARNING & GROWTH PERSPECTIVE") {
dataTable.push([
4,
......@@ -677,6 +677,7 @@ export default class CorporateAnnualTargetMR extends Component {
let total = 0
let perfomanceScore = ''
let totalWeight = 0
// console.log(datatable2)
let datatable3 = datatable2.map((item, index) => {
// console.log(item[6])
//total weight
......@@ -746,7 +747,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
totalAch = String(totalAch) == 'NaN' || String(totalAch) == 'Infinity' || String(totalAch) == '-Infinity' ? 0 : totalAch
totalAch = Number(totalAch) * 100
totalAch = this.props.lastStatus == 'APPROVED'? item[13] : Number(totalAch) * 100
//score
let listParameter = this.state.parameterScore
......@@ -756,7 +757,7 @@ export default class CorporateAnnualTargetMR extends Component {
let listParameterFilter = listParameter.filter((val) => val.setting_type == String(parameterMix).toLocaleUpperCase())
let listParameterFilterCompany = listParameterFilter.filter((val) => val.company_id == this.props.company.company_id)
let totalScore = 0
let achx100 = item[9] == '100%' && (item[8] == 'HIB' || item[8] == 'HIG') ? Number(totalAch) / 100 > 1 ? 1 : Number(totalAch) / 100 : Number(totalAch) / 100
let achx100 = item[9] == '100%' && (item[8] == 'HIB' || item[8] == 'HIG') ? (Number(totalAch) / 100 > 1 ? 1 : Number(totalAch) / 100) : Number(totalAch) / 100
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(listParameterFilter)
// console.log(listParameterFilterCompany)
......@@ -776,7 +777,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
}
let totalScorez = Number(totalScore).toFixed(0)
let totalScorez = this.props.lastStatus == 'APPROVED'? item[14] : Number(totalScore).toFixed(0)
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(totalScorez)
// }
......@@ -793,7 +794,7 @@ export default class CorporateAnnualTargetMR extends Component {
} else {
totalSW = (Number(totalScorez) * Number(handlePercent) / 100)
}
totalSW = Number(totalSW).toFixed(2)
totalSW = this.props.lastStatus == 'APPROVED'? item[15] : Number(totalSW).toFixed(2)
if (item[0] !== 1 && item[0] !== 4) {
total += Number(totalSW)
}
......@@ -804,6 +805,8 @@ export default class CorporateAnnualTargetMR extends Component {
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalSW)
// console.log(item[12])
// console.log(item[5])
// console.log(total)
return [
item[0],
......@@ -1373,7 +1376,7 @@ export default class CorporateAnnualTargetMR extends Component {
let listParameterFilter = listParameter.filter((val) => val.setting_type == String(parameterMix).toLocaleUpperCase() && String(val.company_name).toLocaleLowerCase() === "default")
let listParameterFilterCompany = listParameterFilter.filter((val) => val.company_id == this.props.company.company_id)
let totalScore = 0
let achx100 = tableMeta.rowData[9] == '100%' && (tableMeta.rowData[8] == 'HIB' || tableMeta.rowData[8] == 'HIG') ? Number(tableMeta.rowData[13]) / 100 > 1 ? 1 : Number(tableMeta.rowData[13]) / 100 : Number(tableMeta.rowData[13]) / 100
let achx100 = tableMeta.rowData[9] == '100%' && (tableMeta.rowData[8] == 'HIB' || tableMeta.rowData[8] == 'HIG') ? (Number(tableMeta.rowData[13]) / 100 > 1 ? 1 : Number(tableMeta.rowData[13]) / 100) : Number(tableMeta.rowData[13]) / 100
if (listParameterFilterCompany.length == 0) {
listParameterFilter.map((item, index) => {
if (Number(achx100) >= Number(item.min_value) && Number(achx100) <= Number(item.max_value)) {
......
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