@extends('admin.layouts.app') @php // Business time for display; storage is UTC. $tz = \App\Support\Time\BookingsTimezone::business(); $startAt = $event->starts_at?->copy()->setTimezone($tz); $endAt = $event->ends_at?->copy()->setTimezone($tz); // The one gate the public flow uses, asked once here so the admin sees // exactly what an investor would hit. $closedReason = $event->publicUnavailableReason(); $isOnline = $event->event_type === \App\Models\Event::TYPE_ONLINE; $canReview = $event->allowsAttendanceReview(); @endphp @section('title', $event->title . ' — ' . __('admin.brand.name')) @section('page_title', __('admin.events.show')) @push('styles') @endpush @section('content') @if (auth('admin')->user()?->can('events.edit')) {{ __('admin.actions.edit') }} @endif {{ __('admin.actions.back_to_list') }}
{{-- ── Left: the event itself ─────────────────────────────────── --}}
@if ($event->image_path) {{ $event->title }} @endif
{{ __('admin.events.fields.event_type') }} {{ __('admin.events.types.' . $event->event_type) }}
{{ __('admin.events.fields.category') }} {{ $event->category?->name ?? '—' }}
{{ __('admin.events.fields.starts_at') }} {{ $startAt?->format('Y-m-d H:i') ?? '—' }}
{{ __('admin.events.fields.ends_at') }} {{ $endAt?->format('Y-m-d H:i') ?? __('admin.events.hints.no_end_set') }}
@if ($isOnline)
{{ __('admin.events.fields.event_url') }} @if ($event->event_url) {{ $event->event_url }} @else — @endif
@else
{{ __('admin.events.fields.location') }} {{ $event->location ?: '—' }}
@endif
{{ __('admin.fields.status') }}
@if (filled($event->description))
{{ $event->description }}
@endif
{{-- ── Right: admin-only operational panel ────────────────────── --}}
{{-- Public link. Disabled, not hidden, when the event is closed: an admin needs to know the link EXISTS and why it will not work, rather than wondering where it went. --}}

{{ __('admin.events.public_link.title') }}

@if ($closedReason)
{{ __('admin.events.public_link.blocked.' . $closedReason) }}
@endif @unless ($closedReason)

{{ __('admin.events.public_link.hint') }}

@endunless
{{-- Audience --}}

{{ __('admin.events.fields.groups') }}

@if ($event->groups->isEmpty())
{{ __('admin.events.hints.no_groups_warning') }}
@else
@foreach ($event->groups as $group) {{ $group->name }} @endforeach
@endif
{{-- Attendance --}} @if (auth('admin')->user()?->can('events.view-attendance'))

{{ __('admin.events.attendance.title') }}

{{-- Counts only. The per-investor roster — names, phones and emails — lives behind its own permission on a separate page, so viewing an event never implies sight of the attendee list. --}}

{{ __('admin.events.attendance.open_roster') }}

{{ $summary['eligible'] }} {{ __('admin.events.attendance.eligible') }}
{{ $summary['viewed'] }} {{ __('admin.events.attendance.viewed') }}
{{ $summary['confirmed'] }} {{ __('admin.events.attendance.confirmed') }}
{{ $summary['awaiting'] }} {{ __('admin.events.attendance.awaiting') }}
{{ $summary['never_opened'] }} {{ __('admin.events.attendance.never_opened') }}
{{-- Post-event verdicts only become meaningful once the event is actually over. --}} @if ($canReview)
{{ $summary['attended'] }} {{ __('admin.events.attendance.attended') }}
{{ $summary['did_not_attend'] }} {{ __('admin.events.attendance.did_not_attend') }}
{{ $summary['not_reviewed'] }} {{ __('admin.events.attendance.not_reviewed') }}
@else
{{ __('admin.events.attendance.review_after_end') }}
@endif
@endif
@endsection