From: Llewellyn Marshall Date: Wed, 15 Dec 2021 16:58:05 +0000 (-0500) Subject: alphabetize the simple sort list X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d54e93cd5f6cadd00e1f79d3fabb72a79d85a57e;p=working%2FEvergreen.git alphabetize the simple sort list --- 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; + }); + }); } }