// import { UseGuards, Controller, Get, Param, ParseIntPipe, NotFoundException } from "@nestjs/common";
// import { ApiTags, ApiOperation, ApiResponse } from "@nestjs/swagger";
// import { ExpensesArchive,Roles as RoleEnum } from "@prisma/client";
// import { RolesAllowed } from "src/common/decorators/roles.decorators";
// import { ExpensesArchivalService } from "src/time-and-attendance/modules/expenses/services/expenses-archival.service";

// @ApiTags('Expense Archives')
// // @UseGuards()
// @Controller('archives/expenses')
// export class ExpensesArchiveController {
//     constructor(private readonly expensesService: ExpensesArchivalService) {}

//     @Get()
//     //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR)
//     @ApiOperation({ summary: 'List of archived expenses'})
//     @ApiResponse({ status: 200, description: 'List of archived expenses', isArray: true })
//     async findAllArchived(): Promise<ExpensesArchive[]> {
//         return this.expensesService.findAllArchived();
//     }

//     @Get()
//     //@RolesAllowed(RoleEnum.ADMIN, RoleEnum.HR, RoleEnum.SUPERVISOR)
//     @ApiOperation({ summary: 'Fetch expense in archives with its Id'})
//     @ApiResponse({ status: 200, description: 'Archived expense found'})
//     async findOneArchived(@Param('id', ParseIntPipe) id: number ): Promise<ExpensesArchive> {
//         try{
//             return await this.expensesService.findOneArchived(id);
//         }catch {
//             throw new NotFoundException(`Archived expense #${id} not found`);
//         }
//     }
// }