From 8e82201fbdc535016fe1e9986c5a9244818ae761 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 17 Jul 2024 17:15:21 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=84=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94?= =?UTF-8?q?=E0=B8=B7=E0=B8=AD=E0=B8=99=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/SalaryPeriodController.ts | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index d9fe85f..8d271b3 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -1645,7 +1645,7 @@ export class SalaryPeriodController extends Controller { salaryOrgNew.lastUpdateUserId = request.user.sub; salaryOrgNew.lastUpdateFullName = request.user.name; salaryOrgNew.group = "GROUP1"; - await this.salaryOrgRepository.save(salaryOrgNew); + await this.salaryOrgEmployeeRepository.save(salaryOrgNew); }), ); } @@ -1755,7 +1755,7 @@ export class SalaryPeriodController extends Controller { salaryOrgNew.lastUpdateUserId = request.user.sub; salaryOrgNew.lastUpdateFullName = request.user.name; salaryOrgNew.group = "GROUP1"; - await this.salaryOrgRepository.save(salaryOrgNew); + await this.salaryOrgEmployeeRepository.save(salaryOrgNew); }), ); } @@ -2070,11 +2070,11 @@ export class SalaryPeriodController extends Controller { salaryOrgNew.lastUpdateFullName = request.user.name; salaryOrgNew.group = "GROUP1"; await this.salaryOrgEmployeeRepository.save(salaryOrgNew); - // if (salaryPeriod.period != "SPECIAL") { - // delete salaryOrgNew.id; - // salaryOrgNew.group = "GROUP2"; - // await this.salaryOrgRepository.save(salaryOrgNew); - // } + if (salaryPeriod.period != "SPECIAL") { + delete salaryOrgNew.id; + salaryOrgNew.group = "GROUP2"; + await this.salaryOrgEmployeeRepository.save(salaryOrgNew); + } }), ); if (salaryPeriod.period != "SPECIAL") { @@ -2561,11 +2561,11 @@ export class SalaryPeriodController extends Controller { salaryOrgNew.lastUpdateFullName = request.user.name; salaryOrgNew.group = "GROUP1"; await this.salaryOrgRepository.save(salaryOrgNew); - // if (salaryPeriod.period != "SPECIAL") { - // delete salaryOrgNew.id; - // salaryOrgNew.group = "GROUP2"; - // await this.salaryOrgRepository.save(salaryOrgNew); - // } + if (salaryPeriod.period != "SPECIAL") { + delete salaryOrgNew.id; + salaryOrgNew.group = "GROUP2"; + await this.salaryOrgEmployeeRepository.save(salaryOrgNew); + } }), );