From 229c1a8e4dbc71d9d90814681d37dd57b5b6ee38 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 8 Jul 2024 11:05:57 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20remark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/SalaryPeriodController.ts | 6 +++++- src/controllers/SalaryPeriodEmployeeController.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index 4e87a72..6b204cd 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -795,7 +795,9 @@ export class SalaryPeriodController extends Controller { * @param {string} type ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น */ @Post("change/type") - async changeType(@Body() body: { profileId: string; type: string; isReserve: boolean }) { + async changeType( + @Body() body: { profileId: string; type: string; isReserve: boolean; remark?: string | null }, + ) { const salaryProfile = await this.salaryProfileRepository.findOne({ relations: ["salaryOrg", "salaryOrg.salaryPeriod"], where: { id: body.profileId }, @@ -867,6 +869,8 @@ export class SalaryPeriodController extends Controller { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง"); } salaryProfile.type = body.type; + let _null: any = null; + salaryProfile.remark = body.remark == null ? _null : body.remark; let type = salaryProfile.type; //SalaryRank let salaryRanks: any = null; diff --git a/src/controllers/SalaryPeriodEmployeeController.ts b/src/controllers/SalaryPeriodEmployeeController.ts index 4c092f7..6c4a74d 100644 --- a/src/controllers/SalaryPeriodEmployeeController.ts +++ b/src/controllers/SalaryPeriodEmployeeController.ts @@ -1535,6 +1535,7 @@ export class SalaryPeriodEmployeeController extends Controller { isRetired: item.isRetired, isReserve: item.isReserve, isNext: item.isNext, + remark: item.remark, })); return new HttpSuccess({ data: mapSalaryProfile, total }); }