Skip to content

Commit

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

if ($timestamp > $currentTimestamp) {
$timestamps[$scopeId][$timestamp] = true;
$timestamps[$providerId][$timestamp] = true;
}
}
}
Expand All @@ -579,7 +579,7 @@ function ($timestamps, $slot) use ($currentTimestamp) {
[]
);

foreach ($appointmentTimestamps as $scopeId => &$timestamps) {
foreach ($appointmentTimestamps as $providerId => &$timestamps) {
$timestamps = array_keys($timestamps);
asort($timestamps);
}
Expand Down

0 comments on commit 5b47911

Please sign in to comment.