@extends('layouts.app') @section('content')
{{-- PAGE HEADER --}} @if(session('success'))
{{ session('success') }}
@endif {{-- KAVLING VISUAL --}}
Pilih Kavling
Kosong — tersedia
Terisi — tidak tersedia
@for($i = 1; $i <= 108; $i++) @php $dataRumah = $rumahList->where('no_rumah', $i)->first(); @endphp
{{ $i }} {{ !$dataRumah || $dataRumah->status == 'Kosong' ? 'Kosong' : 'Terisi' }}
@endfor
{{-- DATA PENGHUNI --}}
Data Penghuni
@forelse($penghuni as $p) @empty @endforelse
# Nama No KTP Email No HP Alamat Blok No Rumah Status Status Huni Tgl Masuk Tgl Keluar Aksi
{{ $loop->iteration }} {{ $p->nama }} {{ $p->no_ktp }} {{ $p->email }} {{ $p->telepon }} {{ $p->alamat }} {{ $p->rumah->blok ?? '-' }} {{ $p->rumah->no_rumah ?? '-' }} @if($p->status_huni == 'Kontrak' && $p->tanggal_keluar && now()->gt($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
{{-- DATA RUMAH --}}
Data Rumah
@forelse($rumahList as $r) @empty @endforelse
# Blok No Rumah Status Luas Tanah Harga Keterangan Aksi
{{ $loop->iteration }} {{ $r->blok }} {{ $r->no_rumah }} @if($r->status == 'Kosong') Kosong @else Terisi @endif {{ $r->luas_tanah ? $r->luas_tanah . ' m²' : '-' }} @if($r->harga) Rp {{ number_format($r->harga, 0, ',', '.') }} @else - @endif {{ $r->keterangan ?? '-' }}
Edit
@csrf @method('DELETE')
Belum ada data rumah
{{-- MODAL DETAIL --}} {{-- MODAL TAMBAH RUMAH --}} @endsection @section('scripts') @endsection