From e239a8513d42d8c88d2a2b18314c59cb48602e48 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Sun, 14 May 2023 21:32:46 -0400 Subject: [PATCH] sort custom tree siblings by sibling_order Signed-off-by: Jason Etheridge --- .../src/app/staff/admin/server/custom-org-unit-trees.component.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/custom-org-unit-trees.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/custom-org-unit-trees.component.ts index 7befd57478..95d5958a58 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/custom-org-unit-trees.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/custom-org-unit-trees.component.ts @@ -156,11 +156,8 @@ export class CustomOrgUnitTreesComponent implements OnInit { 'admin.server.org_unit.treenode', {org: orgNode.org_unit()} ).then(label => treeNode.label = label); - // Tree node labels are "name -- shortname". Sorting - // by name suffices and bypasses the need the wait - // for all of the labels to interpolate. orgNode.children() - .sort((a: IdlObject, b: IdlObject) => a.org_unit().name() < b.org_unit().name() ? -1 : 1) + .sort((a: IdlObject, b: IdlObject) => a.sibling_order() < b.sibling_order() ? -1 : 1) .forEach((childNode: IdlObject) => treeNode.children.push(handleNode(childNode)) ); -- 2.11.0