2020-10-01 15:21:22 +00:00
|
|
|
import { CommonModule } from '@angular/common';
|
2020-10-10 03:15:05 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
2020-10-01 15:21:22 +00:00
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
2020-10-10 03:15:05 +00:00
|
|
|
|
|
|
|
import { AttendanceTypeResolver } from '../attendance/attendance-type-resolver.service';
|
2020-10-01 15:21:22 +00:00
|
|
|
import { AuthGuard } from '../auth/auth-guard.service';
|
2020-10-10 03:15:05 +00:00
|
|
|
|
|
|
|
import { EmployeeAttendanceResolver } from './employee-attendance-resolver.service';
|
2020-10-01 15:21:22 +00:00
|
|
|
import { EmployeeAttendanceComponent } from './employee-attendance.component';
|
2018-05-25 13:49:00 +00:00
|
|
|
|
|
|
|
const employeeEmployeeAttendanceRoutes: Routes = [
|
|
|
|
{
|
2019-06-12 14:04:50 +00:00
|
|
|
path: '',
|
2018-05-25 13:49:00 +00:00
|
|
|
component: EmployeeAttendanceComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
data: {
|
2020-10-01 15:21:22 +00:00
|
|
|
permission: 'Attendance',
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
info: EmployeeAttendanceResolver,
|
2020-10-01 15:21:22 +00:00
|
|
|
attendanceTypes: AttendanceTypeResolver,
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
2020-10-01 15:21:22 +00:00
|
|
|
runGuardsAndResolvers: 'always',
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
|
|
|
{
|
2019-06-12 14:04:50 +00:00
|
|
|
path: ':id',
|
2018-05-25 13:49:00 +00:00
|
|
|
component: EmployeeAttendanceComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
data: {
|
2020-10-01 15:21:22 +00:00
|
|
|
permission: 'Attendance',
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
info: EmployeeAttendanceResolver,
|
2020-10-01 15:21:22 +00:00
|
|
|
attendanceTypes: AttendanceTypeResolver,
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
2020-10-01 15:21:22 +00:00
|
|
|
runGuardsAndResolvers: 'always',
|
|
|
|
},
|
2018-05-25 13:49:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2020-10-01 15:21:22 +00:00
|
|
|
imports: [CommonModule, RouterModule.forChild(employeeEmployeeAttendanceRoutes)],
|
|
|
|
exports: [RouterModule],
|
|
|
|
providers: [EmployeeAttendanceResolver],
|
2018-05-25 13:49:00 +00:00
|
|
|
})
|
2020-10-01 15:21:22 +00:00
|
|
|
export class EmployeeAttendanceRoutingModule {}
|