Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
[showDeclaredFieldsOnly]="true" persistKey="circ.patron.archived_messages">
<eg-grid-toolbar-action (onClick)="remove($event)"
label="Delete Selected" i18n-label></eg-grid-toolbar-action>
+ <eg-grid-toolbar-action (onClick)="unArchive($event)"
+ label="Un-Archive Selected" i18n-label></eg-grid-toolbar-action>
<eg-grid-column path="set_date"
i18n-label label="Applied On" [datePlusTime]="true"></eg-grid-column>
<eg-grid-column i18n-label label="Label" path="standing_penalty.label">
});
}
+ 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()