32 lines
1.5 KiB
TypeScript
32 lines
1.5 KiB
TypeScript
// import { Controller, Get, NotFoundException, Param, ParseIntPipe, UseGuards } from "@nestjs/common";
|
|
// import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger";
|
|
// import { RolesAllowed } from "src/common/decorators/roles.decorators";
|
|
// import { TimesheetArchiveService } from "src/time-and-attendance/modules/time-tracker/timesheets/services/timesheet-archive.service";
|
|
|
|
// @ApiTags('Timesheet Archives')
|
|
// // @UseGuards()
|
|
// @Controller('archives/timesheets')
|
|
// export class TimesheetsArchiveController {
|
|
// constructor(private readonly timesheetsService: TimesheetArchiveService) {}
|
|
|
|
// @Get()
|
|
// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR)
|
|
// @ApiOperation({ summary: 'List of archived timesheets'})
|
|
// @ApiResponse({ status: 200, description: 'List of archived timesheets', isArray: true })
|
|
// async findAllArchived(): Promise<TimesheetsArchive[]> {
|
|
// return this.timesheetsService.findAllArchived();
|
|
// }
|
|
|
|
// @Get()
|
|
// //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR)
|
|
// @ApiOperation({ summary: 'Fetch timesheet in archives with its Id'})
|
|
// @ApiResponse({ status: 200, description: 'Archived timesheet found'})
|
|
// async findOneArchived(@Param('id', ParseIntPipe) id: number ): Promise<TimesheetsArchive> {
|
|
// try{
|
|
// return await this.timesheetsService.findOneArchived(id);
|
|
// }catch {
|
|
// throw new NotFoundException(`Archived timesheet #${id} not found`);
|
|
// }
|
|
// }
|
|
|
|
// }
|