@extends('admin.layouts.app') @php $locale = app()->getLocale(); $nameField = $locale === 'ar' ? 'name_ar' : 'name_en'; $dash = __('application_detail.not_available'); $optionName = static fn ($option): string => (string) ($option?->{$nameField} ?: $option?->name_en ?: $option?->name_ar ?: $option?->value ?: $dash); $money = static fn ($value): string => $value === null || $value === '' ? $dash : number_format((float) $value, 2).' '.__('application_detail.sar'); $metricMoney = static function ($value) use ($dash): string { if ($value === null || $value === '') { return $dash; } $number = (float) $value; foreach ([[1000000000, 'B'], [1000000, 'M'], [1000, 'K']] as [$divisor, $suffix]) { if (abs($number) >= $divisor) { return rtrim(rtrim(number_format($number / $divisor, 1, '.', ''), '0'), '.').' '.$suffix.' '.__('application_detail.sar'); } } return rtrim(rtrim(number_format($number, 2, '.', ','), '0'), '.').' '.__('application_detail.sar'); }; $percent = static fn ($value): string => $value === null || $value === '' ? $dash : rtrim(rtrim(number_format((float) $value, 4, '.', ''), '0'), '.').'%'; $value = static fn ($value): string => filled($value) ? (string) $value : $dash; $isCurrent = (int) $startup->current_investment_round_id === (int) $round->id; $stage = $optionName($round->investmentStage); $title = $startup->display_name; $initials = collect(preg_split('/\s+/', trim((string) $startup->display_name)) ?: [])->filter()->take(2)->map(fn ($part) => mb_strtoupper(mb_substr($part, 0, 1)))->implode('') ?: '—'; $companyLogo = $startup->files->first(); $companyLogoUrl = $companyLogo ? route('admin.files.show', $companyLogo) : null; $pitchFiles = $round->files->where('slot', 'pitch_deck'); $investmentMemo = $round->files->firstWhere('slot', 'investment_memo'); $ddFiles = $round->files->where('slot', 'initial_dd'); $otherFiles = $round->files->reject(fn ($file) => in_array($file->slot, ['pitch_deck', 'initial_dd', 'investment_memo'], true)); $applicationFilesCount = $pitchFiles->count() + $otherFiles->count() + ($companyLogo ? 1 : 0); $ddCategory = static function ($file): string { $candidate = (string) ($file->category ?: (\App\Models\File::ddCategoryMap()[$file->document_type] ?? '')); return in_array($candidate, [\App\Models\File::DD_CATEGORY_LEGAL, \App\Models\File::DD_CATEGORY_FINANCIAL], true) ? $candidate : \App\Models\File::DD_CATEGORY_OTHER; }; $legalDdFiles = $ddFiles->filter(fn ($file) => $ddCategory($file) === \App\Models\File::DD_CATEGORY_LEGAL); $financialDdFiles = $ddFiles->filter(fn ($file) => $ddCategory($file) === \App\Models\File::DD_CATEGORY_FINANCIAL); $otherDdFiles = $ddFiles->filter(fn ($file) => $ddCategory($file) === \App\Models\File::DD_CATEGORY_OTHER); $country = $startup->country?->{$nameField} ?: $startup->country?->name_en ?: $startup->country?->name_ar; $city = $startup->city?->{$nameField} ?: $startup->city?->name_en ?: $startup->city?->name_ar; $location = collect([$city, $country])->filter()->join(' · ') ?: $dash; $fieldLabel = static fn (string $field): string => (string) __('admin.startups_admin.fields.'.$field); $narrativeFields = ['startup_brief', 'problem', 'solution', 'investment_opportunity', 'kpi_targets']; $businessTextFields = ['business_model', 'market_size_tam', 'market_size_sam', 'market_size_som', 'cap_and_floor']; $businessOptionFields = [ 'sector_option_id' => $round->sector, 'product_stage_option_id' => $round->productStage, 'traction_option_id' => $round->traction, 'customer_focus_option_id' => $round->customerFocus, 'revenue_model_option_id' => $round->revenueModel, 'note_type_option_id' => $round->noteType, ]; $roundOptionFields = [ 'investment_stage_option_id' => $round->investmentStage, 'round_type_option_id' => $round->roundType, 'previously_received_funding_option_id' => $round->previouslyReceivedFunding, ]; $roundMoneyFields = ['asking_fund_sar', 'min_ticket_size_sar', 'total_raised_sar', 'previous_funding_amount_sar', 'valuation', 'fund_use_operation_sar', 'fund_use_marketing_sar', 'fund_use_development_sar', 'fund_use_salaries_sar']; $resolvedMembers = collect($team->members); $resolvedPosition = static fn ($id): string => $optionName($teamOptions['positions']->firstWhere('id', (int)$id)); $resolvedCommitment = static function ($code) use ($teamOptions, $nameField, $dash): string { if (blank($code)) { return $dash; } $commitment = $teamOptions['commitment_types']->firstWhere('code', (string) $code); if ($commitment) { return (string) ($commitment->{$nameField} ?: $commitment->name_en ?: $commitment->name_ar ?: $dash); } $translationKey = 'application_detail.team.commitment_types.'.(string) $code; $translated = __($translationKey); return $translated === $translationKey ? str((string) $code)->replace('_', ' ')->headline()->toString() : $translated; }; $resolvedCountry = static function ($id) use ($teamOptions, $nameField, $dash): string { $country = $teamOptions['countries']->firstWhere('id', (int)$id); return (string) ($country?->{$nameField} ?: $country?->name_en ?: $country?->name_ar ?: $dash); }; $activityItems = $activity->getCollection(); $sectorFilterUrl = $round->sector ? route('admin.startups.index', ['sector_option_id' => [$round->sector->getKey()]]) : null; $externalUrl = static function ($url): ?string { if (blank($url)) { return null; } return preg_match('~^https?://~i', (string) $url) ? (string) $url : 'https://'.ltrim((string) $url, '/'); }; $websiteUrl = $externalUrl($startup->website); $linkedinUrl = $externalUrl($startup->linkedin_url); $websiteDisplay = $websiteUrl ? (parse_url($websiteUrl, PHP_URL_HOST) ?: $startup->website) : null; $linkedinDisplay = $linkedinUrl ? trim((string) (parse_url($linkedinUrl, PHP_URL_PATH) ?: parse_url($linkedinUrl, PHP_URL_HOST)), '/') : null; $firstNames = collect([$startup->first_name_en, $startup->first_name_ar])->filter()->join(' / '); $whatsappNumber = preg_replace('/\D+/', '', (string) $startup->phone_number); if (str_starts_with($whatsappNumber, '00')) { $whatsappNumber = substr($whatsappNumber, 2); } $whatsappUrl = filled($whatsappNumber) ? 'https://wa.me/'.$whatsappNumber : null; $narrativeValues = collect($narrativeFields) ->mapWithKeys(fn (string $field): array => [$field => $round->{$field}]) ->filter(fn ($fieldValue): bool => filled($fieldValue)); $formatBytes = static function ($bytes) use ($dash): string { if ($bytes === null || $bytes === '') { return $dash; } $bytes = (int) $bytes; if ($bytes >= 1048576) { return number_format($bytes / 1048576, 1).' MB'; } if ($bytes >= 1024) { return number_format($bytes / 1024, 0).' KB'; } return $bytes.' B'; }; $fileVisual = static function ($file): array { $extension = mb_strtolower((string) pathinfo((string) $file?->file_name, PATHINFO_EXTENSION)); $mime = mb_strtolower((string) $file?->mime_type); if (str_starts_with($mime, 'image/') || in_array($extension, ['jpg', 'jpeg', 'png', 'webp', 'gif', 'svg'], true)) { return ['image', 'image']; } if ($extension === 'pdf' || str_contains($mime, 'pdf')) { return ['file', 'pdf']; } if (in_array($extension, ['xls', 'xlsx', 'csv'], true) || str_contains($mime, 'spreadsheet') || str_contains($mime, 'excel')) { return ['sheet', 'sheet']; } if (in_array($extension, ['doc', 'docx', 'txt', 'rtf'], true) || str_contains($mime, 'word')) { return ['file', 'document']; } return ['file', 'other']; }; $requestSummary = [ 'total' => $round->informationRequests->count(), 'pending' => $round->informationRequests->where('status', 'pending')->count(), 'submitted' => $round->informationRequests->where('status', 'submitted')->count(), 'latest' => $round->informationRequests->max('created_at'), ]; @endphp @section('title', __('application_detail.startup_title').' · '.$title) @section('page_title', __('application_detail.startup_title')) @push('styles') @endpush @section('content')
@include('admin.partials.application-detail-icons')
{{ $initials }} @if($companyLogoUrl){{ $startup->display_name }}@endif

