From b3864cbea9b6bd7f1b8e58cfb5bce6c023aa5760 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Wed, 12 Dec 2018 21:05:47 -0800 Subject: [PATCH] Adding action -- not working yet Signed-off-by: Jane Sandberg --- .../eg2/src/app/staff/booking/current-reservations.component.html | 2 +- .../eg2/src/app/staff/booking/current-reservations.component.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.html b/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.html index 3584de9525..ea7fb201c0 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.html +++ b/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.html @@ -6,6 +6,7 @@ [sortable]="true" persistKey="booking.current_reservations" > + @@ -34,6 +35,5 @@ diff --git a/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.ts index 4b0384c581..acaf2eb763 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/current-reservations.component.ts @@ -26,9 +26,11 @@ export class CurrentReservationsComponent implements OnInit { editSelected: (rows: IdlObject[]) => void; cancelSelected: (rows: IdlObject[]) => void; + viewByPatron: (rows: IdlObject[]) => void; constructor( private route: ActivatedRoute, + private router: Router, private toast: ToastService, private pcrud: PcrudService, private auth: AuthService, @@ -76,6 +78,12 @@ export class CurrentReservationsComponent implements OnInit { this.grid.reload(); } + this.viewByPatron = (reservations: IdlObject[]) => { + let patronIds = reservations.map(reservation => reservation.usr().id()); + this.router.navigate(['/staff', 'booking', 'current_reservations', 'by_patron', patronIds[0]]); + } + + this.editDialog.mode = 'update'; // this fmeditor is not used for creating objects, just updates } showEditDialog(idlThing: IdlObject) { -- 2.11.0