feat: Implement Order List for Admins
This commit is contained in:
17
apps/web/src/lib/index.ts
Normal file
17
apps/web/src/lib/index.ts
Normal 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, '-');
|
||||
}
|
||||
Reference in New Issue
Block a user