feat: enhance POS module with dynamic routing, improved state management, and new search functionality

This commit is contained in:
2025-12-26 16:47:47 +03:30
parent abfb2f3479
commit c6efda319c
20 changed files with 264 additions and 109 deletions
@@ -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}`,
},
},
};