From: Galen Charlton Date: Wed, 3 Jun 2020 19:38:47 +0000 (-0400) Subject: keep current slot time (if any) in the drop-down of available times X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cfb374f88897525e8798e4c474a9614c1de6c154;p=working%2FEvergreen.git 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 --- 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); + } }); }