{{-- Admin Demo show page. MIRROR OF: admin.committees.show — same rd-shell + rd-card scaffolding, same overview tiles, same sticky section nav, same investor/startup roster pattern. Demo-specific: - Hero card uses the bilingual title + type/mode pills - Optional cover image rendered as a hero strip on top - Evaluations matrix (Alpine) reused from the earlier baseline - No Pass/Fail panel chevron yet — matrix lives inside its own rd-card with the same chrome as committee evaluations --}} @extends('admin.layouts.app') @section('title', $demo->localizedTitle() . ' — ' . __('admin.brand.name')) @section('page_title', $demo->localizedTitle()) @php use Illuminate\Support\Carbon; $isActive = $demo->status === \App\Models\Demo::STATUS_ACTIVE; $locale = app()->getLocale(); $meetingDt = $demo->meeting_date; $monthShort = $meetingDt instanceof Carbon ? $meetingDt->locale($locale)->translatedFormat('M') : '—'; $dayNumber = $meetingDt instanceof Carbon ? $meetingDt->format('j') : '—'; $dayLabel = $meetingDt instanceof Carbon ? $meetingDt->locale($locale)->translatedFormat('l') : '—'; $typeLabel = $demo->type?->{$locale === 'ar' ? 'name_ar' : 'name_en'}; $modeLabel = $demo->mode?->{$locale === 'ar' ? 'name_ar' : 'name_en'}; // ── Shared attendance/registration presentation helpers ─────────────── // Defined ONCE at page scope so the Attendance investors table and the // Webinar summary render pills identically (single source of truth). $pill = fn ($v, $tone) => ''.e(ucfirst((string) $v)).''; $regTone = fn ($s) => ['registered'=>'ok','failed'=>'danger','awaiting'=>'warn','registering'=>'warn','pending'=>'muted'][$s] ?? 'muted'; $attTone = fn ($s) => ['attended'=>'ok','absent'=>'danger','registered'=>'warn','pending'=>'muted'][$s] ?? 'muted'; // Attendance timestamps are stored in UTC (Microsoft Graph returns UTC and the // app timezone is UTC). Display them in the webinar's BUSINESS timezone so they // match the meeting time the admin sees — never a hard-coded offset. $attTz = config('demo_webinars.timezone', 'Asia/Riyadh'); $fmtTime = fn ($dt) => $dt ? Carbon::parse($dt)->timezone($attTz)->format('H:i') : '—'; $isRegistered = fn ($att) => $att && $att->registration_status === \App\Models\DemoAttendance::REG_STATUS_REGISTERED; @endphp @push('styles') @endpush @section('content')
{{ __('admin.demos.webinar.disabled') }}
@endunless @if (! $webinar || ! $webinar->webinar_id){{ __('admin.demos.webinar.none') }}
@if ($webinar && $webinar->last_error){{ $webinar->last_error }}
@endif @if ($webinarEnabled) @endif @else @php // $pill / $regTone / $attTone are defined at page scope (top of file). $webTone = ['created'=>'ok','failed'=>'danger','cancelled'=>'muted','deleted'=>'muted','pending'=>'warn','creating'=>'warn'][$webinar->status] ?? 'muted'; $coEmails = collect($webinar->co_organizers ?? [])->pluck('email')->filter()->implode(', ') ?: '—'; @endphp{{ __('admin.demos.webinar.last_sync') }}: {{ optional($webinar->last_synced_at)->diffForHumans() ?? '—' }} @if ($webinar->last_sync_error) · {{ $webinar->last_sync_error }}@endif
{{ __('admin.demos.attendance_section.subtitle') }} ↓ {{ __('admin.demos.attendance_section.title') }}
@endif—
@endforelse| {{ __('admin.demos.webinar.col_investor') }} | {{ __('admin.demos.attendance_section.rsvp') }} | {{ __('admin.demos.webinar.col_reg_status') }} | {{ __('admin.demos.webinar.col_att_status') }} | {{ __('admin.demos.webinar.col_join') }} | {{ __('admin.demos.webinar.col_leave') }} | {{ __('admin.demos.webinar.col_duration') }} | {{ __('admin.demos.webinar.col_join_url') }} | {{ __('admin.demos.attendance_section.verification') }} |
|---|---|---|---|---|---|---|---|---|
|
@if (! empty($investor->avatar_path))
|
{{ __('admin.demos.attendance.self.' . $selfStatus) }} |
{!! $att ? $pill($att->registration_status, $regTone($att->registration_status)) : $pill(__('admin.demos.webinar.not_registered'), 'muted') !!}
@if ($webinarEnabled && $att && $att->registration_status === \App\Models\DemoAttendance::REG_STATUS_FAILED)
@endif
|
{!! $registered ? $pill($att->attendance_status, $attTone($att->attendance_status)) : '—' !!} | {{ $fmtTime($att?->join_time) }} | {{ $fmtTime($att?->leave_time) }} | {{ $att && $att->duration_minutes !== null ? $att->duration_minutes . ' ' . __('admin.demos.attendance_section.min') : '—' }} | @if ($att?->join_url) @else — @endif | {{-- Admin VERIFICATION dropdown appears ONLY after the investor has CONFIRMED their attendance. Before confirmation (pending / cancelled) there is no admin verification workflow at all — the RSVP badge in the RSVP column already states where they stand. --}} @if ($confirmed) @else — @endif |
| — | ||||||||
{{ $n->note }}