{{-- resources/views/anggota/index.blade.php --}} @extends('layout.index') @section('title', 'Data Anggota - SIAPN') @push('styles') {{-- ============================================================ PREMIUM GREEN DESIGN SYSTEM 2026 — FINAL POLISH PASS Enhanced with better spacing, refined interactions, and improved visual hierarchy ============================================================ --}} @endpush @section('content')
{{-- ============================================================ TAMPILAN SUPER ADMIN: DAFTAR PAC ============================================================ --}} @if($user->role === 'super_admin') {{-- Alert Blanko --}} @if(!$activeBlanko) @endif
@forelse($pacs as $pac)
{{ $pac->nama_pac }}
{{ $pac->anggota_count }}

Total Anggota

Lihat Anggota
@empty
Belum ada PAC terdaftar
Silakan tambahkan data PAC terlebih dahulu.
@endforelse
{{-- ============================================================ TAMPILAN SEKRETARIS PAC: CARD LIST ============================================================ --}} @else {{-- ============================================================ PAGE HEADER — Dengan statistik dan tombol tambah ============================================================ --}} {{-- ============================================================ FILTER CARD ============================================================ --}}
{{-- DESKTOP / TABLET ROW --}}
{{-- MOBILE LAYOUT --}}
{{-- SPACING BUTTON SEPERTI ASLINYA --}}
Reset
{{-- ============================================================ FILTER ACTIVE CHIPS ============================================================ --}} @if(request('search') || request('pengesahan') || request('sort'))
Filter aktif: @if(request('search')) "{{ request('search') }}" × @endif @if(request('pengesahan')) @php $pengesahan = \App\Models\Pengesahan::find(request('pengesahan')); @endphp {{ optional($pengesahan)->tahun ?? '' }} - {{ optional($pengesahan)->tanggal_bulan ?? '' }} × @endif @if(request('sort')) {{ ucwords(str_replace('_',' ', request('sort'))) }} × @endif
@endif {{-- ============================================================ CARD LIST — MANUAL TOGGLE ============================================================ --}}
@if($anggota->count() > 0)
@foreach($anggota as $item) @php $fotoUrl = $item->id_gambar ? route('proxy.image', $item->id_gambar) : ''; $initial = strtoupper(substr($item->nama, 0, 1)); @endphp
{{-- HEADER --}}
@if($fotoUrl) Foto {{ $item->nama }} @else
{{ $initial }}
@endif
{{ $item->nama }} {{ $item->id_anggota }}
{{-- BODY DETAIL --}}
{{ $item->ttl }} {{ \Illuminate\Support\Str::limit($item->alamat, 80) }}
{{ $item->status }}
Edit
@csrf @method('DELETE')
@endforeach
{{-- PAGINATION --}}
Menampilkan {{ $anggota->firstItem() ?? 0 }}{{ $anggota->lastItem() ?? 0 }} dari {{ $anggota->total() }} data
{{ $anggota->appends(request()->query())->links('pagination::bootstrap-5') }}
@else {{-- EMPTY STATE --}}
Tidak ada anggota
Belum ada anggota yang terdaftar atau tidak sesuai filter.
Reset Filter
@endif
@endif {{-- end role sekretaris_pac --}}
{{-- container --}} {{-- ============================================================ SCRIPT: CONFIRM DELETE + REAL-TIME SEARCH + TOGGLE ============================================================ --}} @if($user->role !== 'super_admin') @endif @endsection