From 4785aad08c88b8ad02091cafb71c04e36055afc3 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 5 Mar 2025 15:10:16 +0700 Subject: [PATCH] updated salary position of user --- src/controllers/ProfileSalaryController.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileSalaryController.ts b/src/controllers/ProfileSalaryController.ts index 5780e4fc..2407809b 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -37,7 +37,7 @@ export class ProfileSalaryController extends Controller { throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว"); } const record = await this.salaryRepo.find({ - where: { profileId: profile.id }, + where: { profileId: profile.id, commandCode: In(["5", "6", "7"]) }, order: { order: "ASC" }, }); return new HttpSuccess(record); @@ -50,7 +50,25 @@ export class ProfileSalaryController extends Controller { throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว"); } const record = await this.salaryRepo.find({ - where: { profileId: profile.id }, + where: { + profileId: profile.id, + commandCode: In([ + "0", + "9", + "1", + "2", + "3", + "4", + "8", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + ]), + }, order: { order: "ASC" }, }); return new HttpSuccess(record);