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
| Email/Status |
Invited |
Opened |
Signed |
Download |
@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
{{ $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
|
@endforeach
@endif