From: Jane Sandberg Date: Tue, 22 Jan 2019 23:10:55 +0000 (-0800) Subject: Add Show Reservations for Resources X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d85dc6d765d9ea4fb23cf05dbbc71db987a5e523;p=working%2FEvergreen.git Add Show Reservations for Resources Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html index 622bbb1a0f..d419ebef80 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html +++ b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html @@ -7,6 +7,7 @@ + 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 b5a64cb104..dc7646d875 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 @@ -34,6 +34,7 @@ export class ManageReservationsComponent implements OnInit { editSelected: (rows: IdlObject[]) => void; cancelSelected: (rows: IdlObject[]) => void; viewByPatron: (rows: IdlObject[]) => void; + viewByResource: (rows: IdlObject[]) => void; constructor( private route: ActivatedRoute, @@ -98,6 +99,11 @@ export class ManageReservationsComponent implements OnInit { const patronIds = reservations.map(reservation => reservation.usr().id()); this.router.navigate(['/staff', 'booking', 'manage_reservations', 'by_patron', patronIds[0]]); } + this.viewByResource = (reservations: IdlObject[]) => { + const resourceBarcodes = reservations.map(reservation => reservation.target_resource().barcode()); + this.router.navigate(['/staff', 'booking', 'manage_reservations', 'by_resource', resourceBarcodes[0]]); + } + this.editDialog.mode = 'update'; // this fmeditor is not used for creating objects, just updates