@php $task = $approval->task; $run = $task?->run; $input = $run?->input ?? []; $prospect = $input['prospect'] ?? $input['entity'] ?? []; $icpScore = collect($run?->tasks ?? []) ->first(fn ($t) => ($t->skills_applied[0] ?? null) === 'icp-matcher') ?->output_payload['score'] ?? null; $subject = collect($run?->tasks ?? []) ->first(fn ($t) => ($t->skills_applied[0] ?? null) === 'subject-optimizer') ?->output_payload['subject'] ?? null; $canDecide = auth()->user()->canApprove() && $approval->status === 'pending'; @endphp
← Back to approvals
@if ($icpScore !== null) @endif

{{ $prospect['name'] ?? $prospect['email'] ?? 'Unknown recipient' }}

{{ $prospect['title'] ?? '' }} @if (! empty($prospect['company'])) · {{ $prospect['company'] }} @endif @if (! empty($prospect['email'])) · {{ $prospect['email'] }} @endif

@if (! empty($prospect['country']))

{{ $prospect['country'] }}

@endif
{{ $approval->agent->name }}
@if ($approval->expires_at) Expires {{ $approval->expires_at->diffForHumans() }} @endif
@if ($subject) Subject
{{ $subject }}
@endif Message @if ($editing)
Approve & send edited Cancel
@else
{{ $approval->edited_content ?? $approval->original_content }}
@endif @if ($approval->reviewer || $approval->reviewed_at)
Reviewed by {{ $approval->reviewer?->name ?? 'system' }} @if ($approval->reviewed_at) · {{ $approval->reviewed_at->diffForHumans() }} @endif @if ($approval->review_note)
{{ $approval->review_note }}
@endif
@endif
@if ($canDecide && ! $editing)

Decide

Approving sends this email now. Edits land here, are reapproved, then sent. Reject leaves a feedback signal so the agent learns.

Approve & send Edit
Reject
@endif