@extends('layouts.app') @push('styles') @endpush @section('content')
| ID | بيانات العقار الأساسية | حالة العرض | توزيع الوحدات المتوفرة | نسبة الإنجاز | الإجراءات |
|---|---|---|---|---|---|
| #{{ $property->id }} |
{{ $property->title }}
{{ $property->city->name ?? 'غير محدد' }}
|
{{ $property->created_on }}
|
@if($property->show_in_home == 1) نشط @else غير نشط @endif |
@php
$unitsList = $property->units_for_view ?? collect();
@endphp
@forelse($unitsList as $unit)
@php
$unitName = isset($unit->name) ? $unit->name : ($unit->unitType->name ?? 'وحدة');
$unitTotal = isset($unit->total_quantity) ? $unit->total_quantity : 0;
@endphp
{{ $unitName }}: {{ $unitTotal }}
@empty
لا توجد وحدات مفصلة
@endforelse
|
@php
if ($category === 'resorts') {
$total = (int)($property->aggregated_total_units_count ?? 0);
$disp = (int)($property->aggregated_displayed_units_count ?? 0);
} else {
$total = (int)($property->total_units_count ?? 0);
$disp = (int)($property->displayed_units_count ?? 0);
}
$perc = $total > 0 ? ($disp / $total) * 100 : 0;
@endphp
اكتمال البيانات:
{{ round($perc) }}%
|
إدارة الوحدات |