]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/routing.module.ts
LP2045292 Color contrast for AngularJS patron bills
[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: 'no_permission',
37     component: StaffSplashComponent
38   }, {
39     path: 'splash',
40     component: StaffSplashComponent
41   }, {
42     path: 'circ',
43     loadChildren: () =>
44       import('./circ/routing.module').then(m => m.CircRoutingModule)
45   }, {
46     path: 'cat',
47     loadChildren: () =>
48       import('./cat/cat.module').then(m => m.CatModule)
49   }, {
50     path: 'catalog',
51     loadChildren: () =>
52       import('./catalog/catalog.module').then(m => m.CatalogModule)
53   }, {
54     path: 'reporter',
55     loadChildren: () =>
56       import('@eg/staff/reporter/routing.module').then(m => m.ReporterRoutingModule)
57   }, {
58     path: 'sandbox',
59     loadChildren: () =>
60       import('./sandbox/sandbox.module').then(m => m.SandboxModule)
61   }, {
62     path: 'hopeless',
63     loadChildren: () =>
64       import('@eg/staff/hopeless/hopeless.module').then(m => m.HopelessModule)
65   }, {
66     path: 'admin',
67     loadChildren: () =>
68       import('./admin/routing.module').then(m => m.AdminRoutingModule)
69   }]
70 }];
71
72 @NgModule({
73   imports: [RouterModule.forChild(routes)],
74   exports: [RouterModule],
75   providers: [StaffResolver]
76 })
77
78 export class StaffRoutingModule {}
79