Skip to content

Commit

Permalink
feat(ZMS-3460): fix provider id
Browse files Browse the repository at this point in the history
  • Loading branch information
manjencic committed Jan 30, 2025
1 parent 5b47911 commit e1fd3bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,10 @@ private static function processFreeSlots(ProcessList $freeSlots): array {
iterator_to_array($freeSlots),
function ($timestamps, $slot) use ($currentTimestamp) {
if (isset($slot->appointments) && is_iterable($slot->appointments)) {
$providerId = (int) $slot->scope->provider->id;
foreach ($slot->appointments as $appointment) {
if (isset($appointment->date) && isset($appointment->scope->provider->id)) {
if (isset($appointment->date)) {
$timestamp = (int) $appointment->date;
$providerId = (int) $appointment->scope->provider->id;

if ($timestamp > $currentTimestamp) {
$timestamps[$providerId][$timestamp] = true;
Expand Down

0 comments on commit e1fd3bb

Please sign in to comment.