{{ __('application_detail.hero.application_type') }}

{{ $title }}

{{ __('application_detail.application_number', ['number' => $round->round_number]) }} · {{ $round->submitted_at ? __('application_detail.submitted', ['date' => $round->submitted_at->translatedFormat('j M Y, H:i')]) : __('application_detail.not_submitted') }}@if($round->source) · {{ __('application_detail.source') }}: {{ $round->source }}@endif

{{ $isCurrent ? __('application_detail.current') : __('application_detail.historical') }} {{ __('application_detail.workflow.status') }}: {{ $optionName($round->statusOption) }} {{ __('application_detail.workflow.group') }}: {{ $round->group?->name ?: $dash }}
@foreach([ ['url' => $startup->phone_number ? 'tel:'.$startup->phone_number : null, 'icon' => 'phone', 'class' => 'phone', 'label' => __('admin.startups_admin.fields.phone_number'), 'external' => false], ['url' => $whatsappUrl, 'icon' => 'whatsapp', 'class' => 'whatsapp', 'label' => __('application_detail.actions.whatsapp'), 'external' => true], ['url' => $startup->email ? 'mailto:'.$startup->email : null, 'icon' => 'mail', 'class' => 'mail', 'label' => __('admin.startups_admin.fields.email'), 'external' => false], ['url' => $websiteUrl, 'icon' => 'globe', 'class' => 'website', 'label' => __('admin.startups_admin.fields.website'), 'external' => true], ['url' => $linkedinUrl, 'icon' => 'linkedin', 'class' => 'linkedin', 'label' => __('admin.startups_admin.fields.linkedin_url'), 'external' => true], ] as $contactAction) @if($contactAction['url']) @else @endif @endforeach
{{ __('application_detail.actions.view_profile') }} {{ __('application_detail.actions.view_timeline') }} @if(auth('admin')->user()?->can('automation.view')){{ __('application_detail.actions.view_automation') }}@endif @if(auth('admin')->user()?->can('investments.manage'))
@if($canCreateInvestment){{ __('admin.investments_index.add') }}@else{{ __('admin.investments_index.add') }}@endif @endif
@foreach([ ['asking_fund', $metricMoney($round->asking_fund_sar), 'cash'], ['offered_equity', $percent($round->offered_equity_pct), 'target'], ['runway', $round->runway_months === null ? $dash : $round->runway_months.' '.__('application_detail.months'), 'activity'], ['total_raised', $metricMoney($round->total_raised_sar), 'cash'], ['valuation', $metricMoney($round->valuation), 'business'], ] as [$metric, $metricValue, $icon])
{{ __('application_detail.metrics.'.$metric) }}
{{ $metricValue }}
@endforeach
@if(session('success'))
{{ session('success') }}
@endif @if(session('status'))
{{ session('status') }}
@endif @if(session('error'))@endif @if($errors->any()) @endif
@foreach([ [__('admin.startups_admin.fields.name_en'), $startup->name_en ?: $startup->display_name, 'building', null, false, null, false], [__('admin.startups_admin.fields.applicant_full_name'), $startup->applicant_full_name, 'profile', null, false, null, false], [__('admin.startups_admin.fields.first_name_en').' / '.__('admin.startups_admin.fields.first_name_ar'), $firstNames, 'profile', null, false, null, false], [__('admin.startups_admin.fields.email'), $startup->email, 'mail', $startup->email ? 'mailto:'.$startup->email : null, false, $startup->email, false], [__('admin.startups_admin.fields.phone_number'), $startup->phone_number, 'phone', $startup->phone_number ? 'tel:'.$startup->phone_number : null, false, $startup->phone_number, true], [__('admin.startups_admin.fields.country_id'), $location, 'location', null, false, null, false], [__('admin.startups_admin.fields.website'), $websiteDisplay, 'globe', $websiteUrl, true, $websiteUrl, false], [__('admin.startups_admin.fields.linkedin_url'), $linkedinUrl ? 'LinkedIn' : null, 'linkedin', $linkedinUrl, true, $linkedinUrl, false], [__('admin.startups_admin.fields.name'), $startup->name, 'file', null, false, null, false], [__('admin.startups_admin.fields.sector_option_id'), $optionName($round->sector), 'target', $sectorFilterUrl, false, null, false], ] as [$label, $identityValue, $icon, $href, $opensNewTab, $copyValue, $showWhatsapp]) @php($hasIdentityValue = filled($identityValue) && $identityValue !== $dash)
{{ $label }}@if($href && $hasIdentityValue){{ $value($identityValue) }}@else{{ $value($identityValue) }}@endif @if(filled($copyValue) || ($showWhatsapp && $whatsappUrl)) @if(filled($copyValue)) @endif @if($showWhatsapp && $whatsappUrl)@endif @endif
@endforeach

