From 48b18f92a13612bbf12244cc1feb22f15ffd2931 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 24 Mar 2022 10:33:52 -0400 Subject: [PATCH] LP1904036 Patron message Un-Archive option Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../src/eg2/src/app/staff/circ/patron/messages.component.html | 2 ++ .../src/eg2/src/app/staff/circ/patron/messages.component.ts | 10 ++++++++++ 2 files changed, 12 insertions(+) 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 8bd7dd1dac..e0e9a909c6 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 @@ -47,6 +47,8 @@ [showDeclaredFieldsOnly]="true" persistKey="circ.patron.archived_messages"> + 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 1fed8df694..2f373fb03e 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 @@ -130,6 +130,16 @@ export class PatronMessagesComponent implements OnInit { }); } + unArchive(penalties: IdlObject[]) { + penalties.forEach(p => p.stop_date(null)); + this.pcrud.update(penalties).toPromise() + .then(_ => this.context.refreshPatron()) + .then(_ => { + this.mainGrid.reload(); + this.archiveGrid.reload(); + }); + } + archive(penalties: IdlObject[]) { penalties.forEach(p => p.stop_date('now')); this.pcrud.update(penalties).toPromise() -- 2.11.0