Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions backend/src/scripts/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,14 @@ console.log(`Kategorier i dumpen: ${normalizedCategories.length}`);

console.log(`Unike produkter med EAN: ${normalizedProducts.length}`);

if (normalizedProducts.length >= 20000) {
console.log("Målet på minst 20 000 produkter er nådd.");
} else {
console.log(
`Mangler ${20000 - normalizedProducts.length} produkter for å nå 20 000.`,
);
}

const withoutCategory = normalizedProducts.filter(
(product) => product.categoryId === UNCATEGORIZED_CATEGORY_ID,
).length;
Expand Down