{{ __('application_detail.account_context_help') }}

{{ __('application_detail.actions.view_timeline') }}

{{ __('application_detail.workflow_history.current_state') }}

{{ __('application_detail.workflow.group') }}{{ $round->group?->name ?: $dash }}
{{ __('application_detail.workflow.status') }}{{ $optionName($round->statusOption) }}
{{ __('application_detail.workflow.action') }}{{ $optionName($round->action) }}
@if(filled($round->rejection_reason))
{{ __('admin.rejection_modal.reason_label') }}{{ $round->rejection_reason }}
@endif

{{ $isCurrent ? __('application_detail.current_projection_help') : __('application_detail.historical_projection_help') }}

@include('admin.partials.application-workflow-history', ['items' => $activityItems])
@foreach([ 'group_id' => [__('application_detail.workflow.group'), $workflowOptions['groups'], 'name'], 'status_option_id' => [__('application_detail.workflow.status'), $workflowOptions['statuses'], $nameField], 'action_option_id' => [__('application_detail.workflow.action'), $workflowOptions['actions'], $nameField], ] as $field => [$label, $options, $display])
@csrf @method('PATCH') @if($field === 'action_option_id')@endif
@endforeach
@if($narrativeValues->isNotEmpty())
@foreach($narrativeValues as $field => $narrativeValue)
{{ $fieldLabel($field) }}{{ $narrativeValue }}
@endforeach
@else
{{ __('application_detail.empty.pitch') }}
@endif
@csrf @method('PATCH')
@foreach($narrativeFields as $field)@endforeach
@include('admin.partials.application-form-actions')
@if($investmentMemo) @php([$memoIcon, $memoKind] = $fileVisual($investmentMemo))
{{ $investmentMemo->file_name }}{{ strtoupper((string)($investmentMemo->mime_type ?: $investmentMemo->file_type)) }} · {{ $formatBytes($investmentMemo->size_bytes) }}{{ __('application_detail.files.uploaded_at') }} {{ $investmentMemo->created_at?->translatedFormat('j M Y, H:i') ?: $dash }} · {{ __('application_detail.source') }}: {{ $investmentMemo->uploaded_by_type === \App\Models\Agent::class ? 'n8n · Agent #'.$investmentMemo->uploaded_by_id : 'Admin' }}
@else
{{ __('application_detail.empty.investment_memo') }}
@endif
{{ $requestSummary['total'] }}{{ __('application_detail.requests.total') }} {{ $requestSummary['pending'] }}{{ __('application_detail.requests.pending') }} {{ $requestSummary['latest'] ? \Illuminate\Support\Carbon::parse($requestSummary['latest'])->translatedFormat('j M Y, H:i') : $dash }}{{ __('application_detail.requests.latest') }}
@forelse($round->informationRequests as $informationRequest)
first) open @endif> {{ __('application_detail.requests.request') }} #{{ $informationRequest->id }}{{ $informationRequest->agent?->name ?? ('#'.$informationRequest->agent_id) }} · {{ $informationRequest->agent?->agent_code ?? $informationRequest->agent?->agent_key ?? $dash }}{{ ucfirst($informationRequest->status) }}{{ $informationRequest->questions->count() }} {{ __('application_detail.requests.questions') }}
{{ __('application_detail.requests.external') }}{{ $informationRequest->external_request_id ?: $dash }}{{ __('application_detail.requests.requested_at') }}{{ $informationRequest->created_at?->translatedFormat('j M Y, H:i') ?? $dash }}{{ __('application_detail.requests.submitted_at') }}{{ $informationRequest->submitted_at?->translatedFormat('j M Y, H:i') ?? $dash }}
@foreach($informationRequest->questions as $question)
{{ __('application_detail.requests.question') }}

