[offers][feat] normalise sheet to incorporate slug

pull/501/head
Stuart Long Chay Boon 3 years ago
parent 247c5e6627
commit 22d82041e6

@ -31,7 +31,7 @@ type ExcelData = {
const sheets = file.SheetNames; const sheets = file.SheetNames;
for (let i = 0; i < sheets.length; i++) { for (let i = 0; i < 1; i++) {
const temp = reader.utils.sheet_to_json(file.Sheets[file.SheetNames[i]]); const temp = reader.utils.sheet_to_json(file.Sheets[file.SheetNames[i]]);
temp.forEach((res: ExcelData) => { temp.forEach((res: ExcelData) => {
data.push(res); data.push(res);
@ -112,7 +112,7 @@ const seedSalaries = async () => {
const companyIdMappings = {}; const companyIdMappings = {};
(await prisma.company.findMany()).forEach((company) => { (await prisma.company.findMany()).forEach((company) => {
companyIdMappings[company.name] = company.id; companyIdMappings[company.slug] = company.id;
}); });
// get countryId of Singapore // get countryId of Singapore
@ -122,7 +122,7 @@ const seedSalaries = async () => {
} }
})) }))
// console.log(singapore) console.log("Singapore ID: " + singapore)
// break; // break;
// seed here // seed here

Binary file not shown.
Loading…
Cancel
Save