Solved some bugs with reading the Excel file

This commit is contained in:
Tiago Ribeiro
2024-01-14 22:18:15 +00:00
parent 10a480aa81
commit 08aec9b54c

View File

@@ -61,9 +61,9 @@ export default function BatchCodeGenerator({user}: {user: User}) {
const [firstName, lastName, country, passport_id, email, phone] = row as string[]; const [firstName, lastName, country, passport_id, email, phone] = row as string[];
return EMAIL_REGEX.test(email) && !users.map((u) => u.email).includes(email) return EMAIL_REGEX.test(email) && !users.map((u) => u.email).includes(email)
? { ? {
email, email: email.toString(),
name: `${firstName} ${lastName}`, name: `${firstName} ${lastName}`,
passport_id, passport_id: passport_id.toString(),
} }
: undefined; : undefined;
}) })