{{-- Protected Event details — reachable ONLY after OTP + eligibility. PRIVACY CONTRACT (PLT-EVENTS-001 §13). This page renders exactly one investor's own view. It must never show: other investors · eligible audience counts · the internal Groups the event targets · attendance-management controls · admin notes · audit information · internal statuses · anyone else's phone, email or state. Only `$investor`'s OWN confirmation state is shown, and `admin_status` is deliberately NOT rendered — it is an internal verdict, not investor-facing. Mirrors web.demo-attendance.portal for layout and the `.cmt-att-*` surface. --}} @extends('web.signup.layout') @section('title', $event->title) @section('page_title', __('web.event_attendance.details_title')) @section('page_subtitle', '') @section('body_class', 'has-sticky-logo') @php // Formatted ONCE here, in business time. The model stores UTC; every // investor-facing timestamp on this page is Asia/Riyadh so nobody has to // convert in their head. $tz = \App\Support\Time\BookingsTimezone::business(); $startAt = $event->starts_at?->copy()->setTimezone($tz); $endAt = $event->ends_at?->copy()->setTimezone($tz); $sameDay = $startAt && $endAt && $startAt->isSameDay($endAt); $isOnline = $event->event_type === 'online'; $confirmed = $attendance?->confirmed_at !== null; @endphp @push('styles') @endpush @section('content')
@if ($event->image_path) {{ $event->title }} @endif
@if ($expired) {{ __('web.event_attendance.badge.ended') }} @elseif ($isOnline) {{ __('web.event_attendance.badge.online') }} @else {{ __('web.event_attendance.badge.in_person') }} @endif

{{ $event->title }}

{{-- The investor's own first name only — no other identity is exposed. --}}

{{ __('web.event_attendance.greeting', [ 'name' => $investor->first_name ?: ($investor->full_name_en ?: ($investor->full_name_ar ?: $investor->name)), ]) }}

@if ($startAt)
{{ __('web.event_attendance.when') }} {{ $startAt->translatedFormat('l, j F Y') }}
@if ($endAt) {{ $startAt->translatedFormat('g:i A') }} — {{-- same-day ranges omit the repeated date --}} {{ $sameDay ? $endAt->translatedFormat('g:i A') : $endAt->translatedFormat('j F Y, g:i A') }} @else {{ $startAt->translatedFormat('g:i A') }} @endif
@endif {{-- Online → join link; in-person → address. Never both. --}} @if ($isOnline) @if ($event->event_url)
{{ __('web.event_attendance.join_link') }} {{ __('web.event_attendance.open_link') }}
@endif @elseif ($event->location)
{{ __('web.event_attendance.location') }} {{ $event->location }}
@endif
@if (filled($event->description))
{!! nl2br(e($event->description)) !!}
@endif
@if ($expired) {{-- Past event: the record stays readable, but confirming is closed. --}}
{{ $confirmed ? __('web.event_attendance.ended_confirmed') : __('web.event_attendance.ended_not_confirmed') }}
@else

{{ __('web.event_attendance.confirmed_title') }}

{{ __('web.event_attendance.confirmed_body') }}

@endif
@endsection @push('scripts') @endpush