@extends('layouts.app') @section('content')

Beranda Penghuni

{{-- 🔔 NOTIF --}} @if(session('success'))
{{ session('success') }}
@endif {{-- ========================= --}} {{-- DATA PENGHUNI --}} {{-- ========================= --}} @if(isset($penghuni))
👤 Data Anda

Nama: {{ $penghuni->nama }}

Email: {{ $penghuni->email }}

Status Huni: {{ $penghuni->status_huni }}

@endif {{-- ========================= --}} {{-- DATA IURAN --}} {{-- ========================= --}}

💰 Data Iuran Saya

@forelse($iuran as $i)
Iuran {{ $i->bulan }} {{ $i->tahun }}

Jumlah: Rp {{ number_format($i->jumlah,0,',','.') }}

Status: {{ ucfirst($i->status) }}

{{-- PROGRESS --}}
📤
@empty
Belum ada data iuran
@endforelse {{-- ========================= --}} {{-- STATUS PENGADUAN --}} {{-- ========================= --}}

📢 Status Pengaduan Saya

@php $pengaduan = \App\Models\Layanan::where('penghuni_id', $penghuni->id ?? 0)->latest()->get(); @endphp @forelse($pengaduan as $p)
#P-{{ str_pad($p->id,3,'0',STR_PAD_LEFT) }}
{{ ucfirst($p->status) }}

{{ \Illuminate\Support\Str::limit($p->deskripsi,80) }}

{{-- TIMELINE --}}
📩
⚙️
{{ \Carbon\Carbon::parse($p->tanggal_pengaduan)->translatedFormat('d M Y H:i') }} @if($p->tanggapan_admin)
Tanggapan: {{ $p->tanggapan_admin }}
@endif
{{-- 🔥 TOMBOL HAPUS DI SINI --}}
@if($i->status == 'lunas')
@csrf @method('DELETE')
@else @endif
@empty
Belum ada pengaduan
@endforelse
@endsection {{-- 🔥 STYLE + SCRIPT DIGABUNG --}} @section('scripts') @endsection