LP1904036 Messages
authorBill Erickson <berickxx@gmail.com>
Mon, 5 Apr 2021 15:01:52 +0000 (11:01 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:29 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/messages.component.ts

index 0bd5d19..88b5675 100644 (file)
@@ -1,4 +1,7 @@
 
+<eg-patron-penalty-dialog [patronId]="patronId" #penaltyDialog>
+</eg-patron-penalty-dialog>
+
 <div class="row mb-2">
   <div class="col-lg-12">
     <h3 i18n>Penalties and Messages</h3>
index 5d388c6..352ff39 100644 (file)
@@ -11,6 +11,8 @@ import {GridDataSource, GridColumn, GridCellTextGenerator} from '@eg/share/grid/
 import {GridComponent} from '@eg/share/grid/grid.component';
 import {Pager} from '@eg/share/util/pager';
 import {DateUtil} from '@eg/share/util/date';
+import {PatronPenaltyDialogComponent
+    } from '@eg/staff/share/patron/penalty-dialog.component';
 
 @Component({
   selector: 'eg-patron-messages',
@@ -28,6 +30,8 @@ export class PatronMessagesComponent implements OnInit {
 
     @ViewChild('mainGrid') private mainGrid: GridComponent;
     @ViewChild('archiveGrid') private archiveGrid: GridComponent;
+    @ViewChild('penaltyDialog')
+        private penaltyDialog: PatronPenaltyDialogComponent
 
     constructor(
         private org: OrgService,
@@ -115,6 +119,9 @@ export class PatronMessagesComponent implements OnInit {
     }
 
     applyPenalty() {
+        this.penaltyDialog.open().subscribe(changes => {
+            if (changes) { this.mainGrid.reload(); }
+        });
     }
 }