From ef81dce39aa51dbf2075160459000002a2d291b6 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 15 Apr 2021 18:22:56 -0400 Subject: [PATCH] currencies: sort exchange rates dialog by to-currency code LH#38 Signed-off-by: Galen Charlton --- .../app/staff/admin/acq/currency/exchange-rates-dialog.component.ts | 3 +++ 1 file changed, 3 insertions(+) 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() { -- 2.11.0