@extends('layouts.master') @section('title') {{ __('realestate.property_details') }} @endsection @section('content')
{{ __('realestate.property_details') }}

{{ __('realestate.unit_type') }}: {{ __('realestate.unit_types_list')[$property->property_category] ?? $property->property_category }}

{{ __('realestate.name') }}: {{ $property->name }}

{{ __('realestate.status') ?? 'الحالة' }}: {{ $property->status }}

{{ __('realestate.address') }}: {{ $property->address ?? '-' }}

{{ __('realestate.city') }}: {{ $property->city }}

{{ __('realestate.district') }}: {{ $property->district ?? '-' }}

{{ __('realestate.product_notes') }}: {{ $property->description ?? '-' }}

{{ __('realestate.owner_name') }}

{{ __('realestate.owner_name') }}: {{ optional($property->owner)->name ?? '-' }}

{{ __('realestate.owner_id_number') }}: {{ $property->owner_id_number ?? '-' }}

{{ __('realestate.owner_nationality') }}: {{ $property->owner_nationality ?? '-' }}

{{ __('realestate.owner_phone') }}: {{ $property->owner_phone ?? '-' }}

{{ __('realestate.owner_landline') }}: {{ $property->owner_landline ?? '-' }}

{{ __('realestate.owner_address') }}: {{ $property->owner_address ?? '-' }}

{{ __('realestate.owner_email') }}: {{ $property->owner_email ?? '-' }}

{{ __('realestate.financial_and_regulatory_data') }}

{{ __('realestate.bank_name') }}: {{ $property->bank_name ?? '-' }}

{{ __('realestate.account_number') }}: {{ $property->account_number ?? '-' }}

{{ __('realestate.iban') }}: {{ $property->iban ?? '-' }}

{{ __('realestate.commission_rate') }}: {{ $property->commission_rate ?? '-' }}%

{{ __('realestate.insurance_account') }}: {{ $property->insurance_account ?? '-' }}

{{ __('realestate.water_account') }}: {{ $property->water_account ?? '-' }}


{{ __('realestate.media') }}
@if(isset($property->media) && count($property->media) > 0) @foreach($property->media as $media)
@if(preg_match('/\.(jpg|jpeg|png|gif)$/i', $media->file_path)) @else @endif
@endforeach @else

{{ __('realestate.no_attachments') }}

@endif

{{ __('realestate.units') }}
{{ __('realestate.add_unit') }}
@forelse($property->units ?? [] as $unit) @php // جلب العقد النشط والمستأجر المرتبط بالوحدة $activeContract = ($unit->is_rented == 1 || $unit->status == 'rented') ? $unit->activeContract()->with('tenant')->first() : null; $tenantName = optional(optional($activeContract)->tenant)->name ?? '-'; @endphp @empty @endforelse
{{ __('realestate.unit_number') }} اسم المستأجر الحالي {{ __('realestate.annual_rent') }} {{ __('realestate.electricity_meter') }} {{ __('realestate.water_meter') }} {{ __('realestate.ac_count') }} {{ __('realestate.status') }} {{ __('realestate.attachments') }} {{ __('realestate.actions') }}
{{ $unit->unit_name ?? $unit->unit_number }} {{ $tenantName }} {{ number_format($unit->annual_rent, 2) }} {{ $unit->electricity_meter ?? '-' }} {{ $unit->water_meter ?? '-' }} {{ $unit->ac_count ?? 0 }} {{ $unit->is_rented == 1 ? __('realestate.rented') : __('realestate.vacant') }} @if($unit->images && count($unit->images) > 0) @else - @endif
{{ __('realestate.no_units') }}
@foreach($property->units ?? [] as $unit) @if($unit->images && count($unit->images) > 0) @endif @endforeach @endsection