@extends('layouts.dashboard.inface', ['section' => 'properties']) @section('content') @php $development = $property->development ?? $property->developmentUnitModel?->development; $model = $property->developmentUnitModel?->unitModel ?? $property->unitModel; $address = $property->address ?? $development?->address; $status = [ 'available' => ['Disponible', 'bg-emerald-100 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300'], 'reserved' => ['Apartada', 'bg-amber-100 text-amber-700 dark:bg-amber-500/10 dark:text-amber-300'], 'sold' => ['Vendida', 'bg-blue-100 text-blue-700 dark:bg-blue-500/10 dark:text-blue-300'], 'rented' => ['Rentada', 'bg-violet-100 text-violet-700 dark:bg-violet-500/10 dark:text-violet-300'], 'unavailable' => ['No disponible', 'bg-slate-200 text-slate-700 dark:bg-slate-700 dark:text-slate-200'], ][$property->status] ?? [ucfirst((string) $property->status), 'bg-slate-100 text-slate-600']; $specifications = collect([ ['Niveles', $property->levels, 'stairs'], ['Recámaras', $property->bedrooms, 'bed'], ['Baños completos', $property->full_bathrooms, 'bathtub'], ['Medios baños', $property->half_bathrooms, 'wash'], ['Estacionamientos', $property->parking_spaces, 'directions_car'], ['Construcción', $property->built_area_sqm !== null ? number_format($property->built_area_sqm, 2) . ' m²' : null, 'square_foot'], ['Terreno', $property->lot_area_sqm !== null ? number_format($property->lot_area_sqm, 2) . ' m²' : null, 'landscape'], ['Frente', $property->front_meters !== null ? number_format($property->front_meters, 2) . ' m' : null, 'straighten'], ['Fondo', $property->depth_meters !== null ? number_format($property->depth_meters, 2) . ' m' : null, 'straighten'], ])->filter(fn ($specification) => $specification[1] !== null); $addressText = $address ? collect([ $address->street, $address->neighborhood, $address->city?->name, $address->city?->state?->name ?? $address->state?->name, $address->zip_code, $address->country?->name, ])->filter()->join(', ') : null; $mapsQuery = $address?->lat !== null && $address?->lng !== null ? $address->lat . ',' . $address->lng : $addressText; @endphp
@if (session('success'))
{{ session('success') }}
@endif

{{ $property->name }}

{{ $status[0] }}

{{ $property->realEstateAgency?->name }} @if ($model) · {{ $model->name }} @endif @if ($property->unitType) · {{ $property->unitType->name }} @endif

@if ($property->images->isNotEmpty())
{{ $property->images->first()->title ?: $property->name }} {{ $property->images->count() }} {{ $property->images->count() === 1 ? 'imagen' : 'imágenes' }}
@else
home_work

Esta propiedad todavía no tiene imágenes.

@endif

Descripción

{{ $property->description ?: 'Sin descripción capturada.' }}

@if ($specifications->isNotEmpty())

Características

@foreach ($specifications as [$label, $value, $icon])
{{ $icon }}

{{ $label }}

{{ $value }}

@endforeach
@endif @if ($property->amenities->isNotEmpty())

Amenidades

@foreach ($property->amenities as $amenity) {{ $amenity->icon_key ?: 'check_circle' }} {{ $amenity->name }} @endforeach
@endif

Ubicación

{{ $addressText ?: 'Sin dirección capturada.' }}

@if (! $property->address && $development?->address)

Se muestra la dirección del fraccionamiento.

@endif
@if ($mapsQuery) open_in_new Ver en Google Maps @endif
@endsection