init
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import { NamedRoutes } from '@/core';
|
||||
import { Routes } from '@angular/router';
|
||||
import { GUILD_GOOD_CATEGORIES_ROUTES } from './goodCategories';
|
||||
import { GUILD_GOODS_ROUTES } from './goods';
|
||||
|
||||
export type TGuildsRouteNames = 'guilds' | 'guild';
|
||||
|
||||
export const guildsNamedRoutes: NamedRoutes<TGuildsRouteNames> = {
|
||||
guilds: {
|
||||
path: 'guilds',
|
||||
loadComponent: () => import('../../views/list.component').then((m) => m.GuildsComponent),
|
||||
meta: {
|
||||
title: 'اصناف',
|
||||
pagePath: () => '/super_admin/guilds',
|
||||
},
|
||||
},
|
||||
guild: {
|
||||
path: 'guilds/:guildId',
|
||||
loadComponent: () => import('../../views/single.component').then((m) => m.GuildComponent),
|
||||
// @ts-ignore
|
||||
meta: {
|
||||
title: 'صنف',
|
||||
pagePath: (guildId: string) => `/super_admin/guilds/${guildId}`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const GUILDS_ROUTES: Routes = [
|
||||
guildsNamedRoutes.guilds,
|
||||
{
|
||||
path: 'guilds/:guildId',
|
||||
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadComponent: () => import('../../views/single.component').then((m) => m.GuildComponent),
|
||||
},
|
||||
|
||||
...GUILD_GOOD_CATEGORIES_ROUTES,
|
||||
...GUILD_GOODS_ROUTES,
|
||||
// {
|
||||
// path: 'good_categories/:categoryId',
|
||||
// loadComponent: () => import('../../views/categories/').then((m) => m.GuildComponent),
|
||||
// // @ts-ignore
|
||||
// meta: {
|
||||
// title: 'دستهبندی کالا',
|
||||
// },
|
||||
// },
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user