# Story 7.6: Booking Limit Indicator ## Epic Reference **Epic 7:** Client Dashboard ## User Story As a **client**, I want **to see my booking status and limits clearly**, So that **I understand when I can book consultations**. ## Acceptance Criteria ### Display Locations - [ ] Dashboard widget - [ ] Booking page ### Status Messages - [ ] "You can book a consultation today" - [ ] "You already have a booking for today" - [ ] "You have a pending request for [date]" ### Calendar Integration - [ ] Calendar shows booked days as unavailable - [ ] Visual indicator for user's booked dates ### Information - [ ] Clear messaging about 1-per-day limit - [ ] Bilingual messages ## Technical Notes ```php new class extends Component { public function getBookingStatus(): array { $user = auth()->user(); $todayBooking = $user->consultations() ->whereDate('scheduled_date', today()) ->whereIn('status', ['pending', 'approved']) ->first(); $pendingRequests = $user->consultations() ->pending() ->get(); $upcomingApproved = $user->consultations() ->approved() ->where('scheduled_date', '>=', today()) ->get(); return [ 'canBookToday' => is_null($todayBooking), 'todayBooking' => $todayBooking, 'pendingRequests' => $pendingRequests, 'upcomingApproved' => $upcomingApproved, 'bookedDates' => $user->consultations() ->whereIn('status', ['pending', 'approved']) ->where('scheduled_date', '>=', today()) ->pluck('scheduled_date') ->map(fn($d) => $d->format('Y-m-d')) ->toArray(), ]; } }; ``` ### Template ```blade
{{ __('booking.pending_for_date', ['date' => $pendingRequests->first()->scheduled_date->format('d/m/Y')]) }}
@endif{{ __('booking.limit_message') }}