{{-- resources/views/admin/properties/show.blade.php --}} @extends('admin.layouts.app') @section('title', $property->name) @section('page_title', $property->name) @section('breadcrumb') Properties → {{ $property->name }} @endsection @section('content') @php $owner = $property->users->firstWhere('is_property_owner', true); $application = $property->application; @endphp
{{-- Left column --}}
{{-- Property Details --}}
Property Details
{{ str_replace('_', ' ', $property->verification_status) }} {{ $property->subscription_status }}
@php $fields = [ 'Name' => $property->name, 'Slug' => $property->slug, 'Type' => ucfirst(str_replace('_', ' ', $property->type)), 'Email' => $property->email, 'Phone' => $property->phone, 'WhatsApp' => $property->phone_whatsapp, 'Website' => $property->website, 'Country' => $property->country, 'City' => $property->city, 'Province' => $property->province, 'Address' => collect([$property->address_line1, $property->address_line2]) ->filter()->implode(', '), ]; @endphp @foreach($fields as $label => $value)
{{ $label }}
@if($label === 'Website' && $value) {{ $value }} @else {{ $value ?: '—' }} @endif
@endforeach @if($property->description)
Description
{{ $property->description }}
@endif
{{-- Subscription --}}
Subscription
@csrf
@php $subFields = [ 'Utsanzi Customer ID' => $property->utsanzi_customer_id, 'Subscription ID' => $property->utsanzi_subscription_id, 'Plan' => $property->plan_slug ? strtoupper($property->plan_slug) : null, 'License Key' => $property->license_key, 'Status' => $property->subscription_status, 'Trial Ends' => $property->trial_ends_at ?->format('d M Y H:i'), 'Subscription Ends' => $property->subscription_ends_at ?->format('d M Y H:i'), 'Last Synced' => $property->plan_synced_at ?->diffForHumans(), ]; @endphp @foreach($subFields as $label => $value)
{{ $label }}
{{ $value ?? '—' }}
@endforeach
{{-- Staff Users --}}
Staff Users {{ $property->users->count() }} total
@if($property->users->isEmpty())

No users yet

@else
@foreach($property->users->sortByDesc('is_property_owner') as $user) @endforeach
Name Email Role Verified Last Login Status
{{ strtoupper(substr($user->name, 0, 1)) }}
{{ $user->name }}
@if($user->is_property_owner)
Owner
@endif
{{ $user->email }} {{ $user->account_type }} @if($user->email_verified_at) @else @endif {{ $user->last_login_at?->diffForHumans() ?? 'Never' }} @if($user->is_active) Active @else Inactive @endif
@endif
{{-- Property Photos --}} @if($property->images->count() > 0)
Photos {{ $property->images->count() }} uploaded
@foreach($property->images as $img) {{ $img->caption ?? 'Photo' }} @endforeach
@endif {{-- Application Documents --}} @if($application && $application->documents->count() > 0)
Verification Documents @if($application) Full Review → @endif
@foreach($application->documents as $doc)
@if(str_contains($doc->mime_type, 'pdf'))📄 @elseif(str_contains($doc->mime_type, 'image'))🖼️ @else📎@endif
{{ $doc->documentType?->name ?? 'Document' }}
{{ $doc->original_filename }} · {{ number_format($doc->file_size_bytes / 1024) }} KB
{{ $doc->review_status }}
@endforeach
@endif
{{-- Right column — Actions + Meta --}}
{{-- Actions --}}
Actions
@if($application) View Verification @endif @if($property->verification_status === 'approved' && $property->subscription_status !== 'suspended') {{-- Suspend --}} @endif @if($property->verification_status === 'suspended') {{-- Reactivate --}}
@csrf
@endif @if(!in_array($property->verification_status, ['deactivated']))
@csrf
@endif
{{-- Meta --}}
Meta
@php $meta = [ 'Created' => $property->created_at->format('d M Y H:i'), 'Last Updated' => $property->updated_at->diffForHumans(), 'Approved At' => $property->approved_at?->format('d M Y H:i') ?? '—', 'Suspended At' => $property->suspended_at?->format('d M Y H:i') ?? '—', 'Marketplace Listed' => $property->listed_on_marketplace ? 'Yes' : 'No', 'Marketplace Active' => $property->marketplace_listing_active ? 'Yes' : 'No', ]; @endphp @foreach($meta as $label => $value)
{{ $label }} {{ $value }}
@endforeach @if($property->suspension_reason)
Suspension Reason
{{ $property->suspension_reason }}
@endif
{{-- Application summary --}} @if($application)
Application {{ str_replace('_', ' ', $application->status) }}
@php $appMeta = [ 'Submitted' => $application->submitted_at?->format('d M Y H:i') ?? '—', 'Reviewed' => $application->reviewed_at?->format('d M Y H:i') ?? '—', 'Submissions' => $application->submission_count, 'Documents' => $application->documents->count(), 'Accepted Docs' => $application->documents->where('review_status','accepted')->count(), ]; @endphp @foreach($appMeta as $label => $value)
{{ $label }} {{ $value }}
@endforeach @if($application->rejection_reason)
Rejection Reason
{{ $application->rejection_reason }}
@endif
@endif
{{-- Suspend Modal --}} @endsection