From d33e414a6b35257015f3d3d786d5f04374dcdff7 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Wed, 14 Dec 2022 17:28:13 -0500 Subject: [PATCH] disable Edit Selected action unless exactly one row is selected Signed-off-by: Jason Etheridge --- .../circ_matrix_matchpoint/circ-matrix-matchpoint.component.html | 5 ++++- .../local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.html index c8d1cd1101..887f7c097f 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.html @@ -14,7 +14,10 @@ - + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.ts index f2a8501367..d3c2b1e5b3 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/circ_matrix_matchpoint/circ-matrix-matchpoint.component.ts @@ -27,6 +27,7 @@ export class CircMatrixMatchpointComponent implements OnInit { marginTop: '25px', marginLeft: '73%' }; + notOneSelectedRow: (rows: IdlObject[]) => boolean; @ViewChild('limitSets', { static: false }) limitSets: ElementRef; @ViewChild('circLimitSets', { static: true }) limitSetsComponent: LinkedCircLimitSetsComponent; @@ -70,6 +71,7 @@ export class CircMatrixMatchpointComponent implements OnInit { }; return this.pcrud.retrieveAll('ccmm', searchOps, {fleshSelectors: true}); }; + this.notOneSelectedRow = (rows: IdlObject[]) => (rows.length !== 1); } clearLinkedCircLimitSets() { -- 2.11.0