From 48737c094e50fd49d792c655846498dab8dc7551 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Thu, 27 Mar 2025 03:41:24 +0700 Subject: [PATCH] map sort org --- src/controllers/OrganizationController.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index bb806244..d74f5939 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -7564,7 +7564,7 @@ export class OrganizationController extends Controller { where: { orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, }, - order: { isDeputy: "ASC", orgRootOrder: "ASC" }, + order: { isDeputy: "DESC", orgRootOrder: "ASC" }, select: ["orgRootName"], }); const posType = await this.posTypeRepository.find({ @@ -7576,9 +7576,9 @@ export class OrganizationController extends Controller { select: ["posLevelName"], }); return new HttpSuccess({ - root: root, - posTypeNameOrder: posType, - posLevelNameOrder: posLevel, + root: root.map((x) => x.orgRootName), + posTypeNameOrder: posType.map((x) => x.posTypeName), + posLevelNameOrder: posLevel.map((x) => x.posLevelName), }); } }