Add category management screen

This commit is contained in:
beatz174-bit
2025-11-21 16:31:57 +10:00
parent f359b44416
commit 6d363d1c43
8 changed files with 267 additions and 10 deletions
+10
View File
@@ -13,6 +13,16 @@ export const seedDatabase = async (db: StockFillDB) => {
]);
}
const categoryCount = await db.categories.count();
if (categoryCount === 0) {
await db.categories.bulkAdd([
{ id: uuidv4(), name: 'Drinks', created_at: now(), updated_at: now() },
{ id: uuidv4(), name: 'Snacks', created_at: now(), updated_at: now() },
{ id: uuidv4(), name: 'Dairy', created_at: now(), updated_at: now() },
{ id: uuidv4(), name: 'Confectionery', created_at: now(), updated_at: now() },
]);
}
const productCount = await db.products.count();
if (productCount === 0) {
await db.products.bulkAdd([