{!! Theme::section('pdfsign.menu') !!}
@php $fmt = function ($v) { $s = is_string($v) ? trim($v) : (empty($v) ? '' : (string) $v); if ($s === '' || $s === '0000-00-00 00:00:00') return '-'; try { return \Carbon\Carbon::parse($s)->format('M j Y, g:ia'); } catch (\Throwable $e) { return $s; } }; $pdfSignSlug = null; if (\Auth::check()) { $pdfSignSlug = (int) (\Auth::user()->visiting_community ?? 0); } if ($pdfSignSlug === null && isset($slug)) { $pdfSignSlug = (int) $slug; } if ($pdfSignSlug <= 0) { $pdfSignSlug = 75; } // Convert DB datetime string to UTC ISO8601 for client-side timezone rendering. // IMPORTANT: DB values are treated as UTC to avoid double-shifting. $isoUtc = function ($v) { $s = is_string($v) ? trim($v) : (empty($v) ? '' : (string) $v); if ($s === '' || $s === '0000-00-00 00:00:00') return ''; try { return \Carbon\Carbon::parse($s, 'UTC')->toIso8601String(); } catch (\Throwable $e) { return ''; } }; @endphp

Recipients Status

Document Token ID: {{ $token }}
Document Title: {{ !empty($document->document_title) ? $document->document_title : ($document->original_filename ?: 'PDF Document') }}
Document prepared by: {{ !empty($preparedByName) ? $preparedByName : '-' }}
@php $invStatus = (string) ($document->signing_status ?? ''); $invSent = in_array($invStatus, ['invited', 'in_progress', 'completed'], true); @endphp @if(!empty($canManageInvites) && $canManageInvites) @if($invSent) Invited @else Invite / Manage @endif @endif
Summary
Total: {{ $stats['total'] ?? 0 }}  |  Invited: {{ $stats['invited'] ?? 0 }}  |  Opened: {{ $stats['opened'] ?? 0 }}  |  Signed: {{ $stats['signed'] ?? 0 }}
Recipients
@if (empty($recipients) || count($recipients) === 0)
No recipients invited yet.
@else
@foreach ($recipients as $r) @php $st = (string)($r->status ?? 'invited'); $cls = $st !== '' ? $st : 'invited'; $inviteUrl = route('community.pdf-sign.invite.show', ['slug' => $pdfSignSlug, 'inviteToken' => $r->invite_token]); $downloadUrl = route('community.pdf-sign.recipient.download', ['slug' => $pdfSignSlug, 'token' => $token, 'recipientId' => $r->id]); $selfEmailNorm = !empty($currentEmail) ? strtolower(trim((string)$currentEmail)) : ''; $rowEmailNorm = !empty($r->email) ? strtolower(trim((string)$r->email)) : ''; $selfId = !empty($currentUserId) ? (int) $currentUserId : 0; $rowUserId = !empty($r->user_id) ? (int) $r->user_id : 0; $isSelfRow = (\Auth::check() && (($selfId > 0 && $rowUserId > 0 && $selfId === $rowUserId) || ($selfEmailNorm !== '' && $rowEmailNorm !== '' && $selfEmailNorm === $rowEmailNorm))); $isRowSigned = !empty($r->signed_at) || ((string)($r->status ?? '') === 'signed'); @endphp @endforeach
Email/Status Invited Opened Signed Download
{{ $r->email }}
{{ $st }}
{{ $fmt($r->invited_at ?? null) }} {{ $fmt($r->opened_at ?? null) }} @if($isSelfRow && !$isRowSigned && !empty($r->invite_token)) @else {{ $fmt($r->signed_at ?? null) }} @endif @if (!empty($r->signed_ip)) {{ $r->signed_ip }} @endif @if(!empty($r->signed_at)) @else - @endif
@endif