From 3ee1f5ed0fd14b7b85e75f6cde6fe36639c424de Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 26 Sep 2024 11:54:59 +0700 Subject: [PATCH] fix: update sort --- src/controllers/03-customer-branch-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/03-customer-branch-controller.ts b/src/controllers/03-customer-branch-controller.ts index 4f6bb60..fe48406 100644 --- a/src/controllers/03-customer-branch-controller.ts +++ b/src/controllers/03-customer-branch-controller.ts @@ -207,7 +207,7 @@ export class CustomerBranchController extends Controller { const [result, total] = await prisma.$transaction([ prisma.customerBranch.findMany({ - orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }], + orderBy: [{ code: "asc" }, { statusOrder: "asc" }, { createdAt: "asc" }], include: { customer: includeCustomer, province: true,