@php $user = auth()->user(); $profile = $user->profile; $upcoming = $user->bookings() ->with('room') ->whereIn('status', ['pending_payment', 'payment_submitted', 'confirmed']) ->where('starts_at', '>=', now()) ->orderBy('starts_at') ->get(); $past = $user->bookings() ->with('room') ->where('starts_at', '<', now()) ->orderByDesc('starts_at') ->limit(10) ->get(); $package = $user->usablePackage(); @endphp

{{ $profile?->artist_name ?: $user->name }}

{{ $profile?->genres->pluck('name')->join(' · ') ?: 'No genres chosen yet' }}

Edit profile
@if (! $profile?->isComplete())
Finish your profile to book. We need your artist name, phone number and date of birth.
@endif
Sessions completed
{{ $profile?->completed_bookings_count ?? 0 }}
@if ($package)
Studio hours left
{{ rtrim(rtrim(number_format($package->studioHoursRemaining(), 1), '0'), '.') }}
Package expires
{{ $package->expires_at->setTimezone(config('studio.timezone'))->format('j M') }}
@endif

Upcoming

@if ($upcoming->isEmpty())

Nothing booked yet. Book a session.

@else @endif
@if ($past->isNotEmpty())

Past sessions

@foreach ($past as $booking)
{{ $booking->starts_at->setTimezone(config('studio.timezone'))->format('j M Y, H:i') }} · {{ $booking->room->name }} {{ $booking->status->getLabel() }}
@endforeach
@endif