blob: 0c1fa700c1682181b362e03f054a66ea8c5522df [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001import {Route} from '@angular/router';
2import {ServicePlanningComponent, ServicePlanningEmptyComponent} from "./service-planning/service-planning.component";
3import {FlagsResolve} from "../shared/resolvers/flag/flag.resolver";
4import {ViewEditResolver} from "../shared/resolvers/viewEdit/viewEdit.resolver";
5import {DrawingBoardGuard} from "./guards/servicePlanningGuard/drawingBoardGuard";
6import {RetryResolver} from "../shared/resolvers/retry/retry.resolver";
7
8export const DrawingBoardRoutes: Route[] = [
9 {
10 path: 'servicePlanning',
11 children: [
12 {
13 path: 'EDIT',
14 component: ServicePlanningComponent,
15 resolve: {
16 flags: FlagsResolve,
17 viewEditResolver: ViewEditResolver
18 },
19 canActivate: [DrawingBoardGuard]
20 },
21 {
22 path: 'VIEW',
23 component: ServicePlanningComponent,
24 resolve: {
25 flags: FlagsResolve,
26 viewEditResolver: ViewEditResolver
27 }
28 },
29 {
30 path: 'RETRY_EDIT',
31 component: ServicePlanningComponent,
32 resolve: {
33 flags: FlagsResolve,
34 viewEditResolver: RetryResolver
35 },
36 canActivate: [DrawingBoardGuard]
37 },
38 {
39 path: 'RETRY',
40 component: ServicePlanningComponent,
41 resolve: {
42 flags: FlagsResolve,
43 viewEditResolver: RetryResolver
44 }
45 },
46 {
47 path: '',
48 component: ServicePlanningComponent,
49 resolve: {
50 flags: FlagsResolve
51 },
52 }
53 ]
54 },
55 {
56 path: 'servicePlanningEmpty',
57 component: ServicePlanningEmptyComponent,
58 resolve: {
59 flags: FlagsResolve,
60 }
61 },
62];
63