Browse Source

Handling empty data import

pull/2/head
Wahyu Ramadhan 2 years ago
parent
commit
c10ee5f165
  1. 14
      src/views/SimproV2/CreatedProyek/ImportActivity/index.js

14
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 <span>{text.substring(0,8)}</span>
if(text){
return <span>{text.substring(0,8)}</span>
} else {
return <span></span>
}
}
},
{

Loading…
Cancel
Save