@extends('admin.layouts.app') @section('title', 'History Challenge') @section('content')

HISTORY CHALLENGE

@if(session('success'))
Berhasil {{ session('success') }}
@endif
{{-- TOP BAR: dropdown | search | total --}}
{{-- Dropdown Filter Guru --}} {{-- Search Judul Challenge --}} {{-- Reset (muncul jika ada filter aktif) --}} @if(request('search') || request('guru_id')) ✕ Reset @endif {{-- Total di kanan --}} Total: {{ $challenges->total() }} challenge
{{-- TABEL --}}
@forelse($challenges as $i => $ch) @php $isLewat = \Carbon\Carbon::parse($ch->tenggat_waktu)->isPast(); @endphp @empty @endforelse
No Pembuat Judul Challenge Kelas Soal Durasi Tenggat Aksi
{{ $challenges->firstItem() + $i }} {{ optional($ch->guru)->nama ?? 'Admin' }}
{{ $ch->judul_challenge }}
@if($ch->deskripsi)
{{ Str::limit($ch->deskripsi, 40) }}
@endif
@foreach($ch->kelas as $k) {{ $k->tingkat }} {{ $k->nama_kelas }} @endforeach {{ $ch->soal_count }} soal @if($ch->durasi_pengerjaan) ⏱ {{ $ch->durasi_pengerjaan }} mnt @else @endif {{ $isLewat ? 'Lewat' : 'Aktif' }}
{{ \Carbon\Carbon::parse($ch->tenggat_waktu)->format('d M Y, H:i') }}
Lihat
@csrf @method('DELETE')
Belum ada challenge.
{{ $challenges->links() }}
@endsection