{{-- resources/views/admin/verification/show.blade.php --}} @extends('admin.layouts.app') @section('title', 'Review Application') @section('page_title', 'Review Application') @section('breadcrumb') Verification → {{ $application->property->name }} @endsection @section('content') @php $property = $application->property; $owner = $property->users()->where('is_property_owner', true)->first(); @endphp
{{-- Left Column --}}
{{-- Property Details --}}
Property Details {{ str_replace('_', ' ', $application->status) }}
Property Name
{{ $property->name }}
Type
{{ ucfirst(str_replace('_', ' ', $property->type)) }}
Location
{{ $property->city }}, {{ $property->province }}
{{ $property->address_line1 }} @if($property->address_line2) , {{ $property->address_line2 }} @endif
Country
{{ $property->country }}
Phone
{{ $property->phone ?? '—' }}
Email
{{ $property->email ?? '—' }}
Website
@if($property->website) {{ $property->website }} @else — @endif
Selected Plan
@if($application->selected_plan_slug) {{ strtoupper($application->selected_plan_slug) }} @else Not selected @endif
@if($property->description)
Description
{{ $property->description }}
@endif
{{-- Owner Details --}}
Property Owner
Name
{{ $owner?->name ?? '—' }}
Phone
{{ $owner?->phone ?? '—' }}
Registered
{{ $owner?->created_at?->format('d M Y') ?? '—' }}
Email Verified
@if($owner?->email_verified_at) ✓ Verified {{ $owner->email_verified_at->format('d M Y') }} @else ✕ Not verified @endif
Submissions
{{ $application->submission_count }} {{ Str::plural('time', $application->submission_count) }}
{{-- Documents --}}
Verification Documents {{ $application->documents->count() }} uploaded
@if($application->documents->isEmpty())

No documents uploaded

@else
@foreach($application->documents as $doc)
{{-- File icon --}}
@if(str_contains($doc->mime_type, 'pdf')) 📄 @elseif(str_contains($doc->mime_type, 'image')) 🖼️ @else 📎 @endif
{{-- Doc info --}}
{{ $doc->documentType?->name ?? 'Document' }}
{{ $doc->original_filename }} · {{ number_format($doc->file_size_bytes / 1024, 0) }} KB
{{-- Status --}} {{ $doc->review_status }} {{-- Actions --}}
View @if($doc->review_status !== 'accepted')
@csrf @method('PUT')
@endif @if($doc->review_status !== 'rejected')
@csrf @method('PUT')
@endif
@endforeach
@endif
{{-- Property Photos --}} @php $photos = $property->images; @endphp @if($photos->count() > 0)
Property Photos {{ $photos->count() }} photos
@foreach($photos as $photo) Photo @endforeach
@endif {{-- Status History --}} @if($application->statusLogs->count() > 0)
Status History
@foreach($application->statusLogs as $log)
{{ $log->from_status ?? 'start' }} {{ $log->to_status }} by {{ $log->changed_by_type }}
@if($log->notes)
{{ $log->notes }}
@endif
{{ $log->changed_at->format('d M Y H:i') }}
@endforeach
@endif
{{-- Right Column — Actions --}}
{{-- Decision --}} @if(in_array($application->status, ['pending_review', 'pending_resubmit', 'info_requested']))
Make Decision
{{-- Approve --}}
@csrf

{{-- Request Info --}}
@csrf
@error('message')
{{ $message }}
@enderror

{{-- Reject --}}
@csrf
@error('reason')
{{ $message }}
@enderror
@else {{-- Already decided --}}
@if($application->status === 'approved')

Approved

{{ $application->reviewed_at?->format('d M Y H:i') }}

View Property → @elseif($application->status === 'rejected')

Rejected

{{ $application->rejection_reason }}

@endif
@endif {{-- Admin Notes --}}
Internal Notes
{{-- Existing notes --}} @if($application->notes->count() > 0)
@foreach($application->notes->sortByDesc('created_at') as $note)
{{ $note->note }}
Admin #{{ $note->written_by }} {{ $note->created_at->diffForHumans() }}
@if($note->is_visible_to_property) Visible to property @endif
@endforeach
@endif {{-- Add note --}}
@csrf
{{-- Application Checklist --}}
Checklist
@php $checks = [ ['label' => 'Property details complete', 'pass' => $application->step2_complete], ['label' => 'Documents uploaded', 'pass' => $application->step3_complete], ['label' => 'Photos uploaded', 'pass' => $property->images->count() > 0], ['label' => 'Plan selected', 'pass' => !empty($application->selected_plan_slug)], ['label' => 'Email verified', 'pass' => !empty($owner?->email_verified_at)], ['label' => 'All documents accepted', 'pass' => $application->documents->count() > 0 && $application->documents->every( fn($d) => $d->review_status === 'accepted' )], ]; @endphp @foreach($checks as $check)
@if($check['pass']) @else @endif {{ $check['label'] }}
@endforeach
{{-- Info Requests --}} @if($application->infoRequests->count() > 0)
Information Requests
@foreach($application->infoRequests->sortByDesc('created_at') as $req)
{{ $req->message }}
{{ $req->responded_at ? '✓ Responded ' . $req->responded_at->diffForHumans() : '⏳ Awaiting response' }} {{ $req->created_at->format('d M Y') }}
@endforeach
@endif
@endsection