Commit awal: prototipe UI SIAKAD Untan

This commit is contained in:
Ariyutta
2026-10-24 11:45:32 +07:00
commit d9b9cb5c0f
477 changed files with 51958 additions and 0 deletions
@@ -0,0 +1,19 @@
@props(['name', 'label', 'value' => '1', 'checked' => false, 'id' => null])
@php
$id ??= 'check-'.\Illuminate\Support\Str::slug($name);
// Setelah validasi gagal, nilai lama menang atas nilai bawaan (kotak yang tidak dicentang tidak dikirim browser)
$isChecked = request()->hasSession() && session()->hasOldInput() ? (bool) old($name) : (bool) $checked;
@endphp
<label class="check" for="{{ $id }}">
<input
type="checkbox"
id="{{ $id }}"
name="{{ $name }}"
value="{{ $value }}"
@checked($isChecked)
{{ $attributes->class('check__input') }}
>
<span>{{ $label }}</span>
</label>