Afspraak
| Tijd | Afspraken |
|---|---|
| {{ sprintf('%02d:00', $hour) }} |
@for($quarter = 0; $quarter < 4; $quarter++)
@php
$minutes = $quarter * 15;
$timeSlot = sprintf('%02d:%02d', $hour, $minutes);
// Find appointment that matches this time slot
$appointment = collect($appointments ?? [])->first(function($app) use ($hour, $minutes) {
if (empty($app['time_slot'])) return false;
// Parse the time_slot (e.g., "10:30-11:00" or "10:30")
$timeSlotParts = explode('-', $app['time_slot']);
$startTime = trim($timeSlotParts[0]);
if (strpos($startTime, ':') !== false) {
list($startHour, $startMin) = explode(':', $startTime);
return (int)$startHour === $hour && (int)$startMin >= $minutes && (int)$startMin < $minutes + 15;
}
return false;
});
@endphp
@if($appointment)
@endfor
{{ $appointment['company_name'] ?? 'Onbekend' }}
{{ $appointment['time_slot'] }}
@endif
|