From 99e60525c588b781fb9aa557a5abcc0f3e086c98 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 7 Feb 2022 11:41:58 -0500 Subject: [PATCH] LP1904036 Penalty dialog resets after each use Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../src/app/staff/circ/patron/messages.component.ts | 10 +++++++--- .../app/staff/share/patron/penalty-dialog.component.ts | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.ts index 203b2baa62..1fed8df694 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.ts @@ -121,8 +121,12 @@ export class PatronMessagesComponent implements OnInit { } applyPenalty() { - this.penaltyDialog.open().subscribe(changes => { - if (changes) { this.mainGrid.reload(); } + this.penaltyDialog.penalty = null; + this.penaltyDialog.open({size: 'lg'}).subscribe(changes => { + if (changes) { + this.context.refreshPatron() + .then(_ => this.mainGrid.reload()); + } }); } @@ -147,7 +151,7 @@ export class PatronMessagesComponent implements OnInit { let modified = false; from(penalties).pipe(concatMap(penalty => { this.penaltyDialog.penalty = penalty; - return this.penaltyDialog.open().pipe(tap(changed => { + return this.penaltyDialog.open({size: 'lg'}).pipe(tap(changed => { if (changed) { modified = true; } })); })).toPromise().then(_ => { diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts index ec0717f839..2131e2c49b 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts @@ -71,6 +71,8 @@ export class PatronPenaltyDialogComponent init(): Observable { this.dataLoaded = false; + this.penaltyTypeFromButton = 0; + this.penaltyTypeFromSelect = ''; this.initials = ''; this.noteText = ''; -- 2.43.2