엑셀 불러오기 0값 처리 오류 수정 완료
This commit is contained in:
parent
b5d6d19478
commit
ade28c695d
@ -516,7 +516,7 @@ $(document).ready(function(){
|
||||
var updatedData = currentData.map(row => {
|
||||
var newRow = {};
|
||||
fieldMapping.forEach((field, index) => {
|
||||
newRow[field] = row[Object.keys(row)[index]] || "";
|
||||
newRow[field] = row[Object.keys(row)[index]] ?? "";
|
||||
});
|
||||
return newRow;
|
||||
});
|
||||
|
||||
@ -501,7 +501,7 @@ function updateTableFields($objTabul) {
|
||||
var updatedData = currentData.map(row => {
|
||||
var newRow = {};
|
||||
fieldMapping.forEach((field, index) => {
|
||||
newRow[field] = row[Object.keys(row)[index]] || "";
|
||||
newRow[field] = row[Object.keys(row)[index]] ?? "";
|
||||
});
|
||||
return newRow;
|
||||
});
|
||||
|
||||
@ -554,9 +554,10 @@ function updateTableFields($objTabul) {
|
||||
});
|
||||
|
||||
var updatedData = currentData.map(row => {
|
||||
console.log('row : ', row);
|
||||
var newRow = {};
|
||||
fieldMapping.forEach((field, index) => {
|
||||
newRow[field] = row[Object.keys(row)[index]] || "";
|
||||
newRow[field] = row[Object.keys(row)[index]] ?? "";
|
||||
});
|
||||
return newRow;
|
||||
});
|
||||
|
||||
@ -303,7 +303,9 @@ $(document).ready(function(){
|
||||
var updatedData = currentData.map(row => {
|
||||
var newRow = {};
|
||||
fieldMapping.forEach((field, index) => {
|
||||
newRow[field] = row[Object.keys(row)[index]] || "";
|
||||
newRow[field] = row[Object.keys(row)[index]] !== null && row[Object.keys(row)[index]] !== undefined
|
||||
? row[Object.keys(row)[index]]
|
||||
: "";
|
||||
});
|
||||
return newRow;
|
||||
});
|
||||
|
||||
@ -367,7 +367,9 @@ function updateTableFields(objTabul) {
|
||||
var updatedData = currentData.map(row => {
|
||||
var newRow = {};
|
||||
fieldMapping.forEach((field, index) => {
|
||||
newRow[field] = row[Object.keys(row)[index]] || "";
|
||||
newRow[field] = row[Object.keys(row)[index]] !== null && row[Object.keys(row)[index]] !== undefined
|
||||
? row[Object.keys(row)[index]]
|
||||
: "";
|
||||
});
|
||||
return newRow;
|
||||
});
|
||||
|
||||
@ -364,7 +364,9 @@ $(document).ready(function(){
|
||||
var updatedData = currentData.map(row => {
|
||||
var newRow = {};
|
||||
fieldMapping.forEach((field, index) => {
|
||||
newRow[field] = row[Object.keys(row)[index]] || "";
|
||||
newRow[field] = row[Object.keys(row)[index]] !== null && row[Object.keys(row)[index]] !== undefined
|
||||
? row[Object.keys(row)[index]]
|
||||
: "";
|
||||
});
|
||||
return newRow;
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user