@extends('layouts.app') @section('title', 'Package Details') @section('content')

Package Detail

PACKAGE ID : {{ $package->package_guid }}

@php $isAllCompleted = $email_templates->every(function($item) { return $item->email_template_status == 'Completed'; }); // 🚀 DYNAMIC URL PREFIX $base_file_path = $baseUrl . "/tenant_user/" . session("company_uuid"); $all_signed_urls = []; $certificate_url = $base_file_path . "/certificate/" . $package->package_id . ".pdf"; if($isAllCompleted) { foreach($email_templates as $template) { $data = json_decode($template->email_template_json); if($data) { foreach($data as $doc) { $url = $base_file_path . "/signed_documents/" . $package->package_id . "_" . $doc->template_id . ".pdf"; if(!in_array($url, $all_signed_urls)) { $all_signed_urls[] = $url; } } } } } $minPendingId = 0; if($package->package_sort_order == 'Yes') { $minPendingId = $email_templates->where('email_template_status', 'Pending')->min('email_template_id'); } @endphp @if($isAllCompleted && $email_templates->count() > 0) Fully Executed
@else In Progress @endif
Signing Mode {{ $package->package_sent_mode == 'Local' ? 'In-Person' : 'Remote via Email' }}
Sequential Signing {{ $package->package_sort_order == 'Yes' ? 'Enabled' : 'Disabled' }}
Field Visibility {{ $package->package_field_visibility == 'Yes' ? 'Visible to all' : 'Private' }}
@if(isset($batch))
Part of Bulk Batch
@endif @if(isset($public_link))
@endif

Total Signers

{{ $email_templates->count() }}

Completed

{{ $email_templates->where('email_template_status', 'Completed')->count() }}

Pending

{{ $email_templates->where('email_template_status', 'Pending')->count() }}

Recipient Status

@forelse($email_templates as $email_template) @php $isTurn = ($package->package_sort_order == 'No') || ($email_template->email_template_id == $minPendingId); @endphp
{{ substr($email_template->email_name, 0, 1) }}
{{ $email_template->email_name }}
{{ $email_template->email_id }}
{{ $email_template->email_template_status }}
@if($email_template->email_template_status == "Completed")

Activity

Signed: {{ $email_template->email_template_signed_date ?? 'N/A' }}
@endif

Documents

@php $data = json_decode($email_template->email_template_json); @endphp @if($data) @foreach($data as $doc_details) @if($email_template->email_template_status == "Completed") @php $file_url = $base_file_path . "/signed_documents/" . $package->package_id . "_" . $doc_details->template_id . ".pdf"; @endphp @else {{ $doc_details->title }} @endif @endforeach @endif
@empty
No signers found.
@endforelse
@endsection