LP1904036 Items Out grid allows due dates in the past
authorBill Erickson <berickxx@gmail.com>
Wed, 18 Aug 2021 21:21:05 +0000 (17:21 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:36 +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/share/circ/due-date-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/circ/grid.component.html
Open-ILS/src/eg2/src/app/staff/share/circ/grid.component.ts

index 7ce8b91..1e677c0 100644 (file)
@@ -22,6 +22,8 @@ export class DueDateDialogComponent
     extends DialogComponent implements OnInit {
 
     @Input() circs: IdlObject[] = [];
+    @Input() allowPastDate = false;
+
     @ViewChild('successMsg', { static: true }) private successMsg: StringComponent;
     @ViewChild('errorMsg', { static: true }) private errorMsg: StringComponent;
 
@@ -47,7 +49,7 @@ export class DueDateDialogComponent
     }
 
     dueDateChange(iso: string) {
-        if (iso && Date.parse(iso) > this.nowTime) {
+        if (iso && (this.allowPastDate || Date.parse(iso) > this.nowTime)) {
             this.dueDateIso = iso;
         } else {
             this.dueDateIso = null;
index de5f7fe..31c008c 100644 (file)
@@ -2,7 +2,7 @@
 <eg-progress-dialog #progressDialog></eg-progress-dialog>
 <eg-copy-alerts-dialog #copyAlertsDialog></eg-copy-alerts-dialog>
 <eg-string #overdueString i18n-text text="Overdue"></eg-string>
-<eg-due-date-dialog #dueDateDialog></eg-due-date-dialog>
+<eg-due-date-dialog [allowPastDate]="true" #dueDateDialog></eg-due-date-dialog>
 <eg-mark-damaged-dialog #markDamagedDialog [handleCheckin]="true">
 </eg-mark-damaged-dialog>
 <eg-mark-missing-dialog #markMissingDialog></eg-mark-missing-dialog>
     </eg-grid-toolbar-action>
 
     <eg-grid-toolbar-action
+      i18n-group group="Add" i18n-label label="Manage Item Alerts"
+      (onClick)="openItemAlerts($event, 'manage')">
+    </eg-grid-toolbar-action>
+
+    <eg-grid-toolbar-action
       i18n-group group="Add" i18n-label label="Add Billing"
       (onClick)="openBillingDialog($event)">
     </eg-grid-toolbar-action>
@@ -81,7 +86,7 @@
 
     <!-- .subscribe() nudges the observable to run -->
     <eg-grid-toolbar-action 
-      group="Circulation" i18n-group i18n-label label="Checkin" 
+      group="Circulation" i18n-group i18n-label label="Check In" 
       (onClick)="checkin($event).subscribe()">
     </eg-grid-toolbar-action>
 
index 2622081..b6d831b 100644 (file)
@@ -268,7 +268,7 @@ export class CircGridComponent implements OnInit {
         this.copyAlertsDialog.open({size: 'lg'}).subscribe(
             modified => {
                 if (modified) {
-                    // TODO: verify the modiifed alerts are present
+                    // TODO: verify the modified alerts are present
                     // or go fetch them.
                     this.circGrid.reload();
                 }