{{ $proposal->title }}

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 {{ $proposal->client->company_name }} • {{ $proposal->reference_number }}

{{-- Proposal Information Section --}}
Current Status
{!! $proposal->getStatusIconAttribute() !!} {{ ucfirst($proposal->status) }}
Valid until {{ $proposal->valid_until ? $proposal->valid_until->format('M j, Y') : 'N/A' }}
Financial Summary
Amount: €{{ number_format($proposal->amount, 2) }}
Client Information
{{ $proposal->client->company_name }}
{{-- Conflict Analysis Section --}}

Conflict Analysis

Review Status

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

{{ $proposal->conflictReviews->count() > 0 ? round(($proposal->conflictReviews->where('status', '!=', 'pending')->count() / $proposal->conflictReviews->count()) * 100) : 0 }}% complete

{{-- Remove any duplicated/old form and all logic that disables fields or shows warnings based on conflict status --}} {{-- Only keep the always-editable form and the separate conflict management section --}} {{-- Remove any @if($isConflict) blocks and the yellow warning div --}}
{{-- Proposal form fields here (title, description, etc.) --}} {{-- ... existing form fields ... --}}
{{-- Conflict Management Section --}}

Conflict Management

Review Status

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

{{ $proposal->conflictReviews->count() > 0 ? round(($proposal->conflictReviews->where('status', '!=', 'pending')->count() / $proposal->conflictReviews->count()) * 100) : 0 }}% complete

Individual Lawyer Reviews

@foreach($proposal->conflictReviews as $review)
{{ $review->lawyer->name }}

{{ $review->lawyer->email }}

{{ $review->getStatusLabel() }}
@if($review->conflict_details)
Conflict Details:

{{ $review->conflict_details }}

@endif @if($review->notes)
Notes:

{{ $review->notes }}

@endif @if($review->reviewed_at)

Reviewed on {{ $review->reviewed_at->format('M j, Y \\a\\t g:i A') }}

@endif
@endforeach
[DEBUG] Current status: {{ $status }}

Proposal Details

@error('amount')

{{ $message }}

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

{{ $message }}

@enderror
{{-- Conflict Analysis Section --}}

Conflict Analysis

Review Status

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

{{ $proposal->conflictReviews->count() > 0 ? round(($proposal->conflictReviews->where('status', '!=', 'pending')->count() / $proposal->conflictReviews->count()) * 100) : 0 }}% complete

Individual Lawyer Reviews

@foreach($proposal->conflictReviews as $review)
{{ $review->lawyer->name }}

{{ $review->lawyer->email }}

{{ $review->getStatusLabel() }}
@if($review->conflict_details)
Conflict Details:

{{ $review->conflict_details }}

@endif @if($review->notes)
Notes:

{{ $review->notes }}

@endif @if($review->reviewed_at)

Reviewed on {{ $review->reviewed_at->format('M j, Y \a\t g:i A') }}

@endif
@endforeach

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)

Current Files ({{ count($proposal->attachments) }})

Storage Location:

{{ $proposal->getOrganizedFolderPath() }}

@foreach($proposal->attachments as $attachment)

{{ $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'])->format('M j, Y g:i A') }} @endif

@if(isset($attachment['id'])) Open @endif
@endforeach
@endif

PNG, JPG, PDF up to 10MB

@error('uploadFile')

{{ $message }}

@enderror

Internal Notes

@error('internal_notes')

{{ $message }}

@enderror

Interactions for this Proposal

@php $interactions = $this->interactions->take(10); @endphp @if($interactions->count() > 0)
@foreach($interactions as $interaction)
{{ ucfirst($interaction->type) }} {{ $interaction->interaction_date ? \Carbon\Carbon::parse($interaction->interaction_date)->format('M j, Y H:i') : '' }}
{{ $interaction->subject }}
By {{ $interaction->user->name ?? 'Unknown' }}
@if($interaction->description)
{{ $interaction->description }}
@endif
@endforeach
@else

No interactions found

All interactions for this proposal will appear here.

@endif
@if($showInteractionModal)

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

@error('interaction_subject') {{ $message }} @enderror
@error('interaction_date') {{ $message }} @enderror
@endif
@if (session()->has('success')) @endif @if (session()->has('error')) @endif