From: Galen Charlton Date: Thu, 3 Jun 2021 20:10:12 +0000 (-0400) Subject: currencies: disable delete if more than one row selected X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa61d9f6f86e1590f5d24494f059fe79a5b48b8b;p=working%2FEvergreen.git currencies: disable delete if more than one row selected LH#22 Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.html b/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.html index 97d3d3e339..af4b9ad407 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.html @@ -58,7 +58,8 @@ - + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.ts index ec9036e2bf..a9fc0e9bb6 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/currency/currencies.component.ts @@ -33,6 +33,7 @@ export class CurrenciesComponent extends AdminPageComponent implements OnInit { @ViewChild('confirmDel', { static: true }) confirmDel: ConfirmDialogComponent; cellTextGenerator: GridCellTextGenerator; + notOneSelectedRow: (rows: IdlObject[]) => boolean; constructor( route: ActivatedRoute, @@ -51,6 +52,7 @@ export class CurrenciesComponent extends AdminPageComponent implements OnInit { } ngOnInit() { + this.notOneSelectedRow = (rows: IdlObject[]) => (rows.length !== 1); this.cellTextGenerator = { exchange_rates: row => '' };