@extends('layouts.app') @section('content')
Daftar Penghuni
{{-- ── DESKTOP TABLE ── --}}
@forelse($penghuni as $p) @php $clusterMap = [ 'A'=>'Cluster Gardenia','B'=>'Cluster Gardenia','C'=>'Cluster Gardenia', 'D'=>'Cluster Gardenia','E'=>'Cluster Gardenia','F'=>'Cluster Gardenia','G'=>'Cluster Gardenia', 'H'=>'Cluster Edelweis','I'=>'Cluster Edelweis', 'J'=>'Blok J','K'=>'Blok K','L'=>'Blok L', ]; $blokP = $p->rumah->blok ?? '-'; $clusterP = $clusterMap[$blokP] ?? '-'; @endphp @empty @endforelse
# Nama No KTP No HP Alamat Cluster Blok No Rumah Status Status Huni Tgl Masuk Tgl Keluar
{{ $loop->iteration }} {{ $p->nama }} {{ $p->no_ktp }} {{ $p->telepon }} {{ $p->alamat }} {{ $clusterP }} {{ $blokP }} {{ $p->rumah->no_rumah ?? '-' }} @if($p->status_huni == 'Kontrak' && $p->tanggal_keluar && now()->gt(\Carbon\Carbon::parse($p->tanggal_keluar))) Tidak Aktif @else Aktif @endif {{ $p->status_huni }} {{ \Carbon\Carbon::parse($p->tanggal_masuk)->format('d-m-Y') }} {{ $p->tanggal_keluar ?? '-' }}
Belum ada data penghuni
{{-- ── MOBILE CARD LIST ── --}}
@forelse($penghuni as $p) @php $clusterMap = [ 'A'=>'Cluster Gardenia','B'=>'Cluster Gardenia','C'=>'Cluster Gardenia', 'D'=>'Cluster Gardenia','E'=>'Cluster Gardenia','F'=>'Cluster Gardenia','G'=>'Cluster Gardenia', 'H'=>'Cluster Edelweis','I'=>'Cluster Edelweis', 'J'=>'Blok J','K'=>'Blok K','L'=>'Blok L', ]; $blokP = $p->rumah->blok ?? '-'; $clusterP = $clusterMap[$blokP] ?? '-'; @endphp
{{ $loop->iteration }}. {{ $p->nama }} @if($p->status_huni == 'Kontrak' && $p->tanggal_keluar && now()->gt(\Carbon\Carbon::parse($p->tanggal_keluar))) Tidak Aktif @else Aktif @endif
No KTP {{ $p->no_ktp }}
No HP {{ $p->telepon ?? '-' }}
Cluster {{ $clusterP }}
Blok / No Rumah {{ $blokP }} / {{ $p->rumah->no_rumah ?? '-' }}
Status Huni {{ $p->status_huni }}
Tgl Masuk {{ \Carbon\Carbon::parse($p->tanggal_masuk)->format('d-m-Y') }}
Tgl Keluar {{ $p->tanggal_keluar ?? '-' }}
Alamat {{ $p->alamat }}
@empty
Belum ada data penghuni
@endforelse
@endsection @section('scripts') @endsection