{{ $question->question_text }}

{{ __('application_detail.requests.answer') }}

{{ $question->answer_text ?: __('application_detail.requests.awaiting') }}

@endforeach
@empty
{{ __('application_detail.empty.additional_information') }}
@endforelse
{{ __('application_detail.team.name') }}{{ __('application_detail.team.commitment') }}{{ __('application_detail.team.nationality') }}{{ __('application_detail.team.founder') }}LinkedIn
@forelse($resolvedMembers as $member)
{{ $member['name'] }}{{ $member['position'] ?: $resolvedPosition($member['position_option_id']) }}@if(count($member['positions']) > 1)@foreach($member['positions'] as $positionId){{ $resolvedPosition($positionId) }}@endforeach@endif
{{ $resolvedCommitment($member['commitment_type_code'] ?? null) }} {{ $resolvedCountry($member['country_id']) }} {{ $member['is_founder'] ? __('application_detail.yes') : __('application_detail.no') }} @if($member['linkedin_url'])@else@endif
@empty
{{ __('application_detail.empty.team') }}
@endforelse

{{ __('application_detail.team_source', ['source' => $team->classification]) }}

@foreach($round->members as $member)
@csrf @method('PATCH') @include('admin.startups._application-member-fields', ['member' => $member, 'teamOptions' => $teamOptions, 'optionName' => $optionName])
@csrf @method('DELETE')
@endforeach
@csrf

