try to set store via excel

This commit is contained in:
Lei PAN
2023-06-16 10:42:51 +02:00
parent 26036346cf
commit 5527ccecc2
3 changed files with 12 additions and 4 deletions
+6 -2
View File
@@ -10,7 +10,7 @@ class ExcelUtil {
(info, index, list) => {
if (index > 0 && info.length > 0) {
// console.log(info)
if (info[0].includes("Aijing")){
if (info[0].includes("Aijing")) {
console.log("found");
}
let name = info[0].trim().split(" ")
@@ -19,7 +19,11 @@ class ExcelUtil {
let phoneNumber = info[1];
let passportNumber = info[2];
let mail = info[3];
let newContact = new ContactPojo(phoneNumber, passportNumber, lastName, firstName, mail);
let store = info[4];
if (store === undefined || store.length === 0) {
store = "random"
}
let newContact = new ContactPojo(phoneNumber, passportNumber, lastName, firstName, mail, store);
contactList.push(newContact);
}
}