From: Bill Erickson Date: Tue, 2 Mar 2021 16:46:35 +0000 (-0500) Subject: LP1904036 place new hold button/action X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=68c44999bb242460838d243cec88243cdcdb21ba;p=evergreen%2Fmasslnc.git LP1904036 place new hold button/action Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- 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,