From 7f1802c88e2586e54317493ba048299377747b66 Mon Sep 17 00:00:00 2001 From: Adisak Date: Mon, 26 Jan 2026 13:37:36 +0700 Subject: [PATCH] #2232 --- src/controllers/StrategyController.ts | 131 ++++++++++++++------------ 1 file changed, 70 insertions(+), 61 deletions(-) diff --git a/src/controllers/StrategyController.ts b/src/controllers/StrategyController.ts index 1f5b4c0..cb640bb 100644 --- a/src/controllers/StrategyController.ts +++ b/src/controllers/StrategyController.ts @@ -68,27 +68,27 @@ export class StrategyController extends Controller { order: child2.order, children: child2.strategyChild3s ? child2.strategyChild3s.map((child3) => ({ - id: child3.id, - level: 3, - name: child3.strategyChild3Name, - order: child3.order, - children: child3.strategyChild4s - ? child3.strategyChild4s.map((child4) => ({ - id: child4.id, - level: 4, - name: child4.strategyChild4Name, - order: child4.order, - children: child4.strategyChild5s - ? child4.strategyChild5s.map((child5) => ({ - id: child5.id, - level: 5, - name: child5.strategyChild5Name, - order: child5.order, - })) - : [], + id: child3.id, + level: 3, + name: child3.strategyChild3Name, + order: child3.order, + children: child3.strategyChild4s + ? child3.strategyChild4s.map((child4) => ({ + id: child4.id, + level: 4, + name: child4.strategyChild4Name, + order: child4.order, + children: child4.strategyChild5s + ? child4.strategyChild5s.map((child5) => ({ + id: child5.id, + level: 5, + name: child5.strategyChild5Name, + order: child5.order, })) - : [], - })) + : [], + })) + : [], + })) : [], })), })); @@ -119,9 +119,18 @@ export class StrategyController extends Controller { order: "ASC", strategyChild2s: { order: "ASC", + createdAt: "ASC", strategyChild3s: { order: "ASC", - strategyChild4s: { order: "ASC", strategyChild5s: { order: "ASC" } }, + createdAt: "ASC", + strategyChild4s: { + order: "ASC", + createdAt: "ASC", + strategyChild5s: { + order: "ASC", + createdAt: "ASC" + } + }, }, }, }, @@ -143,27 +152,27 @@ export class StrategyController extends Controller { order: child2.order, children: child2.strategyChild3s ? child2.strategyChild3s.map((child3) => ({ - id: child3.id, - level: 3, - name: child3.strategyChild3Name, - order: child3.order, - children: child3.strategyChild4s - ? child3.strategyChild4s.map((child4) => ({ - id: child4.id, - level: 4, - name: child4.strategyChild4Name, - order: child4.order, - children: child4.strategyChild5s - ? child4.strategyChild5s.map((child5) => ({ - id: child5.id, - level: 5, - name: child5.strategyChild5Name, - order: child5.order, - })) - : [], + id: child3.id, + level: 3, + name: child3.strategyChild3Name, + order: child3.order, + children: child3.strategyChild4s + ? child3.strategyChild4s.map((child4) => ({ + id: child4.id, + level: 4, + name: child4.strategyChild4Name, + order: child4.order, + children: child4.strategyChild5s + ? child4.strategyChild5s.map((child5) => ({ + id: child5.id, + level: 5, + name: child5.strategyChild5Name, + order: child5.order, })) - : [], - })) + : [], + })) + : [], + })) : [], })), })); @@ -208,27 +217,27 @@ export class StrategyController extends Controller { order: child2.order, children: child2.strategyChild3s ? child2.strategyChild3s.map((child3) => ({ - id: child3.id, - level: 3, - name: child3.strategyChild3Name, - order: child3.order, - children: child3.strategyChild4s - ? child3.strategyChild4s.map((child4) => ({ - id: child4.id, - level: 4, - name: child4.strategyChild4Name, - order: child4.order, - children: child4.strategyChild5s - ? child4.strategyChild5s.map((child5) => ({ - id: child5.id, - level: 5, - name: child5.strategyChild5Name, - order: child5.order, - })) - : [], + id: child3.id, + level: 3, + name: child3.strategyChild3Name, + order: child3.order, + children: child3.strategyChild4s + ? child3.strategyChild4s.map((child4) => ({ + id: child4.id, + level: 4, + name: child4.strategyChild4Name, + order: child4.order, + children: child4.strategyChild5s + ? child4.strategyChild5s.map((child5) => ({ + id: child5.id, + level: 5, + name: child5.strategyChild5Name, + order: child5.order, })) - : [], - })) + : [], + })) + : [], + })) : [], })), }));