From: Galen Charlton Date: Thu, 15 Apr 2021 22:22:56 +0000 (-0400) Subject: currencies: sort exchange rates dialog by to-currency code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ef81dce39aa51dbf2075160459000002a2d291b6;p=working%2FEvergreen.git currencies: sort exchange rates dialog by to-currency code LH#38 Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/exchange-rates-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/exchange-rates-dialog.component.ts index 4490c0bba7..243fad47b0 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/exchange-rates-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/exchange-rates-dialog.component.ts @@ -111,6 +111,9 @@ export class ExchangeRatesDialogComponent this.ratios.push(ratio); } }); + this.ratios.sort((a, b) => { + return a.to_currency().code() < b.to_currency().code() ? -1 : 1; + }) } save() {