LP1958265 Holds grid barcode print/csv fix
authorBill Erickson <berickxx@gmail.com>
Wed, 16 Mar 2022 20:26:18 +0000 (16:26 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 7 Apr 2022 15:36:10 +0000 (11:36 -0400)
Tweak the barcode print/csv logic to populate the current_item and
requested_item values using the same logic as the grid.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts

index 80bc101..7a27e5a 100644 (file)
@@ -207,8 +207,8 @@ export class HoldsGridComponent implements OnInit {
         this.cellTextGenerator = {
             title: row => row.title,
             cp_barcode: row => (row.cp_barcode == null) ? '' : row.cp_barcode,
-            current_item: row => (row.cp_barcode == null) ? '' : row.cp_barcode,
-            requested_item: row => (row.cp_barcode == null) ? '' : row.cp_barcode,
+            current_item: row => row.current_copy ? row.cp_barcode : '',
+            requested_item: row => this.isCopyHold(row) ? row.cp_barcode : '',
             ucard_barcode: row => row.ucard_barcode
         };
     }