limit by resource barcode
authorJane Sandberg <sandbej@linnbenton.edu>
Sun, 20 Jan 2019 05:19:58 +0000 (21:19 -0800)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 23 Jan 2019 23:08:13 +0000 (15:08 -0800)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts

index 3a802d2..7b8ad99 100644 (file)
@@ -21,6 +21,7 @@ export class ManageReservationsComponent implements OnInit {
 
   gridSource: GridDataSource;
   patronId: number;
+  resourceBarcode: string;
   numRowsSelected: number;
 
   @ViewChild('grid') grid: GridComponent;
@@ -48,7 +49,10 @@ export class ManageReservationsComponent implements OnInit {
       if (sort.length) {
          orderBy.bresv = sort[0].name + ' ' + sort[0].dir;
       }
-      return this.pcrud.search('bresv', {"usr" : (this.patronId ? this.patronId : {">" : 1})}, {   
+      return this.pcrud.search('bresv', {
+        "usr" : (this.patronId ? this.patronId : {">" : 1}),
+       "target_resource.barcode" : (this.resourceBarcode ? this.resourceBarcode : {"!=" : null})
+          }, {   
         order_by: orderBy,
         limit: pager.limit,
         offset: pager.offset,
@@ -60,6 +64,7 @@ export class ManageReservationsComponent implements OnInit {
   ngOnInit() {
     this.route.paramMap.subscribe((params: ParamMap) => {
       this.patronId = +params.get('patron_id');
+      this.resourceBarcode = +params.get('resource_barcode');
     });
 
     this.editSelected = (idlThings: IdlObject[]) => {