From 2ac4795e597e8bdd3ba58ce4e1e701c131dc672b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 5 Apr 2021 10:14:10 -0400 Subject: [PATCH] LP1904036 Messages Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../eg2/src/app/staff/circ/patron/edit.component.ts | 20 ++++++++++++-------- .../app/staff/circ/patron/messages.component.html | 14 +++++++++++--- .../src/app/staff/circ/patron/messages.component.ts | 9 +++++++++ 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts index 508e22c548..805f3ab06e 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts @@ -111,7 +111,7 @@ export class EditComponent implements OnInit, AfterViewInit { // patron tab is open. Wait until we know it's defined. if (tb) { tb.saveClicked.subscribe(_ => this.save()); - tb.saveCloneClicked.subscribe(_ => this.saveClone()); + tb.saveCloneClicked.subscribe(_ => this.save(true)); tb.printClicked.subscribe(_ => this.printPatron()); } } @@ -1308,7 +1308,7 @@ export class EditComponent implements OnInit, AfterViewInit { return this.patron.addresses().filter(a => !a.isdeleted()); } - save(): Promise { + save(clone?: boolean): Promise { // TODO clear unload prompt @@ -1317,10 +1317,10 @@ export class EditComponent implements OnInit, AfterViewInit { .then(_ => this.saveUserSettings()) .then(_ => this.updateHoldPrefs()) .then(_ => this.removeStagedUser()) - .then(_ => this.postSaveRedirect()); + .then(_ => this.postSaveRedirect(clone)); } - postSaveRedirect() { + postSaveRedirect(clone: boolean) { if (this.stageUser) { this.broadcaster.broadcast('eg.pending_usr.update', @@ -1333,11 +1333,15 @@ export class EditComponent implements OnInit, AfterViewInit { return; } - window.location.href = window.location.href; - } + if (clone) { + this.context.patron = null; + this.router.navigate( + ['/staff/circ/patron/register/clone', this.modifiedPatron.id()]); - saveClone() { - // TODO + } else { + // Full refresh to force reload of modified patron data. + window.location.href = window.location.href; + } } // Resolves on success, rejects on error diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.html index bec7338a8f..0bd5d19617 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.html @@ -16,12 +16,20 @@ -
- -
+

Archived Penalties / Messages

+
+ + +
+
+ + +