From 68c44999bb242460838d243cec88243cdcdb21ba Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 2 Mar 2021 11:46:35 -0500 Subject: [PATCH] LP1904036 place new hold button/action Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html | 2 ++ Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts | 5 +++++ Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html | 6 ++++++ Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts | 9 ++++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html index 8ada06ba09..13d5bd500b 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html @@ -8,6 +8,8 @@ diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts index e7ed104e27..86dc486370 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts @@ -13,6 +13,7 @@ import {PatronContextService} from './patron.service'; export class HoldsComponent implements OnInit { constructor( + private router: Router, private org: OrgService, private net: NetService, public patronService: PatronService, @@ -22,5 +23,9 @@ export class HoldsComponent implements OnInit { ngOnInit() { } + newHold() { + this.router.navigate(['/staff/catalog/search'], + {queryParams: {holdForBarcode: this.context.patron.card().barcode()}}); + } } diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html index f52e36f12d..eecc6268f2 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html @@ -83,6 +83,12 @@ + + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts index 357074a752..9c6a9a3bba 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit, Input, ViewChild} from '@angular/core'; +import {Component, OnInit, Input, Output, EventEmitter, ViewChild} from '@angular/core'; import {Location} from '@angular/common'; import {Observable, Observer, of} from 'rxjs'; import {IdlObject} from '@eg/core/idl.service'; @@ -50,6 +50,10 @@ export class HoldsGridComponent implements OnInit { @Input() printTemplate: string; + // Adds a Place Hold grid toolbar button that emits + // placeHoldRequested on click. + @Input() showPlaceHoldButton = false; + // If set, all holds are fetched on grid load and sorting/paging all // happens in the client. If false, sorting and paging occur on // the server. @@ -155,6 +159,9 @@ export class HoldsGridComponent implements OnInit { } } + // Notify the caller the place hold button was clicked. + @Output() placeHoldRequested: EventEmitter = new EventEmitter(); + constructor( private ngLocation: Location, private net: NetService, -- 2.11.0