@extends('layout.index')
@section('title', $anggota->id ? 'Edit Anggota - SIAPN' : 'Tambah Anggota - SIAPN')
@push('styles')
@endpush
@section('content')
@php
// === Ambil pac_id dari query string ===
$pacId = request()->query('pac_id');
// === Buat URL kembali ke PAC jika ada, atau ke daftar anggota ===
if ($pacId) {
$backUrl = route('anggota.pac', ['id' => $pacId]);
} else {
$backUrl = route('anggota.index');
}
// === Jika sedang edit, coba ambil pac_id dari anggota (untuk fallback) ===
if (!$pacId && $anggota->id && $anggota->id_pac) {
$pacId = $anggota->id_pac;
$backUrl = route('anggota.pac', ['id' => $pacId]);
}
@endphp
{{-- ============================================================
BREADCRUMB + HEADER (COMPACT)
============================================================ --}}
@push('scripts')
@endpush
@endsection