{{ __('application_detail.actions.add_member') }}

@include('admin.startups._application-member-fields', ['member' => null, 'teamOptions' => $teamOptions, 'optionName' => $optionName])

{{ __('application_detail.clusters.classification') }}

@foreach(['sector_option_id', 'product_stage_option_id', 'traction_option_id'] as $field)
{{ $fieldLabel($field) }}@if($field === 'sector_option_id' && $sectorFilterUrl){{ $optionName($businessOptionFields[$field]) }}@else{{ $optionName($businessOptionFields[$field]) }}@endif
@endforeach

{{ __('application_detail.clusters.business_model') }}

@foreach(['customer_focus_option_id', 'revenue_model_option_id', 'note_type_option_id'] as $field)
{{ $fieldLabel($field) }}{{ $optionName($businessOptionFields[$field]) }}
@endforeach
{{ $fieldLabel('business_model') }}{{ $value($round->business_model) }}

{{ __('application_detail.clusters.market') }}

@foreach(['market_size_tam', 'market_size_sam', 'market_size_som', 'cap_and_floor'] as $field)
{{ $fieldLabel($field) }}{{ $value($round->{$field}) }}
@endforeach
@csrf @method('PATCH')
@foreach($businessOptionFields as $field => $option)@endforeach @foreach($businessTextFields as $field)@endforeach
@include('admin.partials.application-form-actions')

{{ __('application_detail.clusters.round') }}

@foreach(['investment_stage_option_id', 'round_type_option_id', 'previously_received_funding_option_id'] as $field)
{{ $fieldLabel($field) }}{{ $optionName($roundOptionFields[$field]) }}
@endforeach

{{ __('application_detail.clusters.capital') }}

@foreach(['asking_fund_sar', 'min_ticket_size_sar', 'total_raised_sar', 'previous_funding_amount_sar'] as $field)
{{ $fieldLabel($field) }}{{ $money($round->{$field}) }}
@endforeach

{{ __('application_detail.clusters.valuation_terms') }}

