LP1929741 Display copy row number in copy edit grid
authorBill Erickson <berickxx@gmail.com>
Wed, 20 Jan 2021 22:02:38 +0000 (17:02 -0500)
committerJane Sandberg <js7389@princeton.edu>
Sun, 2 Oct 2022 15:02:49 +0000 (08:02 -0700)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Open-ILS/src/eg2/src/app/staff/acq/lineitem/batch-copies.component.html
Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.html
Open-ILS/src/eg2/src/app/staff/acq/lineitem/copy-attrs.component.ts

index de3b2f4..2fdfd2d 100644 (file)
 <ng-container *ngTemplateOutlet="copyAttrsHeader"> </ng-container>
 
 <div class="mt-1 pt-1 border-top">
-  <div class="batch-copy-row" *ngFor="let copy of lineitem.lineitem_details()">
+  <div class="batch-copy-row" 
+    *ngFor="let copy of lineitem.lineitem_details(); let idx = index">
     <eg-lineitem-copy-attrs 
       (receiveRequested)="receiveCopy($event)"
       (unReceiveRequested)="unReceiveCopy($event)"
       (deleteRequested)="deleteCopy($event)" 
       (cancelRequested)="cancelCopy($event)"
-      [lineitem]="lineitem" [copy]="copy"></eg-lineitem-copy-attrs>
+      [rowIndex]="idx + 1" [lineitem]="lineitem" [copy]="copy">
+    </eg-lineitem-copy-attrs>
   </div>
 </div>
 
index 5e24456..49d3a1a 100644 (file)
@@ -2,6 +2,11 @@
     and the batch copy editor component -->
 
 <div class="div d-flex batch-copy-row" *ngIf="copy">
+  <div class="pr-1 pt-2 text-secondary">
+    <!-- ensure the rowIndex for the first 100 copies vertically
+         aligns with an invisible 0 for 1..9 -->
+    {{rowIndex}}<span *ngIf="rowIndex < 10" class="invisible">0</span>
+  </div>
   <div class="flex-1 p-1">
     <eg-org-select #owningLibSelect placeholder="Owning Branch..." 
       i18n-placeholder [readOnly]="fieldIsDisabled('owning_lib')"
index fb9ecae..4c12012 100644 (file)
@@ -16,6 +16,8 @@ import {ItemLocationSelectComponent} from '@eg/share/item-location-select/item-l
 export class LineitemCopyAttrsComponent implements OnInit {
 
     @Input() lineitem: IdlObject;
+    @Input() rowIndex: number;
+
     fundEntries: ComboboxEntry[];
     circModEntries: ComboboxEntry[];