@extends('layouts.admin') @section('title', 'Property Details') @section('content') @php $canManage = auth()->user()?->hasPermission('properties', 'manage'); $canApprove = auth()->user()?->hasPermission('properties', 'approve'); $meta = $property->meta ?? []; $imageCollection = collect($meta['images'] ?? []); if (! empty($meta['banner_image'])) { $imageCollection = $imageCollection->prepend($meta['banner_image']); } $adminGallery = $imageCollection->filter()->unique()->values(); $propertyComments = $property->relationLoaded('comments') ? $property->comments : collect(); $propertyLeads = $property->relationLoaded('leads') ? $property->leads : collect(); @endphp

Property Details & Review

Moderate listing details, comments, and interested leads

{{ ucfirst(str_replace('_', ' ', $property->status)) }}
Property Details
Title: {{ $property->title }}
Service: {{ $property->service?->title }}
Customer: {{ $property->user?->name ?? 'Admin' }}
Customer Mobile: {{ $property->user?->mobile ?? '-' }}
Location: {{ $property->location }}
Price: {{ $property->price }}
Status: {{ ucfirst(str_replace('_', ' ', $property->status)) }}
Featured: {{ $property->is_featured ? 'Yes' : 'No' }}
Description:
{{!! $property->description ?: '-' }}

Property Specific
Type: {{ ucfirst($property->meta['property_type'] ?? '-') }}
Purpose: {{ ucfirst($property->meta['listing_purpose'] ?? '-') }}
BHK: {{ $property->meta['bhk'] ?? '-' }}
Area: {{ $property->meta['area_sqft'] ?? '-' }} sqft
Furnishing: {{ ucfirst(str_replace('_', ' ', $property->meta['furnishing'] ?? '-')) }}
Bathrooms: {{ $property->meta['bathrooms'] ?? '-' }}
Parking: {{ $property->meta['parking'] ?? '-' }}
Facing: {{ isset($property->meta['facing']) ? ucwords(str_replace('_', ' ', (string) $property->meta['facing'])) : '-' }}

Address Details
Address Line 1: {{ $property->meta['address_line_1'] ?? '-' }}
Address Line 2: {{ $property->meta['address_line_2'] ?? '-' }}
Country: {{ $property->meta['country_name'] ?? '-' }}
State: {{ $property->meta['state_name'] ?? '-' }}
City: {{ $property->meta['city_name'] ?? '-' }}
Area: {{ $property->meta['area_name'] ?? '-' }}
Pincode: {{ $property->meta['pincode'] ?? '-' }}
Landmark: {{ $property->meta['landmark'] ?? '-' }}
Latitude: {{ $property->meta['latitude'] ?? '-' }}
Longitude: {{ $property->meta['longitude'] ?? '-' }}
Google Map: @if(!empty($property->meta['latitude']) && !empty($property->meta['longitude'])) View @else - @endif
Property Images
@if($adminGallery->count()) {{ $adminGallery->count() }} Photo{{ $adminGallery->count() > 1 ? 's' : '' }} @endif
@if($adminGallery->isNotEmpty()) @php $gallery = $adminGallery->values(); $hero = $gallery->first(); $thumbs = $gallery->slice(1, 4)->values(); $extraCount = max(0, $gallery->count() - 5); @endphp @if($thumbs->isNotEmpty()) @endif @else

No property images uploaded yet.

@endif
@php $status = (string) $property->status; $statusMap = [ 'under_review' => ['label' => 'Under Review', 'class' => 'warning', 'icon' => 'bi-hourglass-split'], 'approved' => ['label' => 'Approved', 'class' => 'success', 'icon' => 'bi-check-circle-fill'], 'rejected' => ['label' => 'Rejected', 'class' => 'danger', 'icon' => 'bi-x-circle-fill'], ]; $statusInfo = $statusMap[$status] ?? ['label' => ucfirst(str_replace('_', ' ', $status)), 'class' => 'secondary', 'icon' => 'bi-dot']; @endphp
Moderation Actions
{{ $statusInfo['label'] }}
@if($canApprove && $status !== 'approved')
@csrf
@endif @if($canApprove && $status !== 'rejected')
@csrf
@endif @if($canManage) Edit @endif @if($canManage)
@csrf @method('DELETE')
@endif Back
@if($status === 'approved' && ($canApprove || $canManage))

This property is live on the site. Use Revoke to move it back to rejected, or Edit to update details.

@elseif($status === 'rejected' && ($canApprove || $canManage))

Rejected listings are hidden from customers. Leave a comment explaining what to fix, then resubmit/approve when ready.

@endif @if($canManage)
Ask for Changes / Comment
@csrf
@endif
Comments Timeline
@forelse($propertyComments as $comment)
{{ $comment->user?->name ?? 'Admin' }} · {{ $comment->created_at?->format('d M Y h:i A') }}
{{ $comment->comment }}
@empty

No comments yet.

@endforelse
Interested Leads
@forelse($propertyLeads as $lead)
Name: {{ $lead->name }}
Mobile: {{ $lead->mobile }}
Status: {{ ucfirst(str_replace('_', ' ', $lead->status)) }}
Created At: {{ $lead->created_at?->format('d M Y h:i A') }}
Message: {{ $lead->message ?: '-' }}
@empty

No interested leads yet.

@endforelse
@endsection