@extends('layouts.owner') @section('breadcrumb') Manajemen / Penghuni @endsection @section('content')

Daftar Penghuni

Kelola data diri dan kontak darurat penghuni Anda.

Daftarkan Penghuni
Semua Aktif Ngekos Tidak Aktif
@if($residents->isEmpty())

Belum ada penghuni

Mulai daftarkan penghuni baru untuk mengelola kontrak sewa mereka.

@else @foreach($residents as $resident) @php $activeLease = $resident->leases->where('status', 'active')->first(); @endphp
{{ substr($resident->user->name, 0, 1) }}

{{ $resident->user->name }}

NIK: {{ $resident->nik }}

{{ $resident->user->phone }}

{{ $resident->user->email }}

@if($activeLease)

{{ $activeLease->room->property->name }}

{{ $activeLease->room->property->type === 'kos' ? 'Kamar' : 'Unit' }} {{ $activeLease->room->room_number }}

@else Belum ada kamar @endif @if($activeLease) @else @endif @endforeach
@endif @endsection