Commit d6314e92 authored by Riri Novita's avatar Riri Novita

cat weight

parent b1adecfb
......@@ -358,7 +358,7 @@ export default class CorporateAnnualTarget extends Component {
payload.push({
item_report_id: i[0] === undefined ? 0 : reg.test(String(i[0])) === false ? 0 : String(i[0]).trim(),
item_report: i[1] === undefined ? "" : String(i[1]).trim(),
weight: i[2] === undefined ? "" : String(Number(i[2] * 100).toFixed(1)) + '%',
weight: i[2] === undefined ? "" : (String(i[2]).includes('%') ? Number(String(i[2]).substr(0, String(i[2]).length-1)) : String(Number(i[2] * 100).toFixed(1)) + '%'),
uom: i[3] === undefined ? "" : String(i[3]).trim(),
kpi_type: i[4] === undefined ? "" : String(i[4]).trim(),
max_ach: i[5] === undefined ? "" : String(i[5]).toLocaleLowerCase() !== 'unlimited' ? (String(i[5]).includes('%') ? String(i[5].trim()) : String(Number(i[5] * 100) + '%')) : String(i[5]).trim(),
......@@ -387,7 +387,7 @@ export default class CorporateAnnualTarget extends Component {
payload.push({
item_report_id: i[0] === undefined ? 0 : reg.test(String(i[0])) === false ? 0 : String(i[0]).trim(),
item_report: i[1] === undefined ? "" : String(i[1]).trim(),
weight: i[2] === undefined ? "" : String(Number(i[2] * 100).toFixed(1)) + '%',
weight: i[2] === undefined ? "" : (String(i[2]).includes('%') ? Number(String(i[2]).substr(0, String(i[2]).length-1)) : String(Number(i[2] * 100).toFixed(1)) + '%'),
uom: i[3] === undefined ? "" : String(i[3]).trim(),
kpi_type: i[4] === undefined ? "" : String(i[4]).trim(),
max_ach: i[5] === undefined ? "" : String(i[5]).toLocaleLowerCase() !== 'unlimited' ? (String(i[5]).includes('%') ? String(i[5].trim()) : String(Number(i[5] * 100) + '%')) : String(i[5]).trim(),
......
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