{{ $proposal->title }} {!! $this->getStatusIconForCurrentStatus() !!} {{ $this->getStatusLabelForCurrentStatus() }}

Total: €{{ number_format($proposal->total_amount_with_matters, 2) }} • {{ $proposal->items ? $proposal->items->where('matter_id', null)->count() : 0 }} items
Created: {{ $proposal->created_at->format('M j, Y g:i A') }}
@if($proposal->proposal_date)
Proposed: {{ \Carbon\Carbon::parse($proposal->proposal_date)->format('M j, Y') }}
@endif
Last Updated: {{ $proposal->updated_at->format('M j, Y g:i A') }}

Proposal for @if($proposal->client) {{ $proposal->client->company_name }} @else No Client @endif • {{ $proposal->proposal_id }}

@if(auth()->user()->hasPermission('clients.update') && $proposal->client) KYC @endif

{{-- Proposal Information Section --}}
@if($status !== 'conflict_analyse')

Proposal Details

@foreach($departments as $key => $label) @endforeach
@error('selectedDepartments')

{{ $message }}

@enderror

Basic Information

@error('title')

{{ $message }}

@enderror
@error('client_id')

{{ $message }}

@enderror
@error('description')

{{ $message }}

@enderror
@error('proposal_date')

{{ $message }}

@enderror
@error('valid_until')

{{ $message }}

@enderror

Attachments

@if($proposal->attachments && count($proposal->attachments) > 0)
{{ count($proposal->attachments) }} attachment(s) found
@foreach($proposal->attachments as $attachment)
@php $fileExtension = strtolower(pathinfo($attachment['original_name'] ?? '', PATHINFO_EXTENSION)); $iconClass = 'text-gray-400'; $iconPath = 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'; if (in_array($fileExtension, ['pdf'])) { $iconClass = 'text-red-500'; $iconPath = 'M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z'; } elseif (in_array($fileExtension, ['doc', 'docx'])) { $iconClass = 'text-blue-500'; $iconPath = 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'; } elseif (in_array($fileExtension, ['jpg', 'jpeg', 'png', 'gif'])) { $iconClass = 'text-green-500'; $iconPath = 'M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'; } elseif (in_array($fileExtension, ['xls', 'xlsx'])) { $iconClass = 'text-green-600'; $iconPath = 'M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'; } @endphp

{{ $attachment['original_name'] ?? $attachment['name'] ?? 'Unknown file' }}

@if(isset($attachment['size'])) {{ number_format($attachment['size'] / 1024, 1) }} KB @endif @if(isset($attachment['uploaded_at'])) • {{ \Carbon\Carbon::parse($attachment['uploaded_at'])->diffForHumans() }} @endif
@if(isset($attachment['id'])) Open @endif
@endforeach
@else

No attachments yet

Upload documents, images, or other files to share with your client

@endif

Drop files here or

Maximum file size: 10MB

@error('uploadFile')

{{ $message }}

@enderror

Counterparty

@if($counterpartySearch) @endif
@if($counterpartySearch || !$showClients || !$showContacts)
Found {{ $counterparties->count() }} counterparties
@endif
@error('counterparty_id')

{{ $message }}

@enderror
@if($proposal->counterparty)

Current Counterparty

{{ $proposal->counterparty->name ?? $proposal->counterparty->company_name ?? 'Unknown' }}

{{ class_basename($proposal->counterparty_type) }}

@if($proposal->counterparty_type === 'App\Models\Contact')

{{ $proposal->counterparty->company ?? 'No company' }}

@endif
@else

No Counterparty Selected

Select a counterparty from the dropdown above

@endif

Interactions

{{-- Interactions Table (Paginated & Sortable) --}} @php $paginated = $this->paginatedInteractions; @endphp
@foreach($paginated as $loopIndex => $interaction) @endforeach
Title Description Date @if($this->interactionsSortField === 'interaction_date') {{ $this->interactionsSortDirection === 'asc' ? '↑' : '↓' }} @endif Type User @if($this->interactionsSortField === 'user_id') {{ $this->interactionsSortDirection === 'asc' ? '↑' : '↓' }} @endif
{{ Str::limit($interaction->description, 100) }} {{ $interaction->interaction_date ? \Carbon\Carbon::parse($interaction->interaction_date)->format('Y-m-d H:i') : '' }} {{ ucfirst($interaction->type) }} {{ $interaction->user->name ?? 'admin' }}

Proposal Items

@if($allItemsAndMatters && $allItemsAndMatters->count() > 0)
@foreach($allItemsAndMatters as $entry) @if($entry['type'] === 'item') @php $item = $entry['data']; @endphp

