currencies: sort exchange rates dialog by to-currency code
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 15 Apr 2021 22:22:56 +0000 (18:22 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 15 Apr 2021 22:22:56 +0000 (18:22 -0400)
LH#38

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/admin/acq/currency/exchange-rates-dialog.component.ts

index 4490c0b..243fad4 100644 (file)
@@ -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() {