LP#1942220: (follow-up) have UI allow receiving of delayed LI and LIDs
authorGalen Charlton <gmc@equinoxOLI.org>
Thu, 13 Jan 2022 19:36:35 +0000 (14:36 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 13 Jan 2022 19:49:35 +0000 (14:49 -0500)
(At the level of the individual LI or LID; the menu item to receive
selected line items ignores the cancellation state of LI and LIDs entirely)

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

index 2523e76..f0a170d 100644 (file)
@@ -94,7 +94,7 @@
             <span class="material-icons">delete</span>
           </button>
         </ng-container>
-        <ng-container *ngIf="disposition() == 'on-order'">
+        <ng-container *ngIf="disposition() == 'on-order' || disposition() == 'delayed'">
           <a href="javascript:;" (click)="receiveRequested.emit(copy)" i18n>Mark Received</a>
         </ng-container>
         <ng-container *ngIf="disposition() == 'received'">
           <a href="javascript:;" class="ml-2" (click)="cancelRequested.emit(copy)" i18n>Cancel</a>
         </ng-container>
         <ng-container *ngIf="disposition() == 'delayed'">
-          <a href="javascript:;" (click)="cancelRequested.emit(copy)" i18n>Cancel</a>
+          &nbsp;<a href="javascript:;" (click)="cancelRequested.emit(copy)" i18n>Cancel</a>
         </ng-container>
         <ng-container *ngIf="disposition() == 'delayed'">
           <span class="font-italic ml-2" title="{{copy.cancel_reason().description()}}">
index 061124c..542d388 100644 (file)
               <div ngbDropdown>
                 <button class="btn btn-info btn-sm" ngbDropdownToggle i18n>Actions</button>
                 <div ngbDropdownMenu>
-                  <button ngbDropdownItem [disabled]="li.state() != 'on-order'"
+                  <button ngbDropdownItem [disabled]="li.state() != 'on-order' && lineitemDisposition(li) != 'delayed'"
                     (click)="markReceived([li.id()])" i18n>Mark Received</button>
                   <button ngbDropdownItem [disabled]="li.state() != 'received'"
                     (click)="markUnReceived([li.id()])" i18n>Mark Un-Received</button>