From d54e93cd5f6cadd00e1f79d3fabb72a79d85a57e Mon Sep 17 00:00:00 2001 From: Llewellyn Marshall Date: Wed, 15 Dec 2021 11:58:05 -0500 Subject: [PATCH] alphabetize the simple sort list --- Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts index 4e01012e5d..5f339a872f 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts @@ -318,9 +318,18 @@ export class SearchFormComponent implements OnInit, AfterViewInit { this.ccvmMap[cType].forEach(ccvm => { if(ccvm.is_simple() === 't'){ + //push the is_simple ccvms to the simple map this.ccvmSimpleMap[cType].push(ccvm); }}); }); + + //order the simple sort list + Object.keys(this.ccvmSimpleMap).forEach(cType => { + this.ccvmSimpleMap[cType] = + this.ccvmSimpleMap[cType].sort((a, b) => { + return a.value() < b.value() ? -1 : 1; + }); + }); } } -- 2.11.0