From f1d9831055246db26aaa799bc28f7cdb10194174 Mon Sep 17 00:00:00 2001 From: harid Date: Thu, 19 Feb 2026 13:35:12 +0700 Subject: [PATCH] comment call leave service --- src/controllers/CommandController.ts | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 25ef41bb..dd369b64 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -5813,10 +5813,10 @@ export class CommandController extends Controller { .orgRootShortName ?? ""; } } - const leaveType = await this.leaveType.findOne({ - select: { id: true, limit: true, code: true }, - where: { code: "LV-005" } - }); + // const leaveType = await this.leaveType.findOne({ + // select: { id: true, limit: true, code: true }, + // where: { code: "LV-005" } + // }); await Promise.all( body.data.map(async (item) => { const profile = await this.profileRepository.findOne({ @@ -5912,25 +5912,25 @@ export class CommandController extends Controller { { id: In(profileIds) }, { isProbation: false } ); - // Task #2304 อัปเดตจำนวนสิทธิ์การลา เมื่อผ่านทดลองงานฯ - if (leaveType != null) { - await Promise.all( - body.data.map((item) => - new CallAPI().PutData(req, `/leave-beginning/schedule`, { - profileId: item.profileId, - leaveTypeId: leaveType.id, - leaveYear: item.commandYear, - leaveDays: leaveType.limit, - leaveDaysUsed: 0, - leaveCount: 0, - beginningLeaveDays: 0, - beginningLeaveCount: 0, - }) - .then(() => {}) - .catch(() => {}) - ) - ); - } + // // Task #2304 อัปเดตจำนวนสิทธิ์การลา เมื่อผ่านทดลองงานฯ + // if (leaveType != null) { + // await Promise.all( + // body.data.map((item) => + // new CallAPI().PutData(req, `/leave-beginning/schedule`, { + // profileId: item.profileId, + // leaveTypeId: leaveType.id, + // leaveYear: item.commandYear, + // leaveDays: leaveType.limit, + // leaveDaysUsed: 0, + // leaveCount: 0, + // beginningLeaveDays: 0, + // beginningLeaveCount: 0, + // }) + // .then(() => {}) + // .catch(() => {}) + // ) + // ); + // } } return new HttpSuccess(); }