@include('includes.header')

Registre des rangements

@if(Auth::user()->admin == 1)
@endif @include('includes.toast', ['msg' => $msg])

@if(Auth::user()->admin == 1) @endif @foreach ($rangements as $rangement) @if(Auth::user()->admin == 1) @endif @endforeach
Rangements Unité Propriétaires Locataires
#{{ $rangement->numero }}
@if(!empty($rangement->unite_id)) {{ $rangement->unite_id }} @else N/A @endif @php $query = DB::table('registreprivatif') ->join('rangements', 'rangements.unite_id', '=', 'registreprivatif.unite_id') ->where('registreprivatif.copropriete_id', Auth::user()->copropriete_active) ->where('rangements.numero', $rangement->numero) ->get(); @endphp @foreach(json_decode($query) as $key => $tenants) @foreach(json_decode($tenants->tenants) as $key => $tenants) @if(strpos($key, "proprio") !== false) @if(!empty($tenants->nom)) {{ $tenants->nom }} @if(!empty($tenants->telephone))@endif @if(!empty($tenants->courriel))@endif @endif
@endif @endforeach @endforeach @if(empty($rangement->unite_id)) {{ json_decode($rangement->proprio_ext)->proprio1->nom }} @if(!empty(json_decode($rangement->proprio_ext)->proprio1->telephone))@endif @if(!empty(json_decode($rangement->proprio_ext)->proprio1->courriel))@endif @endif
@foreach(json_decode($query) as $key => $tenants) @foreach(json_decode($tenants->tenants) as $key => $tenants) @if(strpos($key, "locataire") !== false) @if(!empty($tenants->nom)) {{ $tenants->nom }} @if(!empty($tenants->telephone))@endif @if(!empty($tenants->courriel)) @endif @endif
@endif @endforeach @endforeach @if(empty($rangement->unite_id)) N/A @elseif(empty(json_decode($rangement->proprio_ext)->proprio1->nom)) N/A @endif
@include('widgets.newRangement') @foreach ($rangements as $rangement) @include('widgets.editRangement', ['id' => $rangement->id, 'numero' => $rangement->numero, 'unite_id' => $rangement->unite_id]) @endforeach @include('includes.footer')