Commit f110dfb9 by Ooh-Ao

เมนูพนักดงาน

parent f47c946b
...@@ -6,10 +6,12 @@ import { BorrowProductEmpComponent } from './borrow-product-emp/borrow-product-e ...@@ -6,10 +6,12 @@ import { BorrowProductEmpComponent } from './borrow-product-emp/borrow-product-e
import { HistoryEmpComponent } from './history-emp/history-emp.component'; import { HistoryEmpComponent } from './history-emp/history-emp.component';
import { EmpInformationComponent } from './emp-information/emp-information.component'; import { EmpInformationComponent } from './emp-information/emp-information.component';
import { ReturnProductEmpComponent } from './return-product-emp/return-product-emp.component'; import { ReturnProductEmpComponent } from './return-product-emp/return-product-emp.component';
import { EmployeeRoutingModule } from './employee.routing';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule CommonModule,
EmployeeRoutingModule
], ],
declarations: [EmployeeComponent, HomeEmployeeComponent, BorrowProductEmpComponent, HistoryEmpComponent, EmpInformationComponent, ReturnProductEmpComponent] declarations: [EmployeeComponent, HomeEmployeeComponent, BorrowProductEmpComponent, HistoryEmpComponent, EmpInformationComponent, ReturnProductEmpComponent]
}) })
......
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeEmployeeComponent } from './home-employee/home-employee.component';
import { BorrowProductEmpComponent } from './borrow-product-emp/borrow-product-emp.component';
import { EmpInformationComponent } from './emp-information/emp-information.component';
import { HistoryEmpComponent } from './history-emp/history-emp.component';
import { ReturnProductEmpComponent } from './return-product-emp/return-product-emp.component';
const routes: Routes = [
{
path: "employee",
children: [
{ path: "home", component: HomeEmployeeComponent },
{ path: "emp-infomation", component: EmpInformationComponent },
{ path: "borrow-emp", component: BorrowProductEmpComponent },
{ path: "return-emp", component: ReturnProductEmpComponent },
{ path: "history-emp", component: HistoryEmpComponent },
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class EmployeeRoutingModule { }
...@@ -72,7 +72,7 @@ export class SidebarComponent { ...@@ -72,7 +72,7 @@ export class SidebarComponent {
} }
ngOnInit() { ngOnInit() {
if(true){ if(!true){
this.menuitemsSubscribe$ = this.navServices.itemsAdmin.subscribe((items) => { this.menuitemsSubscribe$ = this.navServices.itemsAdmin.subscribe((items) => {
this.menuItems = items; this.menuItems = items;
}); });
......
...@@ -72,5 +72,9 @@ export const content: Routes = [ ...@@ -72,5 +72,9 @@ export const content: Routes = [
path: '', path: '',
loadChildren: () => import('../../admin/admin.module').then(m => m.AdminModule) loadChildren: () => import('../../admin/admin.module').then(m => m.AdminModule)
}, },
{
path: '',
loadChildren: () => import('../../employee/employee.module').then(m => m.EmployeeModule)
},
]; ];
...@@ -688,5 +688,23 @@ export class NavService implements OnDestroy { ...@@ -688,5 +688,23 @@ export class NavService implements OnDestroy {
}, },
], ],
}]); }]);
itemsEmp = new BehaviorSubject<Menu[]>(this.MENUITEMS); itemsEmp = new BehaviorSubject<Menu[]>([{ headTitle: 'พนักงาน' },
{ path: '/employee/home', title: 'หน้าแรก', type: 'link' },
{ path: '/employee/emp-infomation', title: 'ข้อมูลพนักงาน', type: 'link' }
, {
title: 'การเบิกคืนอุปกรณ์',
type: 'sub',
selected: false,
Menusub: true,
active: false,
children: [
{ path: '/employee/borrow-emp', title: 'ข้อมูลการข้อเบิก', type: 'link' },
{ path: '/employee/return-emp', title: 'ข้อมูลการคืน', type: 'link' },
{
path: '/employee/history-emp',
title: 'ประวัติการทำรายการ',
type: 'link',
},
],
}]);
} }
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