From cfb374f88897525e8798e4c474a9614c1de6c154 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 3 Jun 2020 15:38:47 -0400 Subject: [PATCH] keep current slot time (if any) in the drop-down of available times Applies to the staff interface and is meant to avoid making it appear that a slot time had never been chosen. Signed-off-by: Galen Charlton --- .../js/ui/default/staff/circ/curbside/directives/schedule_pickup.js | 6 ++++++ 1 file changed, 6 insertions(+) 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 6b4a7380fd..a3247c6ec5 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 @@ -245,6 +245,9 @@ function($scope , $q , egCurbsideCoreSvc , egCore , patronSvc , hash.slot.substring(0, 10), ).then(function(times) { hash.available_times = times.map(function(t) { return t[0]; }); + if (hash.slot_time !== null && hash.available_times.indexOf(hash.slot_time) === -1) { + hash.available_times.unshift(hash.slot_time); + } }); return hash; } @@ -276,6 +279,9 @@ function($scope , $q , egCurbsideCoreSvc , egCore , patronSvc , dateStr, ).then(function(times) { hash.available_times = times.map(function(t) { return t[0]; }); + if (hash.slot_time !== null && hash.available_times.indexOf(hash.slot_time) === -1) { + hash.available_times.unshift(hash.slot_time); + } }); } -- 2.11.0