]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/routing.module.ts
LP1889128 Support user settings for SMS prefs
[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: 'acq',
23     loadChildren: () =>
24       import('@eg/staff/acq/routing.module').then(m => m.AcqRoutingModule)
25   }, {
26     path: 'booking',
27     loadChildren: () =>
28       import('./booking/booking.module').then(m => m.BookingModule)
29   }, {
30     path: 'about',
31     component: AboutComponent
32   }, {
33     path: 'login',
34     component: StaffLoginComponent
35   }, {
36     path: 'splash',
37     component: StaffSplashComponent
38   }, {
39     path: 'circ',
40     loadChildren: () =>
41       import('./circ/routing.module').then(m => m.CircRoutingModule)
42   }, {
43     path: 'cat',
44     loadChildren: () =>
45       import('./cat/cat.module').then(m => m.CatModule)
46   }, {
47     path: 'catalog',
48     loadChildren: () =>
49       import('./catalog/catalog.module').then(m => m.CatalogModule)
50   }, {
51     path: 'sandbox',
52     loadChildren: () =>
53       import('./sandbox/sandbox.module').then(m => m.SandboxModule)
54   }, {
55     path: 'hopeless',
56     loadChildren: () =>
57       import('@eg/staff/hopeless/hopeless.module').then(m => m.HopelessModule)
58   }, {
59     path: 'admin',
60     loadChildren: () =>
61       import('./admin/routing.module').then(m => m.AdminRoutingModule)
62   }]
63 }];
64
65 @NgModule({
66   imports: [RouterModule.forChild(routes)],
67   exports: [RouterModule],
68   providers: [StaffResolver]
69 })
70
71 export class StaffRoutingModule {}
72