From: Galen Charlton Date: Fri, 5 Jun 2020 20:33:49 +0000 (-0400) Subject: changes to time selector in staff interface X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8ba96e97480e15ebe321fcac09960cab540dfd91;p=working%2FEvergreen.git changes to time selector in staff interface * display the number of available appointments at each time * disable times that have no available appointments (this does account for the appointment's current select time) Signed-off-by: Galen Charlton --- 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 63448eb4cc..678db787fd 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 @@ -61,7 +61,11 @@
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 8cadbc34ab..a9ca76ecdb 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 @@ -226,15 +226,20 @@ function($scope , $q , egCurbsideCoreSvc , egCore , patronSvc , function mungeAvailableTimes(hash, times) { var existing_present = false; + if (angular.isDefined(hash.slot_time) && hash.slot_time !== null) { + hash.original_slot_time = hash.slot_time; + } hash.available_times = times.map(function(t) { - if (hash.slot_time !== null && hash.slot_time === t[0]) existing_present = true; + if (angular.isDefined(hash.slot_time) && hash.slot_time !== null && hash.slot_time === t[0]) { + existing_present = true; + } return { time: t[0], available: t[1], time_fmt: moment(t[0], [moment.ISO_8601, 'HH:mm:ss']).format('LT') }; }); - if (hash.slot_time !== null && !existing_present) { + if (angular.isDefined(hash.slot_time) && hash.slot_time !== null && !existing_present) { hash.available_times.unshift({ time: hash.slot_time, available: 0,