@props([ 'building', 'owners', 'buildingMapEmbedUrl' => null, 'buildingMapImageUrl' => null, 'showInteractiveMap' => false, 'floors', 'units', 'firstUnitOwnerNames' => [], 'firstUnitUserNames' => [], 'unitUsersCount' => [], 'unitUsersDependentsCount' => [], 'histories', 'showPrintButton' => false, 'isPrint' => false, 'showFloors' => true, 'showHistories' => true, ]) @php $ownerTypeLabels = [ 'building_owner' => 'مالك المبنى', 'unit_owner' => 'مالك وحدة', 'unit_user' => 'مستخدم وحدة', ]; $formatArea = static function (mixed $value, bool $isPrint): string { if ($value === null || trim((string) $value) === '') { return '-'; } $formatted = number_format((float) $value, $isPrint ? 0 : 2); return $isPrint ? $formatted.' متر مربع' : $formatted; }; $showInteractiveMapCard = $showInteractiveMap && is_string($buildingMapEmbedUrl) && $buildingMapEmbedUrl !== ''; $showImageMapCard = is_string($buildingMapImageUrl) && $buildingMapImageUrl !== ''; $showIframeMapCard = ! $showInteractiveMap && is_string($buildingMapEmbedUrl) && $buildingMapEmbedUrl !== ''; $hasAnyMapCard = $showInteractiveMapCard || $showImageMapCard || $showIframeMapCard; $showCompactOwnerCardsInPrint = $isPrint && $owners->count() <= 4; $northArrowImageUrl = asset('assets/images/map-north-arrow-transparent.png'); @endphp
@if(! $isPrint) @if($showInteractiveMapCard) @elseif($showImageMapCard) @elseif($showIframeMapCard) @endif @endif
@if($isPrint) @if($showCompactOwnerCardsInPrint) @else @if($hasAnyMapCard) @if($showInteractiveMapCard) @elseif($showImageMapCard) @elseif($showIframeMapCard) @endif @endif @endif @else @endif @if($showFloors) @endif @if(! $isPrint && $showHistories) @endif @if($showPrintButton)
طباعة تعديل
@endif