@extends('layouts.app') @section('content')
@if($isExpired)
⚠️ Kontrak Anda telah berakhir. Silakan hubungi admin.
@endif

Beranda Penghuni

📢 Informasi & Pengumuman

@php $slider = $informasi->where('is_penting', 1)->values(); @endphp @forelse($informasi as $info) @empty
Belum ada informasi
@endforelse
{{-- 🔔 NOTIF --}} @if(session('success'))
{{ session('success') }}
@endif {{-- ========================= --}} {{-- DATA PENGHUNI --}} {{-- ========================= --}} {{-- 🔥 FORM INPUT PENGHUNI (JIKA BELUM ADA DATA) --}} @if(!isset($penghuni))
⚠️ Lengkapi Data Penghuni
@if ($errors->any())
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
@csrf
{{--
--}}
@endif {{-- @if(isset($penghuni))
👤 Data Anda

Nama: {{ $penghuni->nama }}

Email: {{ $penghuni->email }}

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

@endif --}} {{--

👤 Data Anda

--}} {{-- ========================= --}} {{-- 🏠 RUMAH SAYA --}} {{-- ========================= --}} {{-- @if(isset($penghuni) && $penghuni->rumah)
🏠 Rumah Saya

Blok: {{ $penghuni->rumah->blok }}
No Rumah: {{ $penghuni->rumah->no_rumah }}

Status: {{ $penghuni->rumah->status }}

@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 --}}
📤
{{-- 🔥 TOMBOL HAPUS DI SINI --}}
@if($i->status == 'lunas')
@csrf @method('DELETE')
@else @endif
@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)
{{-- 🔥 TOMBOL HAPUS PENGADUAN --}} @if($p->status == 'selesai')
@csrf @method('DELETE')
@endif
#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
@empty
Belum ada pengaduan
@endforelse
@endsection {{-- 🔥 STYLE + SCRIPT DIGABUNG --}} @section('scripts') @endsection