@extends('layout.index') @section('title', 'Data Anggota & Cetak KTA - SIAPN') @push('styles') {{-- ============================================================ DESIGN SYSTEM 2026 — PREMIUM GREEN EDITION (SINKRON) ============================================================ --}} @endpush @section('content')
{{-- ============================================================ PAGE HEADER — KONSISTEN DENGAN HALAMAN LAIN ============================================================ --}} {{-- ============================================================ ALERT BLANKO (untuk semua role) ============================================================ --}} @if(!$activeBlanko && $user->role === 'super_admin') @endif {{-- ============================================================ SWEETALERT2 SESSION SUCCESS ============================================================ --}} @if(session('success')) @endif {{-- ============================================================ TAMPILAN SUPER ADMIN: DAFTAR PAC ============================================================ --}} @if($user->role === 'super_admin')
@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: TABEL DENGAN PAGINATION ============================================================ --}} @else {{-- Statistik --}}
Total {{ $total }} Aktif {{ $aktif }} Nonaktif {{ $nonaktif }}
{{-- FILTER CARD — Search + Filter + Actions (semua dalam satu card) --}}
{{-- DESKTOP / TABLET ROW --}}
{{-- Search --}} {{-- Status Filter --}}
{{-- Sort --}}
{{-- Filter & Reset Actions (Desktop) --}}
{{-- ============================================================ MOBILE LAYOUT — Search → Filter → Actions (stacked) ============================================================ --}}
{{-- Search --}}
{{-- Status Filter --}}
{{-- Sort --}}
{{-- Filter & Reset inline di mobile --}}
Reset
{{-- Filter Active Chips --}} @if(request('search') || request('status_filter') || request('sort'))
Filter aktif: @if(request('search')) "{{ request('search') }}" × @endif @if(request('status_filter')) {{ request('status_filter') }} × @endif @if(request('sort')) {{ ucwords(str_replace('_',' ', request('sort'))) }} × @endif
@endif {{-- Table Data Grid --}}
@forelse($anggota as $index => $item) @empty @endforelse
No Profil Anggota @if(request('sort') == 'nama')@elseif(request('sort') == 'nama_desc')@else@endif ID Anggota @if(request('sort') == 'id_anggota')@elseif(request('sort') == 'id_anggota_desc')@else@endif Status Aksi
{{ $anggota->firstItem() + $index }}
@if($item->id_gambar) Foto {{ $item->nama }} @else @endif
{{ $item->nama }}
{{ \Illuminate\Support\Str::limit($item->ttl, 25) }}
{{ $item->id_anggota }} {{ $item->status }} {{-- DESKTOP ACTION BUTTONS --}}
@csrf @method('DELETE')
{{-- MOBILE ACTION DROPDOWN (⋮) --}}
Edit
@csrf @method('DELETE')
Tidak ada anggota
Belum ada anggota yang terdaftar atau tidak sesuai filter.
Reset Filter
{{-- Pagination --}}
Menampilkan {{ $anggota->firstItem() ?? 0 }}{{ $anggota->lastItem() ?? 0 }} dari {{ $anggota->total() }} data
{{ $anggota->appends(request()->query())->links('pagination::bootstrap-5') }}
@endif
{{-- ============================================================ SCRIPT: CONFIRM DELETE DENGAN SWEETALERT2 ============================================================ --}} @if($user->role !== 'super_admin') @endif @endsection