Commit 1c0caa5e authored by syadziy's avatar syadziy

update RO CAT

parent ee9809e6
...@@ -419,7 +419,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -419,7 +419,7 @@ export default class CorporateAnnualTargetMR extends Component {
item.formula, item.formula,
item.level, item.level,
item.item_report, item.item_report,
item.parent == null ? (String(item.weight).includes("%") ? Number(String(item.weight).trim().substr(0, String(item.weight).trim().length - 1)) * 100 : Number(item.weight) * 100) : (String(item.weight).includes("%") ? String(item.weight).trim().substr(0, String(item.weight).trim().length - 1) : item.weight), item.parent == null ? (String(item.weight).includes("%") ? Number(String(item.weight).trim().substr(0, String(item.weight).trim().length - 1)) : Number(item.weight) * 100) : (String(item.weight).includes("%") ? String(item.weight).trim().substr(0, String(item.weight).trim().length - 1) : item.weight),
item.uom, item.uom,
item.jenis_kpi, item.jenis_kpi,
item.max_ach, item.max_ach,
......
...@@ -142,6 +142,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -142,6 +142,7 @@ export default class CorporateAnnualTargetRO extends Component {
if (indexIDzz === -1) { if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE' let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
let weight = String(item.weight).includes('%')? String(item.weight).substr(0, String(item.weight).length - 1) : String(item.weight) let weight = String(item.weight).includes('%')? String(item.weight).substr(0, String(item.weight).length - 1) : String(item.weight)
let weightTB = String(item.corporate_annual_target.weight).includes('%')? String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1) : String(item.corporate_annual_target.weight)
dataTable.push([ dataTable.push([
item.type_report_id, item.type_report_id,
item.id, item.id,
...@@ -149,7 +150,8 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -149,7 +150,8 @@ export default class CorporateAnnualTargetRO extends Component {
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1), // item.parent == null ? Number(weight).toFixed(1) : (item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1)),
parentTrue ? weight : weightTB,
parentTrue ? item.corporate_annual_target.uom : item.uom, parentTrue ? item.corporate_annual_target.uom : item.uom,
parentTrue ? item.corporate_annual_target.kpi == "" ? null : { value: item.corporate_annual_target.kpi } : item.kpi_type == "" ? null : { value: item.kpi_type }, parentTrue ? item.corporate_annual_target.kpi == "" ? null : { value: item.corporate_annual_target.kpi } : item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.corporate_annual_target.max_ach == "" ? null : { value: titleCase(item.corporate_annual_target.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) }, parentTrue ? item.corporate_annual_target.max_ach == "" ? null : { value: titleCase(item.corporate_annual_target.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
...@@ -189,7 +191,8 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -189,7 +191,8 @@ export default class CorporateAnnualTargetRO extends Component {
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.corporate_annual_target.weight == '' ? Number(item.weight * 100).toFixed(1) : (item.parent == null ? Number(weight * 100).toFixed(1) : Number(weight).toFixed(1)), item.weight == '' ? Number(0).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1),
// item.parent == null ? Number(weight * 100).toFixed(1) : (item.corporate_annual_target.weight == '' ? Number(item.weight * 100).toFixed(1) : (item.parent == null ? Number(weight * 100).toFixed(1) : Number(weight).toFixed(1))),
// item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(Number(weight * 100)).toFixed(1), // item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(Number(weight * 100)).toFixed(1),
item.corporate_annual_target.uom, item.corporate_annual_target.uom,
item.kpi_type == "" ? null : { value: item.kpi_type }, item.kpi_type == "" ? null : { value: item.kpi_type },
......
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