diff --git a/public/template/template_activity.xlsx b/public/template/template_activity.xlsx index fea79a7..065478a 100644 Binary files a/public/template/template_activity.xlsx and b/public/template/template_activity.xlsx differ diff --git a/public/template/template_activity_old.xlsx b/public/template/template_activity_old.xlsx new file mode 100644 index 0000000..fea79a7 Binary files /dev/null and b/public/template/template_activity_old.xlsx differ diff --git a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js index bb37abb..1761db4 100644 --- a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js +++ b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js @@ -141,11 +141,15 @@ const ImportActivity = ({ params }) => { // convert excel's DATEVALUE if(["start_date"].includes(prop)){ - columnData = ExcelDateToJSDate(columnData) + if (columnData) { + columnData = ExcelDateToJSDate(columnData) + } } if(["end_date"].includes(prop)){ - columnData = ExcelDateToJSDateEndDay(columnData) + if (columnData) { + columnData = ExcelDateToJSDateEndDay(columnData) + } } if(prop == 'weight'){ @@ -253,7 +257,11 @@ const ImportActivity = ({ params }) => { dataIndex: 'end_date', key: 'end_date', render: (text, record) => { - return {text.substring(0,8)} + if(text){ + return {text.substring(0,8)} + } else { + return + } } }, {