From 50484f7e7cea9ce622c252734a1b62573f989dc8 Mon Sep 17 00:00:00 2001 From: Bright Date: Thu, 7 Mar 2024 15:47:22 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20order=20?= =?UTF-8?q?by?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/SalaryController.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/SalaryController.ts b/src/controllers/SalaryController.ts index b2e8192..31826c8 100644 --- a/src/controllers/SalaryController.ts +++ b/src/controllers/SalaryController.ts @@ -272,7 +272,14 @@ export class Salary extends Controller { const [salary, total] = await this.salaryRepository.findAndCount({ relations: ["posLevel_", "posType_"], order: { - startDate: "DESC", + // startDate: "DESC", + isActive: "ASC", + posType_: { + posTypeRank: "ASC" + }, + posLevel_: { + posLevelRank: "ASC" + }, }, ...(keyword ? {} : { skip: (page - 1) * pageSize, take: pageSize }), });