@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) ============================================================ --}}
@csrf @if($anggota->id) @method('PUT') @endif
Informasi Pribadi
@error('nama')
{{ $message }}
@enderror
@error('tempat_lahir')
{{ $message }}
@enderror
@error('tgl_lahir')
{{ $message }}
@enderror
@error('alamat')
{{ $message }}
@enderror
Keanggotaan & Kepengurusan
@if($user->role === 'super_admin') @else @endif @error('id_pac')
{{ $message }}
@enderror
@error('id_pengesahan')
{{ $message }}
@enderror
@if($anggota->id && $user->role === 'super_admin')
@error('status')
{{ $message }}
@enderror
@endif
Dokumen Pendukung
Klik untuk menambahkan foto.
Rasio 3:4 (berdiri) • PNG, JPG, JPEG • Maks 2MB
id ? '' : 'required' }}>
Preview Foto
{{ $anggota->id && $anggota->id_gambar ? 'Foto anggota' : 'Belum ada foto' }}
Gunakan rasio 3x4 (berdiri).
@error('file_foto')
{{ $message }}
@enderror
@push('scripts') @endpush @endsection