LP#1929749: enable certain actions only for activated POs
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 9 Feb 2022 20:51:05 +0000 (15:51 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 9 Feb 2022 20:51:05 +0000 (15:51 -0500)
I.e., mark selected line items as received or un-received
and cancel selected line items.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html

index a622d13..e8abd50 100644 (file)
           [disabled]="!isPendingPo()"
           queryParamsHandling="merge" i18n>Load Bibs and Items</a>
         <button ngbDropdownItem (click)="receiveSelected()" 
-          [disabled]="!poId" i18n>Mark Selected Line Items as Received</button>
+          [disabled]="!isActivatedPo() || !selectedIds().length" i18n>Mark Selected Line Items as Received</button>
         <button ngbDropdownItem (click)="unReceiveSelected()" 
-          [disabled]="!poId" i18n>Un-Receive Selected Line Items</button>
+          [disabled]="!isActivatedPo() || !selectedIds().length" i18n>Un-Receive Selected Line Items</button>
         <button ngbDropdownItem (click)="cancelSelected()" 
-          [disabled]="!poId" i18n>Cancel Selected Line Items</button>
+          [disabled]="!isActivatedPo() || !selectedIds().length" i18n>Cancel Selected Line Items</button>
         <button ngbDropdownItem (click)="applyClaimPolicyToSelected()" 
           [disabled]="!poId || !selectedIds().length" i18n>Apply Claim Policy to Selected Line Items</button>
         <button ngbDropdownItem (click)="createInvoiceFromSelected()"