feat: Implement Order List for Admins

This commit is contained in:
dhinesh-m24
2026-02-05 15:30:05 +05:30
parent 7265f8db9e
commit 122159a62c
10 changed files with 605 additions and 8 deletions

17
apps/web/src/lib/index.ts Normal file
View File

@@ -0,0 +1,17 @@
export function createPageUrl(pageName: string) {
// Basic implementation based on MVP usage: navigate(createPageUrl('Events'))
// Assuming mapping based on pageName
if (pageName === 'Events') return '/orders';
if (pageName === 'ClientOrders') return '/orders'; // Assuming same route for now
if (pageName === 'Invoices') return '/invoices'; // Assuming route exists
if (pageName.startsWith('EventDetail?id=')) {
const id = pageName.split('=')[1];
return `/orders/${id}`;
}
if (pageName.startsWith('EditEvent?id=')) {
const id = pageName.split('=')[1];
return `/orders/${id}/edit`;
}
return '/' + pageName.toLowerCase().replace(/ /g, '-');
}