76 lines
3.9 KiB
PHP
76 lines
3.9 KiB
PHP
<x-filament-panels::page>
|
|
<x-filament-panels::form wire:submit="submit">
|
|
{{ $this->form }}
|
|
|
|
@if($this->attendanceDate && $this->teacherSubjectId)
|
|
<div class="mt-6 space-y-4">
|
|
<div class="flex items-center justify-end">
|
|
<div class="flex gap-2 space-x-2">
|
|
<x-filament::button type="button" wire:click="markAll('present')" color="success">
|
|
Tandai Semua Hadir
|
|
</x-filament::button>
|
|
<x-filament::button type="button" wire:click="markAll('absent')" color="danger">
|
|
Tandai Semua Tidak Hadir
|
|
</x-filament::button>
|
|
<x-filament::button type="button" wire:click="markAll('sick')" color="warning">
|
|
Tandai Semua Sakit
|
|
</x-filament::button>
|
|
<x-filament::button type="button" wire:click="markAll('permission')" color="info">
|
|
Tandai Semua Izin
|
|
</x-filament::button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-y-2">
|
|
@foreach($this->students as $index => $student)
|
|
<div class="flex items-center p-3 border rounded-lg">
|
|
<div class="flex-1 flex items-center gap-4">
|
|
<p class="font-medium">{{ $student['name'] }}</p>
|
|
<p class="text-sm text-gray-500">{{ $student['nis'] }}</p>
|
|
</div>
|
|
<div class="flex gap-2 space-x-2">
|
|
<x-filament::button
|
|
type="button"
|
|
wire:click="$set('students.{{ $index }}.status', 'present')"
|
|
color="{{ $student['status'] === 'present' ? 'success' : 'gray' }}"
|
|
size="sm"
|
|
>
|
|
Hadir
|
|
</x-filament::button>
|
|
<x-filament::button
|
|
type="button"
|
|
wire:click="$set('students.{{ $index }}.status', 'absent')"
|
|
color="{{ $student['status'] === 'absent' ? 'danger' : 'gray' }}"
|
|
size="sm"
|
|
>
|
|
Tidak Hadir
|
|
</x-filament::button>
|
|
<x-filament::button
|
|
type="button"
|
|
wire:click="$set('students.{{ $index }}.status', 'sick')"
|
|
color="{{ $student['status'] === 'sick' ? 'warning' : 'gray' }}"
|
|
size="sm"
|
|
>
|
|
Sakit
|
|
</x-filament::button>
|
|
<x-filament::button
|
|
type="button"
|
|
wire:click="$set('students.{{ $index }}.status', 'permission')"
|
|
color="{{ $student['status'] === 'permission' ? 'warning' : 'gray' }}"
|
|
size="sm"
|
|
>
|
|
Izin
|
|
</x-filament::button>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<x-filament::button type="submit" class="w-full">
|
|
Simpan Absensi
|
|
</x-filament::button>
|
|
</div>
|
|
@endif
|
|
</x-filament-panels::form>
|
|
</x-filament-panels::page>
|