diff --git a/src/controllers/SalaryController.ts b/src/controllers/SalaryController.ts index 31826c8..a8e19b5 100644 --- a/src/controllers/SalaryController.ts +++ b/src/controllers/SalaryController.ts @@ -147,7 +147,7 @@ export class Salary extends Controller { }, }); - if (chk_3fields != null && requestBody.isActive) { + if (chk_3fields != null && requestBody.isActive) { chk_3fields.isActive = false; chk_3fields.lastUpdateUserId = request.user.sub; chk_3fields.lastUpdateFullName = request.user.name; @@ -273,12 +273,12 @@ export class Salary extends Controller { relations: ["posLevel_", "posType_"], order: { // startDate: "DESC", - isActive: "ASC", + isActive: "DESC", posType_: { - posTypeRank: "ASC" + posTypeRank: "DESC" }, posLevel_: { - posLevelRank: "ASC" + posLevelRank: "DESC" }, }, ...(keyword ? {} : { skip: (page - 1) * pageSize, take: pageSize }), @@ -343,7 +343,6 @@ export class Salary extends Controller { @Body() body: { id: string }, @Request() request: { user: Record }, ) { - // try { const salary = await this.salaryRepository.findOne({ relations: ["posLevel_", "posType_", "salaryRanks_"], where: { id: body.id }, @@ -369,8 +368,5 @@ export class Salary extends Controller { ); return new HttpSuccess({ id: newSalary.id }); - // } catch (error: any) { - // throw new Error(error); - // } } }