From 28b2f8a185685b19f08055b8be620bc7f042fb46 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 28 Feb 2022 16:18:37 -0500 Subject: [PATCH] LP1904036 Patron search Clear Form clears visible results/summary Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html | 1 + Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts | 5 +++++ Open-ILS/src/eg2/src/app/staff/share/patron/search.component.ts | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html index 823af65181..a0d6ca335e 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html @@ -229,6 +229,7 @@ [patronIds]="recentPatronIds()" [startWithSearch]="context.lastPatronSearch" (searchFired)="patronSearchFired($event)" + (formCleared)="patronSearchCleared()" (selectionChange)="patronSelectionChange($event)" (patronsActivated)="patronsActivated($event)"> diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts index d476cbf0a1..60703cd77f 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts @@ -358,5 +358,10 @@ export class PatronComponent implements OnInit, AfterViewInit { return 0; } } + + patronSearchCleared() { + this.context.summary = null; + this.patronId = null; + } } diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron/search.component.ts b/Open-ILS/src/eg2/src/app/staff/share/patron/search.component.ts index d3b9da7f51..aee014868b 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron/search.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/patron/search.component.ts @@ -73,6 +73,9 @@ export class PatronSearchComponent implements OnInit, AfterViewInit { // any searches run as a result of @Input() startWithSearch. @Output() searchFired: EventEmitter; + // Fired when the search form is cleared via the Clear Form button. + @Output() formCleared: EventEmitter = new EventEmitter(); + search: any = {}; searchOrg: IdlObject; expandForm: boolean; @@ -159,6 +162,8 @@ export class PatronSearchComponent implements OnInit, AfterViewInit { clear() { this.search = {profile: null}; + this.searchGrid.reload(); + this.formCleared.emit(); } getRows(pager: Pager, sort: any[]): Observable { -- 2.11.0