From ea1603bca71eef86482f344225a7caf401d0b4d1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 5 Jun 2020 16:51:20 -0400 Subject: [PATCH] display warning if patron's appointment is in the past Signed-off-by: Galen Charlton --- .../staff/circ/curbside/t_schedule_pickup.tt2 | 69 ++++++++++++---------- .../circ/curbside/directives/schedule_pickup.js | 3 + 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/curbside/t_schedule_pickup.tt2 b/Open-ILS/src/templates/staff/circ/curbside/t_schedule_pickup.tt2 index 678db787fd..a0cb2b3bef 100644 --- a/Open-ILS/src/templates/staff/circ/curbside/t_schedule_pickup.tt2 +++ b/Open-ILS/src/templates/staff/circ/curbside/t_schedule_pickup.tt2 @@ -44,39 +44,46 @@
-
+
-
- -
{{appt.id}}
-
-
- - - -
-
- - -
-
- - +
+
+ +
{{appt.id}}
+
+
+ + + +
+
+ + +
+
+ + +
+
+ +
+ + +
+
-
- -
- - +
+
+ [% l('Appointment is in the past and may need to be rescheduled.') %]
diff --git a/Open-ILS/web/js/ui/default/staff/circ/curbside/directives/schedule_pickup.js b/Open-ILS/web/js/ui/default/staff/circ/curbside/directives/schedule_pickup.js index a9ca76ecdb..6a3163f720 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/curbside/directives/schedule_pickup.js +++ b/Open-ILS/web/js/ui/default/staff/circ/curbside/directives/schedule_pickup.js @@ -261,6 +261,9 @@ function($scope , $q , egCurbsideCoreSvc , egCore , patronSvc , } } hash.slot_date = new Date(hash.slot); + if (!isNew) { + hash.is_past = (hash.slot_date < new Date()); + } hash.available_times = []; egCore.net.request ( 'open-ils.curbside', -- 2.11.0