@extends('layouts.app')
@section('page_title', 'Reward Prestasi')
@section('content')
@include('admin.partials.crud-table', [
    'title' => 'Reward Prestasi',
    'headers' => ['ID Siswa', 'Reward', 'Tanggal'],
    'columns' => ['id_siswa', 'reward', 'tanggal'],
    'rows' => $data,
    'primaryKey' => 'id',
    'storeRoute' => 'admin.reward.prestasi.store',
    'updateRoute' => 'admin.reward.prestasi.update',
    'deleteRoute' => 'admin.reward.prestasi.destroy',
    'fields' => [
        ['name' => 'id_siswa', 'label' => 'Siswa', 'type' => 'select', 'options' => $siswa, 'optionValue' => 'id_siswa', 'optionLabel' => 'nama', 'required' => true],
        ['name' => 'reward', 'label' => 'Reward', 'type' => 'text', 'required' => true],
        ['name' => 'tanggal', 'label' => 'Tanggal', 'type' => 'date', 'required' => true],
    ],
])
@endsection
