From 8cad4f2902e6924004f62ec794fce7d8d9632791 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Wed, 10 May 2023 10:55:09 +0700 Subject: [PATCH 1/2] remove math rounding --- .../CreatedProyek/ImportActivity/index.js | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js index 48e8000..4661d3d 100644 --- a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js +++ b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js @@ -57,9 +57,8 @@ const columnToIndexs = { weight: 4, start_date: 5, end_date: 6, - picKit: 7, - picOwner: 8, - duration: 9 + nik: 7, + duration: 8 } const ExcelDateToJSDate = (date) => { @@ -133,7 +132,7 @@ const ImportActivity = ({ params }) => { } if(prop == 'weight'){ - columnData = Math.round(columnData * 100) + columnData = columnData * 100 } extractedRow[prop] = columnData @@ -238,18 +237,13 @@ const ImportActivity = ({ params }) => { title: 'Duration', dataIndex: 'duration', key: 'duration', - align: 'right', - }, - { - title: 'PIC KIT', - dataIndex: 'picKit', - key: 'picKit', }, { - title: 'PIC Owner', - dataIndex: 'picOwner', - key: 'picOwner', - }, + title: 'NIK', + dataIndex: 'nik', + key: 'nik', + align: 'right', + } ]; if (isMovePage) { From d15b1b25362d6311c488b5fdd3ad7202dd449fbb Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Fri, 12 May 2023 10:27:38 +0700 Subject: [PATCH 2/2] Handling null weight --- src/views/SimproV2/CreatedProyek/ImportActivity/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js index 4661d3d..4e78542 100644 --- a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js +++ b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js @@ -132,6 +132,9 @@ const ImportActivity = ({ params }) => { } if(prop == 'weight'){ + if (columnData == null) { + columnData = 0; + } columnData = columnData * 100 }