Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 1 | import {Route} from '@angular/router'; |
| 2 | import {ServicePlanningComponent, ServicePlanningEmptyComponent} from "./service-planning/service-planning.component"; |
| 3 | import {FlagsResolve} from "../shared/resolvers/flag/flag.resolver"; |
| 4 | import {ViewEditResolver} from "../shared/resolvers/viewEdit/viewEdit.resolver"; |
| 5 | import {DrawingBoardGuard} from "./guards/servicePlanningGuard/drawingBoardGuard"; |
| 6 | import {RetryResolver} from "../shared/resolvers/retry/retry.resolver"; |
| 7 | |
| 8 | export 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 | |