@extends('layouts.app') @section('title', 'Buku Induk') @php $badge = [ 'Paket A' => 'border-indigo-100 bg-indigo-50 text-indigo-700', 'Paket B' => 'border-sky-100 bg-sky-50 text-sky-700', 'Paket C' => 'border-purple-100 bg-purple-50 text-purple-700', ]; $perPage = $perPage ?? '50'; $offset = $perPage !== 'all' ? ($page - 1) * (int) $perPage : 0; // Preserve current filters when building pagination / cetak links. $baseQuery = array_filter([ 'cari' => $cari, 'jenjang' => $filterJenjang, 'tahun' => $filterTahun, 'per_page' => $perPage, ], fn ($v) => $v !== '' && $v !== null); @endphp @section('content')

Data UtamaBuku Induk

Buku Induk Siswa

Arsip master lintas angkatan sekaligus sistem penomoran nomor induk (NIS). Baris diurutkan berdasarkan NIS.

Total terdaftar {{ number_format($total, 0, ',', '.') }} siswa · urut NIS
@if (session('status'))
{!! session('status') !!}
@endif {{-- Kartu aksi: pola nomor induk, generate, cetak (diletakkan di atas filter) --}}

Aksi Buku Induk

Atur pola NIS, buat nomor induk otomatis, atau cetak buku induk per angkatan maupun keseluruhan.

{{-- Kartu filter data --}}

Filter data

@foreach (['cari' => $cari, 'tahun' => $filterTahun, 'jenjang' => $filterJenjang] as $key => $val) @endforeach · {{ count($order) }} baris @if ($perPage !== 'all') · halaman {{ $page }}/{{ $pages }} @endif @if ($totalEmptyNis > 0) · {{ $totalEmptyNis }} belum punya NIS @endif
@if ($perPage !== 'all' && $pages > 1) @endif
@forelse ($order as $index => $id) @php $row = $records[$id] ?? null; $jenjang = $row ? ($jenjangMap[$id] ?? null) : null; $nis = $row ? trim((string) $row->nis) : ''; $ttl = $row ? trim(($row->tempat_lahir ?: '-') . ', ' . ($row->tanggal_lahir ? \Illuminate\Support\Carbon::parse($row->tanggal_lahir)->format('d-m-Y') : '-')) : '-'; @endphp @if ($row) @endif @empty @endforelse
No Foto NIS NISN Nama Siswa Jenjang L/P Tempat, Tanggal Lahir Nama Ayah / Ibu No. HP Aksi
{{ $offset + $index + 1 }} @if ($row->foto) Foto {{ $row->nama_siswa }} @else @endif @if ($nis !== '') {{ $nis }} @else Isi NIS @endif {{ $row->nisn ?: '-' }} {{ strtoupper($row->nama_siswa) }} @if ($jenjang) {{ $jenjang }} @else Belum Ada Kelas @endif {{ in_array($row->jenis_kelamin, ['L', 'Laki-laki'], true) ? 'L' : ($row->jenis_kelamin ? 'P' : '-') }} {{ $ttl }} {{ $row->nama_ayah ?: '-' }} / {{ $row->nama_ibu ?: '-' }} {{ $row->hp ?: '-' }} Cetak
{{ ($cari !== '' || $filterJenjang !== '' || $filterTahun !== 'all') ? 'Data siswa tidak ditemukan untuk filter yang dipilih.' : 'Belum ada data siswa.' }}
@endsection @push('scripts') @endpush