aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/jobs/job.routes.ts
blob: 331dc2af2cd1aaf803b258bd851a5d8b571a1090 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Routes } from '@angular/router'
import { UserRight } from '../../../../../shared'
import { UserRightGuard } from '../../core'
import { JobsComponent } from './job.component'
import { JobsListComponent } from './jobs-list/jobs-list.component'

export const JobsRoutes: Routes = [
  {
    path: 'jobs',
    component: JobsComponent,
    canActivate: [ UserRightGuard ],
    data: {
      userRight: UserRight.MANAGE_JOBS
    },
    children: [
      {
        path: '',
        redirectTo: 'list',
        pathMatch: 'full'
      },
      {
        path: 'list',
        component: JobsListComponent,
        data: {
          meta: {
            title: 'Jobs list'
          }
        }
      }
    ]
  }
]