Commit 0e4b2288 by sawit

ปรับ จองห้องประชุม ใช้เป็น routes

parent 617b07f1
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import { MEETINGBOOKING_ROUTES } from './meeting-booking.routes';
@NgModule({
declarations: [],
imports: [
CommonModule,
HttpClientModule,
RouterModule.forChild(MEETINGBOOKING_ROUTES),
],
providers: []
})
export class MeetingBookingModule { }
import { Routes } from '@angular/router';
export const MEETINGBOOKING_ROUTES: Routes = [
{
path: '',
loadComponent: () => import('./meeting-booking.component').then(m => m.MeetingBookingComponent)
},
{
path: 'meeting-room',
loadComponent: () => import('../meeting-booking/meeting-room/meeting-room.component').then(m => m.MeetingRoomComponent)
}
];
import { Routes } from '@angular/router'; import { Routes } from '@angular/router';
import { moduleAccessGuard } from '../core/guards/module-access.guard'; import { moduleAccessGuard } from '../core/guards/module-access.guard';
import { HomeComponent } from './home/home.component'; import { HomeComponent } from './home/home.component';
import { MeetingBookingComponent } from './meeting-booking/meeting-booking.component';
import { MeetingRoomComponent } from '../portal-manage/meeting-booking/meeting-room/meeting-room.component';
import { MenuPermissionManagementComponent } from './menu-permission-management/menu-permission-management.component'; import { MenuPermissionManagementComponent } from './menu-permission-management/menu-permission-management.component';
// import { CompanyManagementComponent } from './company-management/company-management.component'; // import { CompanyManagementComponent } from './company-management/company-management.component';
...@@ -77,15 +75,8 @@ export const portalManageRoutes: Routes = [ ...@@ -77,15 +75,8 @@ export const portalManageRoutes: Routes = [
// Meeting Booking // Meeting Booking
{ {
path: 'meeting-booking', path: 'meeting-booking',
component: MeetingBookingComponent, canActivate: [moduleAccessGuard],
canActivate: [moduleAccessGuard] loadChildren: () => import('./meeting-booking/meeting-booking.routes').then(m => m.MEETINGBOOKING_ROUTES)
},
// Meeting Room Registry
{
path: 'meeting-rooms',
component: MeetingRoomComponent,
canActivate: [moduleAccessGuard]
}, },
// === การตั้งค่าระบบ === // === การตั้งค่าระบบ ===
......
...@@ -486,7 +486,7 @@ export class NavService implements OnDestroy { ...@@ -486,7 +486,7 @@ export class NavService implements OnDestroy {
type: 'sub', type: 'sub',
active: false, active: false,
children: [ children: [
{ path: '/portal-manage/meeting-rooms', title: 'ทะเบียนห้องประชุม', type: 'link' }, { path: '/portal-manage/meeting-booking/meeting-room', title: 'ทะเบียนห้องประชุม', type: 'link' },
{ path: '/portal-manage/meeting-booking', title: 'จองห้องประชุม', type: 'link' }, { path: '/portal-manage/meeting-booking', 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