{{ $fieldLabel('valuation') }}{{ $money($round->valuation) }}
{{ $fieldLabel('offered_equity_pct') }}{{ $percent($round->offered_equity_pct) }}
{{ $fieldLabel('runway_months') }}{{ $round->runway_months === null ? $dash : $round->runway_months.' '.__('application_detail.months') }}

{{ __('application_detail.clusters.fund_use') }}

@foreach(['fund_use_marketing_sar', 'fund_use_development_sar', 'fund_use_operation_sar', 'fund_use_salaries_sar'] as $field)
{{ $fieldLabel($field) }}{{ $money($round->{$field}) }}
@endforeach
@csrf @method('PATCH')
@foreach($roundOptionFields as $field => $option)@endforeach @foreach($roundMoneyFields as $field)@endforeach
@include('admin.partials.application-form-actions')
@foreach([ ['label' => __('application_detail.files.logo'), 'files' => collect([$companyLogo])->filter(), 'account' => true], ['label' => __('application_detail.files.pitch_deck'), 'files' => $pitchFiles, 'account' => false], ['label' => __('application_detail.files.other'), 'files' => $otherFiles, 'account' => false], ] as $slot) @endforeach
@include('admin.startups._application-file-manager-card', [ 'title' => __('application_detail.files.logo'), 'managedFiles' => collect([$companyLogo])->filter(), 'slot' => 'logo', 'accountOwned' => true, ]) @include('admin.startups._application-file-manager-card', [ 'title' => __('application_detail.files.pitch_deck'), 'managedFiles' => $pitchFiles, 'slot' => 'pitch_deck', 'addLabel' => __('application_detail.files.add_pitch_deck'), ]) @include('admin.startups._application-file-manager-card', [ 'title' => __('application_detail.files.other'), 'managedFiles' => $otherFiles, 'slot' => 'other', 'addLabel' => __('application_detail.files.add_other_document'), ])
@foreach([ __('application_detail.files.legal_documents') => $legalDdFiles, __('application_detail.files.financial_documents') => $financialDdFiles, __('application_detail.files.other_documents') => $otherDdFiles, ] as $label => $slotFiles) @endforeach
@include('admin.startups._application-file-manager-card', [ 'title' => __('application_detail.files.legal_documents'), 'managedFiles' => $legalDdFiles, 'slot' => 'initial_dd', 'category' => \App\Models\File::DD_CATEGORY_LEGAL, 'emptyMessage' => __('application_detail.files.empty_legal'), 'addLabel' => __('application_detail.files.add_legal_document'), ]) @include('admin.startups._application-file-manager-card', [ 'title' => __('application_detail.files.financial_documents'), 'managedFiles' => $financialDdFiles, 'slot' => 'initial_dd', 'category' => \App\Models\File::DD_CATEGORY_FINANCIAL, 'emptyMessage' => __('application_detail.files.empty_financial'), 'addLabel' => __('application_detail.files.add_financial_document'), ]) @include('admin.startups._application-file-manager-card', [ 'title' => __('application_detail.files.other_documents'), 'managedFiles' => $otherDdFiles, 'slot' => 'initial_dd', 'category' => \App\Models\File::DD_CATEGORY_OTHER, 'emptyMessage' => __('application_detail.files.empty_other'), 'addLabel' => __('application_detail.files.add_other_document'), ])
@forelse($round->demoSlots as $slot)
{{ $slot->demo?->localizedTitle() ?: $dash }}
{{ $slot->start_time }}–{{ $slot->end_time }}
@if($slot->demo){{ __('application_detail.actions.open') }}@endif
@empty
{{ __('application_detail.empty.demos') }}
@endforelse
@forelse($committeeTranscriptRows as $committeeRow) @php($slot = $committeeRow['slot']) @php($committee = $committeeRow['committee']) @php($latestTranscript = $committeeRow['latest_version']) @php($transcriptVersions = $committeeRow['versions']) @php($transcriptStatus = $committeeRow['transcript_status']) @php($latestFirefliesEvent = $committeeRow['latest_event']) @php($auto030 = $committeeRow['auto030_delivery']) @php($recoveryDiagnostics = is_array(session('fireflies_diagnostics')) && (int) data_get(session('fireflies_diagnostics'), 'committee_id') === (int) $committee?->getKey() ? session('fireflies_diagnostics') : null) @php($transcriptStatusClass = match($transcriptStatus) { 'ready' => 'ap-pill--current', 'queued', 'processing' => 'ap-pill--accent', 'failed' => 'ap-pill--danger', default => 'ap-pill--warning' }) @php($evaluationCount = $round->committeeEvaluations->where('committee_id', $slot->committee_id)->count()) @php($auto031 = $auto031Deliveries->get((int) $slot->committee_id)) @php($submittedBy = data_get($auto031?->event_context, 'evaluation_submission.submitted_by.name')) @php($submittedAt = $auto031?->payload_snapshotted_at ?: $auto031?->created_at)
{{ $committee ? __('application_detail.committee_transcript.committee_title', ['id' => $committee->getKey(), 'name' => $committee->monthLabel()]) : $dash }}
@if($committee)
{{ __('application_detail.committee_transcript.meeting_date') }}: {{ $committee->meeting_date?->translatedFormat('j M Y') ?: $dash }} @if($committee->formattedMeetingTime()) · {{ $committee->formattedMeetingTime() }}@endif @if($slot->start_time || $slot->end_time) · {{ __('application_detail.committee_transcript.slot') }}: {{ $slot->formattedRange() }}@endif
{{ __('application_detail.committee_transcript.meeting_status') }}: {{ __('admin.committees.status.'.($committee->status ?: 'active')) }} {{ __('application_detail.committee_transcript.transcript_status') }}: {{ __('application_detail.committee_transcript.status.'.$transcriptStatus) }} AUTO-030: {{ $auto030 ? __('application_detail.committee_transcript.delivery_status.'.$auto030->status) : __('application_detail.committee_transcript.delivery_status.not_created') }}
@endif @if($latestTranscript)
{{ __('application_detail.committee_transcript.latest_version', ['version' => $latestTranscript->version_number]) }} · {{ trans_choice('application_detail.committee_transcript.sentence_count', $latestTranscript->sentence_count, ['count' => $latestTranscript->sentence_count]) }} · {{ trans_choice('application_detail.committee_transcript.history_count', $transcriptVersions->count(), ['count' => $transcriptVersions->count()]) }} @if($latestTranscript->fetched_at) · {{ __('application_detail.committee_transcript.stored_at') }}: {{ $latestTranscript->fetched_at->translatedFormat('j M Y, H:i') }}@endif
@can('automation.inspect_payload') @if($transcriptVersions->count() > 1)
{{ __('application_detail.committee_transcript.history') }}
@endif @endcan @elseif($transcriptStatus === 'failed' && $latestFirefliesEvent)
{{ __('application_detail.committee_transcript.failed_hint') }}
@can('automation.retry')
{{ __('application_detail.committee_transcript.failure_details', [ 'stage' => $latestFirefliesEvent->stage ?: $dash, 'code' => $latestFirefliesEvent->error_code ?: $dash, 'message' => $latestFirefliesEvent->error_message ?: $dash, ]) }} @if($latestFirefliesEvent->http_status) · HTTP {{ $latestFirefliesEvent->http_status }}@endif
@endcan @else
{{ __('application_detail.committee_transcript.status_hint.'.$transcriptStatus) }}
@endif @if(!$latestTranscript) @if($latestFirefliesEvent)
{{ __('application_detail.committee_transcript.event_details', [ 'id' => $latestFirefliesEvent->getKey(), 'status' => $latestFirefliesEvent->status, 'stage' => $latestFirefliesEvent->stage ?: $dash, 'attempts' => $latestFirefliesEvent->attempts, ]) }}
@else
{{ __('application_detail.committee_transcript.no_event_hint') }}
@endif @endif @if($recoveryDiagnostics && auth('admin')->user()?->can('automation.retry'))
{{ __('application_detail.committee_transcript.discovery_details', [ 'stage' => data_get($recoveryDiagnostics, 'stage', 'transcript_discovery'), 'code' => data_get($recoveryDiagnostics, 'category', $dash), 'reference' => data_get($recoveryDiagnostics, 'reference_id', $dash), ]) }} @if(data_get($recoveryDiagnostics, 'next_action')) · {{ data_get($recoveryDiagnostics, 'next_action') }}@endif
@endif
{{ trans_choice('auto031.evaluation_count', $evaluationCount, ['count' => $evaluationCount]) }}
@if($auto031)
{{ __('auto031.already_sent') }} · {{ __('auto031.sent_at') }}: {{ $submittedAt?->translatedFormat('j M Y, H:i') ?: $dash }} · {{ __('auto031.delivery_status') }}: {{ __('auto031.status.'.$auto031->status) }} @if($submittedBy) · {{ __('auto031.sent_by') }}: {{ $submittedBy }}@endif
@elseif($evaluationCount === 0)
{{ __('auto031.errors.no_evaluations') }}
@endif @if($errors->has('committee') && (int) old('committee_id') === (int) $slot->committee_id)
{{ $errors->first('committee') }}
@endif
@can('automation.retry') @if($committee && !$latestTranscript && !in_array($transcriptStatus, ['queued', 'processing'], true) && \Illuminate\Support\Facades\Route::has('admin.automation.fireflies.check'))
@csrf
@endif @endcan @can('automation.inspect_payload') @if($latestTranscript) {{ __('application_detail.committee_transcript.view') }} @endif @endcan @if($auto031) @can('automation.view') {{ __('auto031.open_control_center') }} @endcan @elseif($committee) @can('startup-applications.edit')
@csrf
@endcan @endif
@empty
{{ __('application_detail.empty.committees') }}
@endforelse
@forelse($round->meetings as $meeting)
{{ $meeting->title ?: '#'.$meeting->id }}
{{ $meeting->meeting_date?->translatedFormat('j M Y') ?: $dash }} · {{ $meeting->status ?: $dash }}
{{ __('application_detail.actions.open') }}
@empty
{{ __('application_detail.empty.meetings') }}
@endforelse
@if(auth('admin')->user()?->can('investments.view')) @forelse($investments as $investment)
{{ __('application_detail.investment.number', ['number' => $investment->investment_number]) }} · {{ $optionName($investment->investmentType) }}
{{ $investment->start_date?->translatedFormat('j M Y') ?: $dash }} → {{ $investment->completion_date?->translatedFormat('j M Y') ?: $dash }}
{{ $money($investment->participations_sum_amount_sar ?? 0) }}{{ __('application_detail.investment.participants', ['count' => $investment->participations_count]) }}
@forelse($investment->participations as $participation)
{{ $participation->investor?->display_name ?: '#'.$participation->investor_id }}
{{ __('application_detail.investment.investor_application', ['number' => $participation->investorApplication?->application_number ?: $dash]) }} · {{ $money($participation->amount_sar) }} · {{ $percent($participation->equity_percentage) }}
@if($participation->notes)

