update for build
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
import { NamedRoutes } from '@/core';
|
||||
import { Routes } from '@angular/router';
|
||||
import config from 'src/config';
|
||||
|
||||
export type TPosSaleInvoicesRouteNames = 'saleInvoices' | 'saleInvoice';
|
||||
|
||||
const baseRoute = `${config.isPosApplication ? '' : '/pos'}/sale_invoices`;
|
||||
|
||||
export const posSaleInvoicesNamedRoutes: NamedRoutes<TPosSaleInvoicesRouteNames> = {
|
||||
saleInvoices: {
|
||||
path: 'sale_invoices',
|
||||
loadComponent: () => import('../../views/list.component').then((m) => m.PosSaleInvoicesComponent),
|
||||
loadComponent: () =>
|
||||
import('../../views/list.component').then((m) => m.PosSaleInvoicesComponent),
|
||||
meta: {
|
||||
title: 'فاکتورها',
|
||||
pagePath: () => `/pos/sale_invoices`,
|
||||
pagePath: () => baseRoute,
|
||||
},
|
||||
},
|
||||
saleInvoice: {
|
||||
path: 'sale_invoices/:invoiceId',
|
||||
loadComponent: () => import('../../views/single.component').then((m) => m.PosSaleInvoiceComponent),
|
||||
loadComponent: () =>
|
||||
import('../../views/single.component').then((m) => m.PosSaleInvoiceComponent),
|
||||
meta: {
|
||||
title: 'جزئیات فاکتور',
|
||||
pagePath: (invoiceId: string) => `/pos/sale_invoices/${invoiceId}`,
|
||||
pagePath: (invoiceId: string) => `${baseRoute}/${invoiceId}`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user