2018-05-25 13:49:00 +00:00
|
|
|
import {NgModule} from '@angular/core';
|
|
|
|
import {CommonModule} from '@angular/common';
|
|
|
|
import {RouterModule, Routes} from '@angular/router';
|
|
|
|
import {AttendanceResolver} from './attendance-resolver.service';
|
|
|
|
import {AuthGuard} from '../auth/auth-guard.service';
|
|
|
|
import {AttendanceComponent} from './attendance.component';
|
|
|
|
import {AttendanceTypeResolver} from './attendance-type-resolver.service';
|
|
|
|
|
|
|
|
const attendanceRoutes: Routes = [
|
|
|
|
{
|
2019-06-12 14:04:50 +00:00
|
|
|
path: '',
|
2018-05-25 13:49:00 +00:00
|
|
|
component: AttendanceComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
data: {
|
|
|
|
permission: 'Attendance'
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
info: AttendanceResolver,
|
|
|
|
attendanceTypes: AttendanceTypeResolver
|
|
|
|
},
|
|
|
|
runGuardsAndResolvers: 'always'
|
|
|
|
},
|
|
|
|
{
|
2019-06-12 14:04:50 +00:00
|
|
|
path: ':date',
|
2018-05-25 13:49:00 +00:00
|
|
|
component: AttendanceComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
data: {
|
|
|
|
permission: 'Attendance'
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
info: AttendanceResolver,
|
|
|
|
attendanceTypes: AttendanceTypeResolver
|
|
|
|
},
|
|
|
|
runGuardsAndResolvers: 'always'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
CommonModule,
|
|
|
|
RouterModule.forChild(attendanceRoutes)
|
|
|
|
|
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
RouterModule
|
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
AttendanceResolver
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export class AttendanceRoutingModule {
|
|
|
|
}
|