@extends('web.signup.layout') @section('title', __('web.committee_attendance.title') . ' — ' . $committee->monthLabel()) @section('page_title', __('web.committee_attendance.portal.meeting_title')) @section('page_subtitle', '') @section('body_class', 'has-sticky-logo') @php use App\Models\CommitteeAttendance; $status = $attendance?->status ?? CommitteeAttendance::STATUS_PENDING; @endphp @push('styles') @endpush @section('content')
{!! __('web.committee_attendance.portal.welcome', ['name' => '' . e($investor->display_name) . '']) !!}
@csrf

{{ __('web.committee_attendance.portal.meeting_title') }}

{{ optional($committee->meeting_date)->locale(app()->getLocale())->isoFormat('D MMMM Y') }} {{ $committee->formattedMeetingTime() }}

{{ __('web.committee_attendance.portal.startups_heading') }}

{{ __('web.committee_attendance.portal.startups_count', ['count' => $startups->count()]) }}
@forelse ($startups as $startup) @php $initial = mb_strtoupper(mb_substr(trim($startup->display_name ?? '?'), 0, 1)); $logo = $startup->files()->where('slot', 'logo')->orderByDesc('id')->first(); $logoUrl = $logo ? asset('storage/' . $logo->file_path) : null; $brief = (string) ($startup->startup_brief ?? ''); // Localized sector label — Arabic first, English fallback so a // half-translated catalog row still renders something. $sectorLabel = $startup->sector ? (app()->getLocale() === 'ar' ? ($startup->sector->name_ar ?: $startup->sector->name_en) : ($startup->sector->name_en ?: $startup->sector->name_ar)) : null; @endphp
@php $secondaryName = app()->getLocale() === 'ar' ? $startup->name_en : $startup->name; @endphp

{{ $startup->display_name }}

@if ($secondaryName && $secondaryName !== $startup->display_name)

{{ $secondaryName }}

@endif @if ($sectorLabel) {{ $sectorLabel }} @endif

{{ $brief !== '' ? $brief : __('web.committee_attendance.portal.no_description') }}

{{ __('web.committee_attendance.portal.view_details') }} {{-- Per-investor note composer. The textarea auto-saves ~700ms after the investor stops typing, plus there is an explicit "Save" button. Server upserts on the unique (committee, investor, startup) triplet so retries are always idempotent. --}} @php $existingNote = optional($notesByStartup[$startup->id] ?? null)->note ?? ''; @endphp
{{ __('web.committee_attendance.portal.notes_label') }} {{-- Inline save indicator only — the explicit Save button was removed: the textarea auto-saves on debounced input + on blur, so a separate click felt redundant. --}}
@empty
{{ __('web.committee_attendance.portal.empty') }}
@endforelse
@include('web.committee-attendance.partials.sticky-bar', [ 'investor' => $investor, 'committee' => $committee, 'attendance' => $attendance, ]) @push('scripts') @endpush @endsection