]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/routing.module.ts
LP2045292 Color contrast for AngularJS patron bills
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / routing.module.ts
1 import {NgModule} from '@angular/core';
2 import {RouterModule, Routes} from '@angular/router';
3 import {StaffResolver} from './resolver.service';
4 import {StaffComponent} from './staff.component';
5 import {StaffLoginComponent} from './login.component';
6 import {StaffSplashComponent} from './splash.component';
7 import {AboutComponent} from './about.component';
8
9 // Not using 'canActivate' because it's called before all resolvers,
10 // even the parent resolver, but the resolvers parse the IDL, load settings,
11 // etc.  Chicken, meet egg.
12
13 const routes: Routes = [{
14   path: '',
15   component: StaffComponent,
16   resolve: {staffResolver : StaffResolver},
17   children: [{
18     path: '',
19     redirectTo: 'splash',
20     pathMatch: 'full',
21   }, {
22     path: 'booking',
23     loadChildren: () =>
24       import('./booking/booking.module').then(m => m.BookingModule)
25   }, {
26     path: 'about',
27     component: AboutComponent
28   }, {
29     path: 'login',
30     component: StaffLoginComponent
31   }, {
32     path: 'splash',
33     component: StaffSplashComponent
34   }, {
35     path: 'circ',
36     loadChildren: () =>
37       import('./circ/routing.module').then(m => m.CircRoutingModule)
38   }, {
39     path: 'cat',
40     loadChildren: () =>
41       import('./cat/routing.module').then(m => m.CatRoutingModule)
42   }, {
43     path: 'catalog',
44     loadChildren: () =>
45       import('./catalog/catalog.module').then(m => m.CatalogModule)
46   }, {
47     path: 'sandbox',
48     loadChildren: () =>
49       import('./sandbox/sandbox.module').then(m => m.SandboxModule)
50   }, {
51     path: 'admin',
52     loadChildren: () =>
53       import('./admin/routing.module').then(m => m.AdminRoutingModule)
54   }]
55 }];
56
57 @NgModule({
58   imports: [RouterModule.forChild(routes)],
59   exports: [RouterModule],
60   providers: [StaffResolver]
61 })
62
63 export class StaffRoutingModule {}
64