feat: enhance POS module with dynamic routing, improved state management, and new search functionality
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
const baseUrl = '/api/v1/pos';
|
||||
|
||||
export const POS_API_ROUTES = {
|
||||
info: () => `${baseUrl}`,
|
||||
stock: () => `${baseUrl}/stock`,
|
||||
productCategories: () => `${baseUrl}/product-categories`,
|
||||
submitOrder: () => `${baseUrl}/orders/create`,
|
||||
info: (posId: number) => `${baseUrl}/${posId}`,
|
||||
stock: (posId: number) => `${baseUrl}/${posId}/stock`,
|
||||
productCategories: (posId: number) => `${baseUrl}/${posId}/product-categories`,
|
||||
submitOrder: (posId: number) => `${baseUrl}/${posId}/orders/create`,
|
||||
};
|
||||
|
||||
@@ -5,11 +5,11 @@ export type TPOSRouteNames = 'POS';
|
||||
|
||||
export const posNamedRoutes: NamedRoutes<TPOSRouteNames> = {
|
||||
POS: {
|
||||
path: 'pos',
|
||||
path: 'pos/:posId',
|
||||
loadComponent: () => import('../../views/pos.component').then((m) => m.POSComponent),
|
||||
meta: {
|
||||
title: 'نقطه فروش',
|
||||
pagePath: () => '/pos',
|
||||
title: 'نقاط فروش',
|
||||
pagePath: (params) => `/pos/${params.posId}`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user