From: Jane Sandberg Date: Tue, 22 Jan 2019 22:20:43 +0000 (-0800) Subject: Fix limit Manage Reservations by resource barcode X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0feac13f343f5bf93152ff4721e6121b35923e7f;p=working%2FEvergreen.git Fix limit Manage Reservations by resource barcode Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts index 2d5f7a8ac5..b5a64cb104 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts @@ -22,6 +22,7 @@ export class ManageReservationsComponent implements OnInit { gridSource: GridDataSource; patronId: number; resourceBarcode: string; + resourceId: number; numRowsSelected: number; @ViewChild('grid') grid: GridComponent; @@ -50,8 +51,8 @@ export class ManageReservationsComponent implements OnInit { orderBy.bresv = sort[0].name + ' ' + sort[0].dir; } return this.pcrud.search('bresv', { - "usr" : (this.patronId ? this.patronId : {">" : 1}), - "target_resource" : {"barcode" : (this.resourceBarcode ? this.resourceBarcode : {"!=" : null})} + "usr" : (this.patronId ? this.patronId : {">" : 0}), + "target_resource" : (this.resourceId ? this.resourceId : {">" : 0}), }, { order_by: orderBy, limit: pager.limit, @@ -99,8 +100,13 @@ export class ManageReservationsComponent implements OnInit { } this.editDialog.mode = 'update'; // this fmeditor is not used for creating objects, just updates + + if (this.resourceBarcode) { + this.pcrud.search('brsrc', {'barcode' : this.resourceBarcode}, {"limit": 1, "select": ["id"]}).subscribe((res) => this.resourceId = res.id()); + } } + showEditDialog(idlThing: IdlObject) { this.editDialog.recId = idlThing.id(); return this.editDialog.open({size: 'lg'}).then(