From 5d268bdd6f3845456c21228e9097476e06100bc5 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Tue, 29 Jul 2025 22:41:56 +0700 Subject: [PATCH] update status command --- src/controllers/CommandController.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 3e21ae8b..e7428fa5 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -6125,12 +6125,13 @@ export class CommandController extends Controller { @Body() body: { refIds: string[]; + status: string; }, ) { const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } }); const data = profile.map((_data) => ({ ..._data, - statusTemp: "REPORT", + statusTemp: body.status, })); await this.profileEmployeeRepository.save(data); return new HttpSuccess(); @@ -6142,12 +6143,13 @@ export class CommandController extends Controller { @Body() body: { refIds: string[]; + status: string; }, ) { const posMasters = await this.posMasterRepository.find({ where: { id: In(body.refIds) } }); const data = posMasters.map((_data) => ({ ..._data, - statusReport: "REPORT", + statusReport: body.status, })); await this.posMasterRepository.save(data); if (posMasters && posMasters.length > 0) { @@ -6169,12 +6171,13 @@ export class CommandController extends Controller { @Body() body: { refIds: string[]; + status: string; }, ) { const posMasters = await this.posMasterActRepository.find({ where: { id: In(body.refIds) } }); const data = posMasters.map((_data) => ({ ..._data, - statusReport: "REPORT", + statusReport: body.status, })); await this.posMasterActRepository.save(data); return new HttpSuccess();