From 55ec0d5e93e5476254e46500f8a513b9deefbfcc Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 5 Mar 2024 10:22:40 +0700 Subject: [PATCH 1/2] fix --- src/controllers/SalaryPeriodController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index 2faf5fd..dec0f0e 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -417,7 +417,7 @@ export class SalaryPeriodController extends Controller { const checkPreviousType = await this.salaryProfileRepository.findOne({ relations: ["salaryOrg", "salaryOrg.salaryPeriod"], where: { - id: body.profileId, + citizenId: salaryProfile?.citizenId, salaryOrg: { salaryPeriod: { period: "APR", From 9f19dfbd2878c986e6219a5dc00973001135b1ef Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 5 Mar 2024 10:29:24 +0700 Subject: [PATCH 2/2] fix word --- src/controllers/SalaryPeriodController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index dec0f0e..eb8526a 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -677,7 +677,7 @@ export class SalaryPeriodController extends Controller { if (salaryProfileAll != null) { throw new HttpError( HttpStatusCode.INTERNAL_SERVER_ERROR, - "ไม่สามารถเพิ่มรายชื่อนี้ได้ เนื่องจากมีการยื่นของเลื่อนเงินเดือนแล้ว", + "ไม่สามารถเพิ่มรายชื่อนี้ได้ เนื่องจากมีการยื่นขอเลื่อนเงินเดือนแล้ว", ); }