@extends('layouts.app') @section('styles') @endsection @section('content') @if(Auth::check())
@csrf @method('PUT')
{{ __('site.header.regional_delegation') }}: @php $deleg = $delegations->where('id_delegation', $immobilier->delegation_id ?? '')->first(); @endphp {{ $deleg ? trans_field($deleg, 'nom') : __('site.not_specified') }}

{{ __('site.investment.form_title_salle') }}

{{ __('site.investment.view_request') }}

{{ __('site.download_pdf') ?? 'تحميل PDF' }}
{{ __('site.current_status_label') }}
@php $locale = app()->getLocale(); $statusLabel = trans_field($immobilier->statut, 'statut') ?? $immobilier->statut?->{"statut_{$locale}"} ?? ($immobilier->statut?->statut_en ?? __('site.status_pending')); @endphp {{ $statusLabel }}
@php // prefer the model's comment; otherwise use the most recent matching history comment $modelComment = $immobilier->commentaire_motif ?? null; $currentComment = !empty($modelComment) ? $modelComment : ($relevantHistory->commentaire ?? null); $commentFromHistory = empty($modelComment) && isset($relevantHistory) && !empty($relevantHistory->commentaire); $historyAuthor = $relevantHistory->changer->name ?? $relevantHistory->changed_by ?? null; $historyAt = isset($relevantHistory->created_at) ? $relevantHistory->created_at->format('Y-m-d H:i') : null; @endphp @if(!empty($currentComment))

{{ __('site.start_activity.current_comment') }}

{{ $currentComment }}

@if($commentFromHistory && ($historyAuthor || $historyAt)) @if($historyAuthor) {{ $historyAuthor }} @endif @if($historyAuthor && $historyAt) — @endif @if($historyAt) {{ $historyAt }} @endif @endif @endif

{{ __('site.investment.form.identity.title') }}

{{ $immobilier->utilisateur->nom_prenom ?? __('site.not_specified') }}
@php $typeId = $typesIdentite->where('id_type', $immobilier->utilisateur->id_type_identite ?? '')->first(); @endphp {{ $typeId ? trans_field($typeId, 'type') : __('site.not_specified') }}
@if($immobilier->utilisateur->cin) {{ __('site.investment.form.label.cin') }}: {{ $immobilier->utilisateur->cin }} @elseif($immobilier->utilisateur->passport) {{ __('site.investment.form.label.passport') }}: {{ $immobilier->utilisateur->passport }} @elseif($immobilier->utilisateur->num_fiscal) {{ __('site.investment.form.label.fiscal_id') }}: {{ $immobilier->utilisateur->num_fiscal }} @else {{ __('site.not_specified') }} @endif
{{ $immobilier->utilisateur->tel ?? __('site.not_specified') }}
{{ $immobilier->utilisateur->email ?? __('site.not_specified') }}
{{ $immobilier->utilisateur->adresse ?? __('site.not_specified') }}

{{ __('site.investment.form.property.title') }}

{{ $immobilier->adresse_imm ?? __('site.not_specified') }}
@php $gouv = $gouvernorats->where('id_gouver', $immobilier->gouvernorat_id ?? '')->first(); @endphp {{ $gouv ? trans_field($gouv, 'nom') : __('site.not_specified') }}
@php $deleg2 = $delegations->where('id_delegation', $immobilier->delegation_id ?? '')->first(); @endphp {{ $deleg2 ? trans_field($deleg2, 'nom') : __('site.not_specified') }}
@php $typeImm = $typesImmobilier->where('id_type', $immobilier->type_imm_id ?? '')->first(); @endphp {{ $typeImm ? trans_field($typeImm, 'type') : __('site.not_specified') }}
{{ $immobilier->superfici_m2 ? $immobilier->superfici_m2.' '. __('site.unit.surface') : __('site.not_specified') }}
@php $usage = $usagesImmobilier->where('id_usage_imm', $immobilier->usage_id ?? '')->first(); @endphp {{ $usage ? trans_field($usage, 'usage') : __('site.not_specified') }}
@if($immobilier->document_propriete) {{ __('site.view_file') }} @else {{ __('site.not_specified') }} @endif

{{ __('site.investment.form.components.title') }}

@php $components = [ 'salle_exercice' => __('site.investment.form.components.exercise_hall'), 'piscine' => __('site.investment.form.components.pool'), 'vestiaire' => __('site.investment.form.components.changing_rooms'), 'unitaires_sanitaire' => __('site.investment.form.components.sanitary_units'), 'stockage_conservation' => __('site.investment.form.components.storage_space'), 'espace_exterieur' => __('site.investment.form.components.outdoor_space'), 'garage' => __('site.investment.form.components.garage') ]; @endphp @foreach($components as $comp => $label) {{-- component --}} {{-- yes / no --}} {{-- count --}} {{-- surface --}} @endforeach
{{ __('site.investment.form.components.component_label') ?? __('site.component') }} {{ __('site.yes_no') ?? __('site.yes_no_default') }} {{ __('site.investment.form.label.count') }} {{ __('site.investment.form.label.surface') }}
{{ $label }} @if($immobilier->$comp == 1) {{ __('site.yes') }} @elseif($immobilier->$comp == 0) {{ __('site.no') }} @else {{ __('site.not_specified') }} @endif @if($immobilier->$comp == 1) @if(in_array($comp, ['salle_exercice','piscine','vestiaire'])) {{ $immobilier->{'nbr_'.$comp} ?? __('site.not_specified') }} @else {{ __('site.not_specified') }} @endif @else {{ __('site.not_specified') }} @endif @if($immobilier->$comp == 1) {{ $immobilier->{'superface_'.$comp} ? $immobilier->{'superface_'.$comp} . ' ' . __('site.unit.surface') : __('site.not_specified') }} @else {{ __('site.not_specified') }} @endif
{{ $immobilier->autres_surfaces ? $immobilier->autres_surfaces.' '. __('site.unit.surface') : __('site.not_specified') }}
@else @endif @endsection