{{ $participation->notes }}

@endif
@foreach($participation->files as $file){{ $file->file_name }}@endforeach
@empty
{{ __('application_detail.empty.investments') }}
@endforelse
@empty
{{ __('application_detail.empty.investments') }}
@endforelse @if(auth('admin')->user()?->can('investments.manage')) @if($canCreateInvestment)
@csrf
@else

{{ __('application_detail.investment.create_help') }}

@endif @endif
@endif @include('admin.partials.application-notes', [ 'applicationNotes' => $round->notes, 'noteStoreAction' => route('admin.startups.investment-rounds.notes.store', [$startup, $round]), 'noteUpdateAction' => fn ($note) => route('admin.startups.investment-rounds.notes.update', [$startup, $round, $note]), 'noteDestroyAction' => fn ($note) => route('admin.startups.investment-rounds.notes.destroy', [$startup, $round, $note]), ])
@forelse($activityItems as $event)
{{ $event['event_label'] }}{{ $event['source_label'] }}

{{ $event['summary'] }}

{{ $event['actor'] }}

@if($event['reason'])

{{ __('application_detail.activity.reason') }}: {{ $event['reason'] }}

@endif @if($event['changes'])
@foreach($event['changes'] as $change)
{{ $change['label'] }}{{ $change['before'] }}→{{ $change['after'] }}
@endforeach
@endif
@empty
{{ __('application_detail.empty.activity') }}
@endforelse
@include('admin.partials.rejection-modal') @endsection @push('scripts') @endpush