Add sorting by name functionality and implement AdminProductList component for product management

This commit is contained in:
Nils-Johan Gynther
2026-04-10 19:10:50 +02:00
parent 33cb4e5328
commit 556a0fdc30
5 changed files with 172 additions and 40 deletions
@@ -26,6 +26,8 @@ export class InventoryService {
orderBy.push({ bestBeforeDate: 'asc' });
} else if (query?.sort === 'bestBeforeDesc') {
orderBy.push({ bestBeforeDate: 'desc' });
} else if (query?.sort === 'nameAsc') {
orderBy.push({ product: { name: 'asc' } } as any);
} else if (query?.sort === 'purchaseDateAsc') {
orderBy.push({ purchaseDate: 'asc' });
} else if (query?.sort === 'purchaseDateDesc') {