Commit f47c946b by Ooh-Ao

admin routing menu

parent cb2863f0
......@@ -2,6 +2,12 @@ import { Routes, RouterModule } from '@angular/router';
import { HomeAdminComponent } from './home-admin/home-admin.component';
import { UserManagementComponent } from './user-management/user-management.component';
import { NgModule } from '@angular/core';
import { HistoryProductComponent } from './history-product/history-product.component';
import { ProductManagementComponent } from './product-management/product-management.component';
import { ProjectManagementComponent } from './project-management/project-management.component';
import { ProjectEmployeeManagementComponent } from './project-management/project-employee-management/project-employee-management.component';
import { ProjectProductManagementComponent } from './project-management/project-product-management/project-product-management.component';
import { TransectionProductManagementComponent } from './transection-product-management/transection-product-management.component';
const routes: Routes = [
{
......@@ -9,6 +15,15 @@ const routes: Routes = [
children: [
{ path: "home", component: HomeAdminComponent },
{ path: "user-management", component: UserManagementComponent },
{ path: "product-management", component: ProductManagementComponent },
{
path: "project-management", component: ProjectManagementComponent, children: [
{ path: "employee", component: ProjectEmployeeManagementComponent },
{ path: "product", component: ProjectProductManagementComponent }
]
},
{ path: "approve-borrow", component: TransectionProductManagementComponent },
{ path: "history-product", component: HistoryProductComponent },
]
}
......
......@@ -657,7 +657,7 @@ export class NavService implements OnDestroy {
// Array
items = new BehaviorSubject<Menu[]>(this.MENUITEMS);
itemsAdmin = new BehaviorSubject<Menu[]>([{ headTitle: 'Admin' },
{ path: '/dashboard/stocks', title: 'หน้าแรก', type: 'link' },
{ path: '/admin/home', title: 'หน้าแรก', type: 'link' },
{
title: 'การจัดการ',
type: 'sub',
......@@ -665,14 +665,28 @@ export class NavService implements OnDestroy {
Menusub: true,
active: false,
children: [
{ path: '/mail/chat', title: 'การจัดการสมาชิก', type: 'link' },
{ path: '/mail/mail', title: 'การจัดการอุปกรณ์', type: 'link' },
{ path: '/admin/user-management', title: 'การจัดการสมาชิก', type: 'link' },
{ path: '/admin/product-management', title: 'การจัดการอุปกรณ์', type: 'link' },
{
path: '/mail/mail-settings',
title: 'การจัดการอุปกรณ์',
path: '/admin/project-management',
title: 'การจัดการโครงการ',
type: 'link',
},
],
},]);
}, {
title: 'การเบิกคืนอุปกรณ์',
type: 'sub',
selected: false,
Menusub: true,
active: false,
children: [
{ path: '/admin/approve-borrow', title: 'อนุมัติการเบิก-คืน', type: 'link' },
{
path: '/admin/history-product',
title: 'ประวัติการทำรายการ',
type: 'link',
},
],
}]);
itemsEmp = new BehaviorSubject<Menu[]>(this.MENUITEMS);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment