Commit a29ee078 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

olpa cat lagi

See merge request !1474
parents 8e4e7ba6 01055654
...@@ -151,10 +151,10 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -151,10 +151,10 @@ export default class CorporateAnnualTargetRO extends Component {
item.level, item.level,
item.description, item.description,
item.cat.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1), item.cat.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
parentTrue ? item.cat.uom : item.uom, item.uom,
parentTrue ? item.cat.kpi == "" ? null : { value: item.cat.kpi } : item.kpi_type == "" ? null : { value: item.kpi_type }, item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.cat.max_ach == "" ? null : { value: titleCase(item.cat.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) }, item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
parentTrue ? item.cat.formula_ytd == "" ? null : { value: item.cat.formula_ytd } : item.formula_ytd == "" ? null : { value: item.formula_ytd }, item.formula_ytd == "" ? null : { value: item.formula_ytd },
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? (item.cat.january == "" ? item.cat.january : String(item.cat.january).indexOf(".") == -1 ? Number(item.cat.january) : Number(item.cat.january).toFixed(1)) : { value: item.cat.january, formula: item.cat.january_formula } : (item.cat.january == "" ? item.cat.january : String(item.cat.january).indexOf(".") == -1 ? Number(item.cat.january) : Number(item.cat.january).toFixed(1)), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? (item.cat.january == "" ? item.cat.january : String(item.cat.january).indexOf(".") == -1 ? Number(item.cat.january) : Number(item.cat.january).toFixed(1)) : { value: item.cat.january, formula: item.cat.january_formula } : (item.cat.january == "" ? item.cat.january : String(item.cat.january).indexOf(".") == -1 ? Number(item.cat.january) : Number(item.cat.january).toFixed(1)),
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? (item.cat.february == "" ? item.cat.february : String(item.cat.february).indexOf(".") == -1 ? Number(item.cat.february) : Number(item.cat.february).toFixed(1)) : { value: item.cat.february, formula: item.cat.february_formula } : (item.cat.february == "" ? item.cat.february : String(item.cat.february).indexOf(".") == -1 ? Number(item.cat.february) : Number(item.cat.february).toFixed(1)), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? (item.cat.february == "" ? item.cat.february : String(item.cat.february).indexOf(".") == -1 ? Number(item.cat.february) : Number(item.cat.february).toFixed(1)) : { value: item.cat.february, formula: item.cat.february_formula } : (item.cat.february == "" ? item.cat.february : String(item.cat.february).indexOf(".") == -1 ? Number(item.cat.february) : Number(item.cat.february).toFixed(1)),
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? (item.cat.march == "" ? item.cat.march : String(item.cat.march).indexOf(".") == -1 ? Number(item.cat.march) : Number(item.cat.march).toFixed(1)) : { value: item.cat.march, formula: item.cat.march_formula } : (item.cat.march == "" ? item.cat.march : String(item.cat.march).indexOf(".") == -1 ? Number(item.cat.march) : Number(item.cat.march).toFixed(1)), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? (item.cat.march == "" ? item.cat.march : String(item.cat.march).indexOf(".") == -1 ? Number(item.cat.march) : Number(item.cat.march).toFixed(1)) : { value: item.cat.march, formula: item.cat.march_formula } : (item.cat.march == "" ? item.cat.march : String(item.cat.march).indexOf(".") == -1 ? Number(item.cat.march) : Number(item.cat.march).toFixed(1)),
...@@ -190,7 +190,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -190,7 +190,7 @@ export default class CorporateAnnualTargetRO extends Component {
item.level, item.level,
item.description, item.description,
item.weight == '' ? Number(0).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1), item.weight == '' ? Number(0).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1),
item.cat.uom, item.uom,
item.kpi_type == "" ? null : { value: item.kpi_type }, item.kpi_type == "" ? null : { value: item.kpi_type },
item.max_ach == "" ? null : { value: titleCase(item.max_ach) }, item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
item.formula == "" ? null : { value: item.formula_ytd }, item.formula == "" ? null : { value: item.formula_ytd },
...@@ -542,7 +542,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -542,7 +542,7 @@ export default class CorporateAnnualTargetRO extends Component {
item.item_report, item.item_report,
Number(String(item.weight).substr(0,String(item.weight).length-1)), Number(String(item.weight).substr(0,String(item.weight).length-1)),
item.uom, item.uom,
item.kpi == "" || item.kpi == null ? null : { value: item.kpi }, item.kpi_type == "" || item.kpi_type == null ? null : { value: item.kpi_type },
item.max_ach == "" || item.max_ach == null ? null : { value: titleCase(item.max_ach) }, item.max_ach == "" || item.max_ach == null ? null : { value: titleCase(item.max_ach) },
item.formula_ytd == "" || item.formula_ytd == null ? null : { value: item.formula_ytd }, item.formula_ytd == "" || item.formula_ytd == null ? null : { value: item.formula_ytd },
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.january).toFixed(1) : { value: item.january, formula: item.january_formula } : item.january == "" ? item.january : String(item.january).indexOf(".") == -1 ? Number(item.january) : Number(item.january).toFixed(1), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.january).toFixed(1) : { value: item.january, formula: item.january_formula } : item.january == "" ? item.january : String(item.january).indexOf(".") == -1 ? Number(item.january) : Number(item.january).toFixed(1),
...@@ -557,8 +557,8 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -557,8 +557,8 @@ export default class CorporateAnnualTargetRO extends Component {
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.october).toFixed(1) : { value: item.october, formula: item.october_formula } : item.october == "" ? item.october : String(item.october).indexOf(".") == -1 ? Number(item.october) : Number(item.october).toFixed(1), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.october).toFixed(1) : { value: item.october, formula: item.october_formula } : item.october == "" ? item.october : String(item.october).indexOf(".") == -1 ? Number(item.october) : Number(item.october).toFixed(1),
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.november).toFixed(1) : { value: item.november, formula: item.november_formula } : item.november == "" ? item.november : String(item.november).indexOf(".") == -1 ? Number(item.november) : Number(item.november).toFixed(1), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.november).toFixed(1) : { value: item.november, formula: item.november_formula } : item.november == "" ? item.november : String(item.november).indexOf(".") == -1 ? Number(item.november) : Number(item.november).toFixed(1),
item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.december).toFixed(1) : { value: item.december, formula: item.december_formula } : item.december == "" ? item.december : String(item.december).indexOf(".") == -1 ? Number(item.december) : Number(item.december).toFixed(1), item.parent_name == "FINANCIAL PERSPECTIVE" ? item.type_report_id == 3 ? Number(item.december).toFixed(1) : { value: item.december, formula: item.december_formula } : item.december == "" ? item.december : String(item.december).indexOf(".") == -1 ? Number(item.december) : Number(item.december).toFixed(1),
item.current_year_total == "" ? item.current_year_total : String(item.current_year_total).indexOf(".") == -1 ? Number(item.current_year_total) : Number(item.total_current_year).toFixed(1), item.total_current_year == "" ? item.total_current_year : String(item.total_current_year).indexOf(".") == -1 ? Number(item.total_current_year) : Number(item.total_current_year).toFixed(1),
item.strategic_initiative, item.strategic,
item.pic, item.pic,
item.order, item.order,
item.error item.error
...@@ -791,6 +791,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -791,6 +791,7 @@ export default class CorporateAnnualTargetRO extends Component {
if (forecast == undefined) { if (forecast == undefined) {
let convertID = -1 let convertID = -1
// console.log(tableMeta)
if (tableMeta.rowData[10].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]
...@@ -1887,7 +1888,8 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1887,7 +1888,8 @@ 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, 13)).toFixed(1)} // value={Number(handleValueFormula(value, tableMeta, 13)).toFixed(1)}
value={Number(value).toFixed(1)}
disabled disabled
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