aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/jobs/job.routes.ts
blob: a7bf2b221d5127da039a696d8aa59690873cd0f5 (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
33
34
35
import { Routes } from '@angular/router'

import { UserRightGuard } from '../../core'
import { FollowingAddComponent } from './following-add'
import { UserRight } from '../../../../../shared'
import { FollowingListComponent } from './following-list/following-list.component'
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'
          }
        }
      }
    ]
  }
]