@php $tz = config('app.display_timezone'); $select = 'mt-1 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; $statusColor = ['draft' => 'amber', 'confirmed' => 'sky', 'completed' => 'emerald']; $attendeeIcon = ['user' => 'user', 'contact' => 'user-circle', 'other' => 'users']; $tagLists = [ 'need' => ['label' => __('Need tags'), 'tags' => $needTags, 'input' => 'needTagInput', 'chip' => 'bg-indigo-50 text-indigo-700', 'hint' => __('e.g. banners, annual report')], 'competitor' => ['label' => __('Competitors mentioned'), 'tags' => $competitorTags, 'input' => 'competitorTagInput', 'chip' => 'bg-rose-50 text-rose-700', 'hint' => __('e.g. a rival printer')], ]; @endphp
{{ __('Meeting Notes') }}

{{ $note->title }}

{{ __(\App\Models\Crm\MeetingNote::STATUSES[$note->status] ?? $note->status) }} {{ __('Written by :name', ['name' => $note->author?->name ?? __('Unknown')]) }} @if ($note->source !== 'manual') · {{ __(\App\Models\Crm\MeetingNote::SOURCES[$note->source] ?? $note->source) }} @endif @if ($note->confirmed_at) · {{ __('Confirmed by :name on :date', ['name' => $note->confirmedBy?->name ?? __('Unknown'), 'date' => $note->confirmed_at->copy()->timezone($tz)->format('j M Y')]) }} @endif

@if ($canEdit)
@if ($note->status === 'draft') @endif @if ($canCollectNotes) {{ __('Collect notes now') }} {{ __('Asking Google…') }} @endif {{ __('Save') }} {{ __('Saving…') }} @if ($note->status === 'draft') {{ __('Confirm as record') }} @elseif ($note->status === 'confirmed') {{ __('Complete') }} @endif
@endif
@if ($note->status === 'draft')
{{ __('This is a draft. It does not count as a record, and its actions are not tasks, until it is reviewed and confirmed.') }}
@endif @if ($note->status === 'completed') @include('livewire.crm.meetings.partials.section', ['icon' => 'check-circle', 'title' => __('Outcome')])

{{ $note->outcome }}

@endif
@include('livewire.crm.meetings.partials.section', ['icon' => 'calendar-days', 'title' => __('When and with whom')])
@if ($canEdit)
@if ($opportunityId)

{{ $note->customer?->name ?? __('From the opportunity') }}

@else @endif
@else
@include('livewire.crm.meetings.partials.regarding', ['row' => $note])
@endif
@forelse ($attendees as $i => $attendee) {{ $attendee['name'] }} @if ($canEdit) @endif @empty {{ __('Nobody recorded yet.') }} @endforelse
@if ($canEdit)
{{ __('Add') }}
{{ __('Add') }}
{{ __('Add') }}
@endif
@include('livewire.crm.meetings.partials.section', ['icon' => 'chat-bubble-left-right', 'title' => __('What was discussed')])
@foreach ($tagLists as $list => $meta)
@foreach ($meta['tags'] as $i => $tag) {{ $tag }} @if ($canEdit) @endif @endforeach
@if ($canEdit)
{{ __('Add') }}
@endif
@endforeach
{{-- Outside the fieldset: an assignee works their task even when the note is read-only. --}} @include('livewire.crm.meetings.partials.section', ['icon' => 'clipboard-document-check', 'title' => __('Actions')])

{{ $note->status === 'draft' ? __('Each action becomes a task for the person named when the note is confirmed.') : __('Each action is a task. New actions become tasks when you save.') }}

@foreach ($actions as $i => $action) @php $task = $action['task_id'] ? ($tasks[$action['task_id']] ?? null) : null; @endphp @if ($action['task_id'])

{{ $action['text'] }}

{{ $task?->assignee?->name ?? __('Unknown') }} · {{ __('due :date', ['date' => $task?->due_at?->copy()->timezone($tz)->format('j M Y') ?? $action['due']]) }} · {{ __(\App\Models\Crm\Task::STATUSES[$task?->status ?? 'open'] ?? '') }}

@if ($task && $task->outcome)

{{ __('Outcome') }}: {{ $task->outcome }}

@endif
@if ($task && $task->isOpen() && \Illuminate\Support\Facades\Gate::allows('update', $task))
@endif
@elseif (! $canEdit)

{{ $action['text'] }}

{{ optional($members->firstWhere('id', $action['assignee_id']))->name ?? __('Nobody') }} · {{ $action['due'] }} · {{ __('Not yet a task') }}

@else
@endif @endforeach @if ($actions === [])

{{ __('No actions yet.') }}

@endif @if ($canEdit) {{ __('Add action') }} @endif
@if ($note->raw_notes) @include('livewire.crm.meetings.partials.section', ['icon' => 'document-text', 'title' => __('Original notes')])
@if ($note->source_document_url) {{ __('Open the source document') }} @endif

{{ $note->raw_notes }}

@endif {{-- Voice notes on this meeting (S20). Mounted once it is built. --}} @unless (\App\Livewire\Crm\VoiceNotes::isComingSoon()) @endunless
{{ __('Complete meeting note') }} {{ __('Close') }} {{ __('Complete') }}