From: Galen Charlton Date: Wed, 2 Sep 2020 15:34:05 +0000 (-0400) Subject: LP#1850547: (follow-up) fix 'New Selection List' button X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6de7321de290aa0e03463d0212354e81591b0e9f;p=Evergreen.git LP#1850547: (follow-up) fix 'New Selection List' button Now that it's a toolbar button rather than a grid action, the check to see if the button should be active needed to be adjusted. Signed-off-by: Galen Charlton Signed-off-by: Tiffany Little Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.html b/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.html index 9bb5d72e09..3aeb3671b4 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.html @@ -41,7 +41,7 @@ idlClass="acqpl" [dataSource]="gridSource"> + (onClick)="openCreateDialog()" [disabled]="createNotAppropriate()"> diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.ts index ba5cdb0a08..899f0cae80 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/picklist-results.component.ts @@ -42,7 +42,7 @@ export class PicklistResultsComponent implements OnInit { permissions: {[name: string]: boolean}; noSelectedRows: (rows: IdlObject[]) => boolean; oneSelectedRows: (rows: IdlObject[]) => boolean; - createNotAppropriate: (rows: IdlObject[]) => boolean; + createNotAppropriate: () => boolean; cloneNotAppropriate: (rows: IdlObject[]) => boolean; mergeNotAppropriate: (rows: IdlObject[]) => boolean; deleteNotAppropriate: (rows: IdlObject[]) => boolean; @@ -76,7 +76,7 @@ export class PicklistResultsComponent implements OnInit { this.noSelectedRows = (rows: IdlObject[]) => (rows.length === 0); this.oneSelectedRows = (rows: IdlObject[]) => (rows.length === 1); - this.createNotAppropriate = (rows: IdlObject[]) => (!this.permissions.CREATE_PICKLIST); + this.createNotAppropriate = () => (!this.permissions.CREATE_PICKLIST); this.cloneNotAppropriate = (rows: IdlObject[]) => (!this.permissions.CREATE_PICKLIST || !this.oneSelectedRows(rows)); this.mergeNotAppropriate = (rows: IdlObject[]) => (!this.permissions.UPDATE_PICKLIST || this.noSelectedRows(rows)); this.deleteNotAppropriate = (rows: IdlObject[]) => (!this.permissions.UPDATE_PICKLIST || this.noSelectedRows(rows));