refactor user accounts structure
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from './menuItems.const';
|
||||
@@ -0,0 +1,12 @@
|
||||
import { MenuItem } from 'primeng/api';
|
||||
export const PARTNER_MENU_ITEMS = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
label: 'داشبورد',
|
||||
icon: 'pi pi-fw pi-home',
|
||||
routerLink: ['/'],
|
||||
},
|
||||
],
|
||||
},
|
||||
] as MenuItem[];
|
||||
@@ -0,0 +1 @@
|
||||
<router-outlet></router-outlet>
|
||||
@@ -0,0 +1,17 @@
|
||||
import { LayoutService } from '@/layout/service/layout.service';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { PARTNER_MENU_ITEMS } from '../constants';
|
||||
|
||||
@Component({
|
||||
selector: 'partner-layout',
|
||||
templateUrl: './layout.component.html',
|
||||
imports: [RouterOutlet],
|
||||
})
|
||||
export class LayoutComponent {
|
||||
private readonly layoutService = inject(LayoutService);
|
||||
|
||||
ngOnInit() {
|
||||
this.layoutService.setMenuItems(PARTNER_MENU_ITEMS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="flex items-center justify-center h-svh w-svw">
|
||||
<span class="text-center"> به پنل کسب و کار خوش آمدید </span>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'partner-dashboard',
|
||||
templateUrl: './index.component.html',
|
||||
})
|
||||
export class DashboardComponent {
|
||||
constructor() {}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
export const PARTNER_ROUTES = {
|
||||
path: 'partner',
|
||||
component: undefined,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadComponent: () =>
|
||||
import('./modules/dashboard/views/index.component').then((m) => m.DashboardComponent),
|
||||
},
|
||||
],
|
||||
} as Route;
|
||||
Reference in New Issue
Block a user