From d10c38d1b921e7c2453b4b974d0ae6daba1cb2d9 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 11 Oct 2024 10:10:50 +0700 Subject: [PATCH] no message --- src/controllers/CommandController.ts | 44 ++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index dc1fd73b..8206e076 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -2517,6 +2517,22 @@ export class CommandController extends Controller { await this.profileEmployeeRepository.save(data); return new HttpSuccess(); } + @Post("command21/employee/delete") + public async command21SalaryEmployeeDelete( + @Request() req: RequestWithUser, + @Body() + body: { + refIds: string[]; + }, + ) { + const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } }); + const data = profile.map((_data) => ({ + ..._data, + statusTemp: "WAITTING", + })); + await this.profileEmployeeRepository.save(data); + return new HttpSuccess(); + } @Post("command40/officer/report/excecute") public async command40SalaryOfficerExcecute( @@ -2545,12 +2561,28 @@ export class CommandController extends Controller { refIds: string[]; }, ) { - const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } }); - const data = profile.map((_data) => ({ - ..._data, - statusTemp: "DONE", - })); - await this.profileEmployeeRepository.save(data); + // const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } }); + // const data = profile.map((_data) => ({ + // ..._data, + // statusTemp: "DONE", + // })); + // await this.profileEmployeeRepository.save(data); + return new HttpSuccess(); + } + @Post("command40/officer/delete") + public async command40SalaryOfficerDelete( + @Request() req: RequestWithUser, + @Body() + body: { + refIds: string[]; + }, + ) { + // const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } }); + // const data = profile.map((_data) => ({ + // ..._data, + // statusTemp: "WAITTING", + // })); + // await this.profileEmployeeRepository.save(data); return new HttpSuccess(); } @Post("command40/officer/report/attachment")