{{ $item->title }}

{{ $item->status_label }} @if($item->matter_id) Converted to Matter @endif
@if($item->description)

{{ $item->description }}

@endif
€{{ number_format($item->cost, 2) }} @if($item->matter) Matter: {{ $item->matter->matter_id }} @endif
@if($item->canBeConvertedToMatter()) @endif @if($item->status === 'pending') @elseif($item->status === 'approved') ✓ Approved @elseif($item->status === 'rejected') ✗ Rejected @endif
@elseif($entry['type'] === 'matter') @php $matter = $entry['data']; @endphp

{{ $matter->subject }}

{{ ucfirst($matter->status) }} Matter
@if($matter->description)

{{ $matter->description }}

@endif
@if($matter->budget) €{{ number_format($matter->budget, 2) }} @endif Matter: {{ $matter->matter_id }}
@endif @endforeach
Total Amount: €{{ number_format($totalAmount, 2) }}
@else

No items

Get started by adding a proposal item.

@endif
@endif

Proposal Information

Conflict Review Status

{{ $proposal->conflictReviews->first() ? $proposal->conflictReviews->first()->getStatusLabel() : 'No Conflict Review' }}
{{ $proposal->conflictReviews->where('status', '!=', 'pending')->count() }}/{{ $proposal->conflictReviews->count() }} lawyers reviewed
view conflict status

Client KYC Status

@if(auth()->user()->hasPermission('clients.update')) Manage KYC @endif
@php $latestKycProcess = $proposal->client->kycProcesses()->latest()->first(); $kycStatusColors = [ 'draft' => 'bg-gray-100 text-gray-800', 'sent' => 'bg-blue-100 text-blue-800', 'opened' => 'bg-yellow-100 text-yellow-800', 'completed' => 'bg-orange-100 text-orange-800', 'approved' => 'bg-green-100 text-green-800', 'rejected' => 'bg-red-100 text-red-800', 'expired' => 'bg-red-100 text-red-800', ]; $kycStatusIcons = [ 'draft' => '📝', 'sent' => '📤', 'opened' => '👁️', 'completed' => '✅', 'approved' => '🟢', 'rejected' => '❌', 'expired' => '⏰', ]; @endphp @if($latestKycProcess)
{{ $kycStatusIcons[$latestKycProcess->status] ?? '📋' }} {{ ucfirst($latestKycProcess->status) }}
@if($latestKycProcess->status === 'approved')
Approved {{ $latestKycProcess->approved_at ? $latestKycProcess->approved_at->diffForHumans() : '' }}
@elseif($latestKycProcess->status === 'expired')
Expired {{ $latestKycProcess->status === 'expired' ? $latestKycProcess->expires_at ? $latestKycProcess->expires_at->diffForHumans() : '' : '' }}
@endif
KYC #{{ $latestKycProcess->kyc_number }} • {{ ucfirst($latestKycProcess->type) }}
{{ $latestKycProcess->sent_at ? 'Sent ' . $latestKycProcess->sent_at->diffForHumans() : 'Not sent' }}
@else
📋 No KYC Process
No KYC process initiated for this client
@endif
@if($proposal->valid_until)

Validity

Valid until {{ $proposal->valid_until->format('M j, Y') }}
@endif
@if (session()->has('success')) @endif @if (session()->has('error')) @endif @if($showItemModal)

{{ $editingItemId ? 'Edit Item' : 'Add Item' }}

@if(!$editingItemId)

Create a proposal item with optional matter creation

@endif
@error('item_title')

{{ $message }}

@enderror
@error('item_description')

{{ $message }}

@enderror
@error('item_cost')

{{ $message }}

@enderror
@error('item_status')

{{ $message }}

@enderror
@if(!$editingItemId)

Create Matter (Optional)

@if($create_matter)
@error('matter_title')

{{ $message }}

@enderror
@error('matter_description')

{{ $message }}

@enderror
@error('matter_budget')

{{ $message }}

@enderror
@error('matter_estimate')

{{ $message }}

@enderror
@endif
@endif
@endif @if($showMatterModal)

Edit Matter

@error('matter_edit_subject')

{{ $message }}

@enderror
@error('matter_edit_description')

{{ $message }}

@enderror
@error('matter_edit_budget')

{{ $message }}

@enderror
@error('matter_edit_estimate')

{{ $message }}

@enderror
@error('matter_edit_status')

{{ $message }}

@enderror
@endif @if($showInteractionModal)

{{ $editingInteractionId ? 'Edit Interaction' : 'Add Interaction' }}

@error('interaction_subject') {{ $message }} @enderror
@error('interaction_date') {{ $message }} @enderror
@endif