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

Beranda Penghuni

@if(!$penghuni)
Lengkapi Data Penghuni
@csrf
@endif {{-- DATA PENGHUNI --}} @if(isset($penghuni))
Data Anda

Nama: {{ $penghuni->nama }}

Email: {{ $penghuni->email }}

Status Huni: @if($penghuni->status_huni == 'Tetap') Tetap @else Kontrak @endif

@if($penghuni->status_huni == 'Kontrak')

Tanggal Keluar: {{ $penghuni->tanggal_keluar }}

@endif
{{-- RUMAH --}} @if($penghuni->rumah)
Rumah Anda

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

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

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

Data Iuran Saya

@if(isset($iuran) && count($iuran) > 0) @foreach($iuran as $i)
{{-- JUDUL --}}
Iuran {{ $i->bulan }} {{ $i->tahun }}
{{-- JUMLAH --}}

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

{{-- JENIS IURAN --}}

Jenis Iuran: {{ $i->jenis_iuran ?? '-' }}

{{-- TANGGAL --}}

Tanggal Bayar: {{ $i->tanggal_bayar ? \Carbon\Carbon::parse($i->tanggal_bayar)->translatedFormat('d M Y') : '-' }}

{{-- PROGRESS --}}
{{-- STEP 1 --}}
@if($i->bukti_pembayaran)
@else
@endif Upload
{{-- STEP 2 --}}
@if($i->status == 'lunas')
@elseif($i->bukti_pembayaran)
@else
2
@endif Verifikasi
{{-- STEP 3 --}}
@if($i->status == 'lunas')
@else
3
@endif Selesai
{{-- STATUS --}}
Status: @if($i->status == 'lunas') Lunas @elseif(!empty($i->bukti_pembayaran)) Menunggu Verifikasi @else Belum Bayar @endif
@if($i->status == 'lunas')
@csrf @method('DELETE')
@endif
@endforeach @else
Belum ada data iuran
@endif {{-- ========================= --}} {{-- 🔥 STATUS PENGADUAN HOME --}} {{-- ========================= --}}

Status Pengaduan Saya

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

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

{{-- TIMELINE --}}
📩
⚙️
{{-- TANGGAL --}}
{{ \Carbon\Carbon::parse($p->tanggal_pengaduan)->translatedFormat('d M Y H:i') }}
{{-- TANGGAPAN --}} @if($p->tanggapan_admin)
Tanggapan: {{ $p->tanggapan_admin }}
@endif
@empty
Belum ada pengaduan
@endsection {{-- 🔥 STYLE --}} @section('scripts') @endsection @section('scripts') @endsection