Detailing fungsi semua modul dari bugs error

This commit is contained in:
Iwit
2026-06-05 13:39:13 +07:00
parent 1089f60a3d
commit 6a79bc3464
31 changed files with 1927 additions and 228 deletions
@@ -13,7 +13,7 @@
<div class="max-w-5xl mx-auto px-4 py-8" x-data="{ questionType: '{{ old('question_type', '') }}' }" @update-type.window="questionType = $event.detail">
<div class="mb-6 flex items-center space-x-3">
<a href="{{ route('admin.exams.questions') }}" class="text-slate-400 hover:text-blue-600 transition-colors">
<a href="{{ route('admin.question-bank.index') }}" class="text-slate-400 hover:text-blue-600 transition-colors">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
</a>
<h2 class="text-2xl font-bold text-slate-800 tracking-tight">Tambah Soal Baru</h2>
@@ -126,7 +126,7 @@
</div>
<div class="pt-6 flex justify-end space-x-3 border-t border-slate-100 mt-8">
<a href="{{ route('admin.exams.questions') }}" class="px-5 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-100 rounded-xl">Batal</a>
<a href="{{ route('admin.question-bank.index') }}" class="px-5 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-100 rounded-xl">Batal</a>
<button type="submit" class="px-5 py-2.5 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-xl shadow-md">Simpan Soal</button>
</div>
</form>
@@ -13,7 +13,7 @@
<div class="max-w-5xl mx-auto px-4 py-8" x-data="{ questionType: '{{ old('question_type', $question->question_type) }}' }" @update-type.window="questionType = $event.detail">
<div class="mb-6 flex items-center space-x-3">
<a href="{{ route('admin.exams.questions') }}" class="text-slate-400 hover:text-blue-600 transition-colors">
<a href="{{ route('admin.question-bank.index') }}" class="text-slate-400 hover:text-blue-600 transition-colors">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
</a>
<h2 class="text-2xl font-bold text-slate-800 tracking-tight">Edit Pertanyaan #{{ $question->id }}</h2>
@@ -128,7 +128,7 @@
</div>
<div class="pt-6 flex justify-end space-x-3 border-t border-slate-100 mt-8">
<a href="{{ route('admin.exams.questions') }}" class="px-5 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-100 rounded-xl">Batal</a>
<a href="{{ route('admin.question-bank.index') }}" class="px-5 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-100 rounded-xl">Batal</a>
<button type="submit" class="px-5 py-2.5 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-xl shadow-md">Simpan Perubahan</button>
</div>
</form>
@@ -0,0 +1,155 @@
@if(request('action') == 'export_excel')
<!DOCTYPE html>
<html lang="id">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body style="font-family: Arial, sans-serif;">
<table>
<tr>
<td colspan="7" align="center" style="font-size: 16px; font-weight: bold; height: 30px; vertical-align: middle;">
LAPORAN DATABASE BANK SOAL (CBT)
</td>
</tr>
<tr>
<td colspan="7" align="center" style="font-size: 11px; height: 20px; vertical-align: top;">
LMS TUNGGAL PHARMA
</td>
</tr>
<tr><td colspan="7"></td></tr> <tr>
<td style="font-size: 11px; font-weight: bold;">Diunduh Oleh</td>
<td style="font-size: 11px;">:</td>
<td colspan="2" style="font-size: 11px;">{{ $exporterName }}</td>
<td style="font-size: 11px; font-weight: bold;">Total Record</td>
<td style="font-size: 11px;">:</td>
<td style="font-size: 11px; font-weight: bold;">{{ count($exportData) }} Soal</td>
</tr>
<tr>
<td style="font-size: 11px; font-weight: bold;">Waktu Unduh</td>
<td style="font-size: 11px;">:</td>
<td colspan="2" style="font-size: 11px;">{{ $exportTime }}</td>
<td style="font-size: 11px; font-weight: bold;">Kriteria</td>
<td style="font-size: 11px;">:</td>
<td style="font-size: 11px;">Sesuai Filter Pencarian</td>
</tr>
<tr><td colspan="7"></td></tr> </table>
<table border="1">
<thead>
<tr>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; height: 30px; vertical-align: middle;">NO</th>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; vertical-align: middle;">Q.ID</th>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; vertical-align: middle; width: 250px;">DEPARTEMEN & JABATAN</th>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; vertical-align: middle; width: 250px;">MATERI (SUBJECT)</th>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; vertical-align: middle; width: 150px;">TIPE & LEVEL</th>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; vertical-align: middle; width: 400px;">TEKS PERTANYAAN</th>
<th style="background-color: #d1d5db; font-size: 11px; font-weight: bold; text-align: center; vertical-align: middle; width: 150px;">PEMBUAT</th>
</tr>
</thead>
<tbody>
@forelse($exportData as $index => $q)
<tr>
<td align="center" style="font-size: 11px; vertical-align: top;">{{ $index + 1 }}</td>
<td align="center" style="font-size: 11px; vertical-align: top;">{{ $q->id }}</td>
<td style="font-size: 11px; vertical-align: top;">
<strong>{{ $q->department->name ?? 'Semua Dept' }}</strong><br>
{{ $q->position->name ?? 'Semua Jabatan' }}
</td>
<td style="font-size: 11px; vertical-align: top;">{{ $q->subject->name ?? 'Umum' }}</td>
<td style="font-size: 11px; vertical-align: top;">
<strong>{{ ucwords(str_replace('_', ' ', $q->question_type)) }}</strong><br>
Level: {{ ucfirst($q->question_level) }}
</td>
<td style="font-size: 11px; vertical-align: top;">{{ strip_tags($q->question_text) }}</td>
<td style="font-size: 11px; vertical-align: top;">{{ $q->creator->first_name ?? '-' }}</td>
</tr>
@empty
<tr>
<td colspan="7" align="center" style="font-size: 11px;">Tidak ada data soal pada kriteria ini.</td>
</tr>
@endforelse
</tbody>
</table>
</body>
</html>
@else
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Export Data Bank Soal</title>
<style>
body { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #000; margin: 0; padding: 10px; }
.header-title { text-align: center; font-size: 16px; font-weight: bold; margin-bottom: 5px; }
.header-subtitle { text-align: center; font-size: 12px; margin-bottom: 20px; }
.info-table { width: 100%; margin-bottom: 15px; font-size: 11px; }
.info-table td { padding: 3px; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.data-table th, .data-table td { border: 1px solid #000000; padding: 6px; vertical-align: top; }
.data-table th { background-color: #d1d5db; font-weight: bold; text-align: center; text-transform: uppercase; }
</style>
</head>
<body>
<div class="header-title">LAPORAN DATABASE BANK SOAL (CBT)</div>
<div class="header-subtitle">LMS TUNGGAL PHARMA</div>
<table class="info-table">
<tr>
<td width="15%"><strong>Diunduh Oleh</strong></td>
<td width="2%">:</td>
<td width="33%">{{ $exporterName }}</td>
<td width="15%"><strong>Total Record</strong></td>
<td width="2%">:</td>
<td width="33%"><strong>{{ count($exportData) }} Soal</strong></td>
</tr>
<tr>
<td><strong>Waktu Unduh</strong></td>
<td>:</td>
<td>{{ $exportTime }}</td>
<td><strong>Kriteria</strong></td>
<td>:</td>
<td>Sesuai Filter Pencarian</td>
</tr>
</table>
<table class="data-table" border="1">
<thead>
<tr>
<th width="5%">NO</th>
<th width="8%">Q.ID</th>
<th width="18%">DEPARTEMEN & JABATAN</th>
<th width="15%">MATERI (SUBJECT)</th>
<th width="15%">TIPE & LEVEL</th>
<th width="27%">TEKS PERTANYAAN</th>
<th width="12%">PEMBUAT</th>
</tr>
</thead>
<tbody>
@forelse($exportData as $index => $q)
<tr>
<td align="center">{{ $index + 1 }}</td>
<td align="center">{{ $q->id }}</td>
<td>
<strong>{{ $q->department->name ?? 'Semua Dept' }}</strong><br>
{{ $q->position->name ?? 'Semua Jabatan' }}
</td>
<td>{{ $q->subject->name ?? 'Umum' }}</td>
<td>
<strong>{{ ucwords(str_replace('_', ' ', $q->question_type)) }}</strong><br>
Level: {{ ucfirst($q->question_level) }}
</td>
<td>{{ strip_tags($q->question_text) }}</td>
<td>{{ $q->creator->first_name ?? '-' }}</td>
</tr>
@empty
<tr>
<td colspan="7" align="center" style="padding: 15px;">Tidak ada data soal pada kriteria ini.</td>
</tr>
@endforelse
</tbody>
</table>
</body>
</html>
@endif
@@ -6,9 +6,9 @@
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<style>
.select2-container .select2-selection--single { height: 38px; border-radius: 0.5rem; border-color: #e2e8f0; background-color: #f8fafc; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; font-size: 0.875rem; color: #334155; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
.select2-container .select2-selection--single { height: 42px; border-radius: 0.5rem; border-color: #e2e8f0; background-color: #f8fafc; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; font-size: 0.875rem; color: #334155; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
</style>
<div class="max-w-7xl mx-auto px-4 py-8"
@@ -38,33 +38,37 @@
</div>
<div class="flex flex-wrap items-center gap-3">
<form action="{{ url('admin/exams/questions/bulk-delete') }}" method="POST" x-show="selectedQuestions.length > 0" x-transition @submit="return confirmBulkDelete()">
<form action="{{ route('admin.exams.questions.bulkDelete') }}" method="POST" x-show="selectedQuestions.length > 0" x-transition @submit="return confirmBulkDelete()">
@csrf @method('DELETE')
<template x-for="id in selectedQuestions" :key="id">
<input type="hidden" name="question_ids[]" :value="id">
</template>
<button type="submit" class="inline-flex items-center px-4 py-2 bg-red-50 text-red-600 border border-red-200 rounded-lg text-sm font-bold hover:bg-red-100 shadow-sm transition-all">
<button type="submit" class="inline-flex items-center px-4 py-2 bg-red-50 text-red-600 border border-red-200 rounded-xl text-sm font-bold hover:bg-red-100 shadow-sm transition-all">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>
Bulk Delete (<span x-text="selectedQuestions.length"></span>)
</button>
</form>
<a href="{{ url('admin/exams/questions/import') }}" class="inline-flex items-center px-4 py-2 bg-slate-800 text-white rounded-lg text-sm font-semibold hover:bg-slate-900 shadow-sm transition-all">
<a href="{{ route('admin.exams.questions.import') }}" class="inline-flex items-center px-4 py-2 bg-slate-800 text-white rounded-xl text-sm font-semibold hover:bg-slate-900 shadow-sm transition-all">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path></svg>
Import Soal
</a>
<a href="{{ url('admin/exams/questions/create') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-semibold hover:bg-blue-700 shadow-sm transition-all">
<a href="{{ route('admin.exams.questions.create') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-xl text-sm font-semibold hover:bg-blue-700 shadow-sm transition-all">
+ Tambah Soal
</a>
</div>
</div>
<div class="bg-white p-5 rounded-2xl border border-slate-200 shadow-sm mb-6">
<form action="{{ route('admin.exams.questions') }}" method="GET">
<div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-4">
<div class="bg-white p-6 rounded-2xl border border-slate-200 shadow-sm mb-6">
<form action="{{ route('admin.question-bank.index') }}" method="GET">
<button type="submit" class="hidden" aria-hidden="true"></button>
<div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-6 gap-5 mb-5">
<div>
<label class="block text-xs font-semibold text-slate-500 mb-1">Departemen</label>
<label class="block text-[11px] font-bold text-slate-500 uppercase tracking-wide mb-1.5">Departemen</label>
<select name="department_id" class="select2 w-full text-sm">
<option value="">Semua</option>
@foreach($departments as $dept)
@@ -74,7 +78,7 @@
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 mb-1">Posisi / Jabatan</label>
<label class="block text-[11px] font-bold text-slate-500 uppercase tracking-wide mb-1.5">Posisi / Jabatan</label>
<select name="position_id" class="select2 w-full text-sm">
<option value="">Semua</option>
@foreach($positions as $pos)
@@ -84,7 +88,7 @@
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 mb-1">Subject / Materi</label>
<label class="block text-[11px] font-bold text-slate-500 uppercase tracking-wide mb-1.5">Subject / Materi</label>
<select name="subject_id" class="select2 w-full text-sm">
<option value="">Semua Materi</option>
@foreach($subjects as $subj)
@@ -94,18 +98,18 @@
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 mb-1">Tipe Soal</label>
<label class="block text-[11px] font-bold text-slate-500 uppercase tracking-wide mb-1.5">Tipe Soal</label>
<select name="question_type" class="select2 w-full text-sm">
<option value="">Semua</option>
<option value="single" {{ request('question_type') == 'single' ? 'selected' : '' }}>Single Choice</option>
<option value="multiple" {{ request('question_type') == 'multiple' ? 'selected' : '' }}>Multiple Choice</option>
<option value="true_false" {{ request('question_type') == 'true_false' ? 'selected' : '' }}>True / False</option>
<option value="descriptive" {{ request('question_type') == 'descriptive' ? 'selected' : '' }}>Deskriptif</option>
<option value="essay" {{ request('question_type') == 'essay' ? 'selected' : '' }}>Esai / Deskriptif</option>
</select>
</div>
<div>
<label class="block text-xs font-semibold text-slate-500 mb-1">Level</label>
<label class="block text-[11px] font-bold text-slate-500 uppercase tracking-wide mb-1.5">Level</label>
<select name="question_level" class="select2 w-full text-sm">
<option value="">Semua</option>
<option value="mudah" {{ request('question_level') == 'mudah' ? 'selected' : '' }}>Mudah (Easy)</option>
@@ -115,27 +119,46 @@
</div>
<div>
<label class="block text-xs font-bold text-slate-500 uppercase mb-1">Pembuat Soal</label>
<select name="creator_id" class="w-full px-3 py-2 bg-white border border-slate-200 rounded-lg text-sm focus:ring-blue-500" onchange="this.form.submit()">
<option value="">-- Semua Trainer --</option>
@foreach($creators as $creator)
<option value="{{ $creator->id }}" {{ request('creator_id') == $creator->id ? 'selected' : '' }}>
{{ $creator->first_name }} {{ $creator->last_name }}
</option>
@endforeach
</select>
<label class="block text-[11px] font-bold text-slate-500 uppercase tracking-wide mb-1.5">Pembuat Soal</label>
<select name="creator_id" class="w-full px-3 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm focus:ring-blue-500">
<option value="">-- Semua Trainer --</option>
@foreach($creators as $creator)
<option value="{{ $creator->id }}" {{ request('creator_id') == $creator->id ? 'selected' : '' }}>
{{ $creator->first_name }} {{ $creator->last_name }}
</option>
@endforeach
</select>
</div>
</div>
<div class="flex flex-col md:flex-row gap-4 items-center justify-between border-t border-slate-100 pt-4">
<div class="w-full md:w-1/3">
<input type="text" name="search" value="{{ request('search') }}" placeholder="Cari teks pertanyaan..." class="w-full px-4 py-2 bg-slate-50 border border-slate-200 rounded-lg text-sm focus:ring-blue-500">
<div class="flex flex-col md:flex-row gap-4 items-center justify-between border-t border-slate-100 pt-5 mt-2">
<div class="w-full flex-1 md:pr-10">
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<svg class="w-5 h-5 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
</div>
<input type="text" name="search" value="{{ request('search') }}" placeholder="Ketik kata kunci untuk mencari di semua kolom (Teks Soal, Dept, Materi, ID, dll)..." class="w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all shadow-sm">
</div>
</div>
<div class="flex gap-2 w-full md:w-auto">
@if(request()->hasAny(['search', 'department_id', 'position_id', 'subject_id', 'question_type', 'question_level', 'created_by']))
<a href="{{ route('admin.exams.questions') }}" class="px-5 py-2 bg-slate-100 text-slate-600 rounded-lg text-sm font-semibold hover:bg-slate-200 transition-all text-center w-full md:w-auto">Reset</a>
<div class="flex gap-2 w-full md:w-auto shrink-0">
@if(request()->hasAny(['search', 'department_id', 'position_id', 'subject_id', 'question_type', 'question_level', 'creator_id']))
<a href="{{ route('admin.question-bank.index') }}" class="px-4 py-2.5 bg-slate-100 text-slate-600 rounded-xl text-sm font-semibold hover:bg-slate-200 transition-all text-center" title="Reset Semua Filter">Reset</a>
@endif
<button type="submit" class="px-5 py-2 bg-blue-600 text-white rounded-lg text-sm font-semibold hover:bg-blue-700 transition-all text-center w-full md:w-auto">
Terapkan Filter
<button type="submit" name="action" value="export_excel" class="px-4 py-2.5 bg-emerald-50 text-emerald-700 border border-emerald-200 rounded-xl text-sm font-bold hover:bg-emerald-100 transition-all text-center flex items-center" title="Download Excel">
<svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> Excel
</button>
<button type="submit" name="action" value="export_pdf" formtarget="_blank" class="px-4 py-2.5 bg-rose-50 text-rose-700 border border-rose-200 rounded-xl text-sm font-bold hover:bg-rose-100 transition-all text-center flex items-center" title="Cetak PDF">
<svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"></path></svg> PDF
</button>
<div class="border-l border-slate-200 mx-1"></div>
<button type="submit" class="px-6 py-2.5 bg-blue-600 text-white rounded-xl text-sm font-bold hover:bg-blue-700 shadow-md transition-all transform hover:-translate-y-0.5 text-center flex items-center">
Cari / Filter
</button>
</div>
</div>
@@ -145,18 +168,18 @@
<div class="bg-white border border-slate-200 rounded-2xl overflow-hidden shadow-sm">
<div class="overflow-x-auto">
<table class="w-full text-left text-sm">
<thead class="bg-slate-50 text-slate-600 text-xs uppercase tracking-wider border-b border-slate-200">
<thead class="bg-slate-50 text-slate-600 text-[11px] uppercase tracking-wider border-b border-slate-200">
<tr>
<th class="px-4 py-4 w-10 text-center">
<input type="checkbox" x-model="selectAll" @change="toggleAll" class="w-4 h-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500 cursor-pointer">
</th>
<th class="px-4 py-4 font-semibold w-12">Q.ID</th>
<th class="px-4 py-4 font-semibold w-1/5">Subject / Materi</th>
<th class="px-4 py-4 font-semibold w-1/5">Penempatan</th>
<th class="px-4 py-4 font-semibold">Tipe & Level</th>
<th class="px-4 py-4 font-semibold w-1/3">Pertanyaan</th>
<th class="px-4 py-4 font-semibold">Pembuat</th>
<th class="px-4 py-4 font-semibold text-right">Aksi</th>
<th class="px-4 py-4 font-bold w-12">Q.ID</th>
<th class="px-4 py-4 font-bold w-1/5">Subject / Materi</th>
<th class="px-4 py-4 font-bold w-1/5">Penempatan</th>
<th class="px-4 py-4 font-bold">Tipe & Level</th>
<th class="px-4 py-4 font-bold w-1/3">Pertanyaan</th>
<th class="px-4 py-4 font-bold">Pembuat</th>
<th class="px-4 py-4 font-bold text-right">Aksi</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 text-slate-700">
@@ -195,9 +218,9 @@
</div>
</td>
<td class="px-4 py-3 text-right space-x-2 whitespace-nowrap">
<a href="{{ url('admin/exams/questions/'.$q->id) }}" class="text-slate-400 hover:text-blue-600"><svg class="w-5 h-5 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path></svg></a>
<a href="{{ url('admin/exams/questions/'.$q->id.'/edit') }}" class="text-slate-400 hover:text-amber-500"><svg class="w-5 h-5 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg></a>
<form action="{{ url('admin/exams/questions/'.$q->id) }}" method="POST" class="inline-block" onsubmit="return confirm('Hapus soal ini secara permanen?');">
<a href="{{ route('admin.exams.questions.show', $q->id) }}" class="text-slate-400 hover:text-blue-600"><svg class="w-5 h-5 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path></svg></a>
<a href="{{ route('admin.exams.questions.edit', $q->id) }}" class="text-slate-400 hover:text-amber-500"><svg class="w-5 h-5 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg></a>
<form action="{{ route('admin.exams.questions.destroy', $q->id) }}" method="POST" class="inline-block" onsubmit="return confirm('Hapus soal ini secara permanen?');">
@csrf @method('DELETE')
<button type="submit" class="text-slate-400 hover:text-red-500"><svg class="w-5 h-5 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button>
</form>
@@ -206,7 +229,10 @@
@empty
<tr>
<td colspan="8" class="px-4 py-12 text-center text-slate-500 font-medium">
Belum ada data soal yang sesuai kriteria filter.
<div class="flex flex-col items-center justify-center">
<svg class="w-12 h-12 text-slate-300 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
Tidak ada data soal yang sesuai dengan kriteria pencarian/filter.
</div>
</td>
</tr>
@endforelse
@@ -4,7 +4,7 @@
<div class="max-w-4xl mx-auto px-4 py-8">
<div class="flex items-center justify-between mb-6">
<div class="flex items-center space-x-3">
<a href="{{ route('admin.exams.questions') }}" class="text-slate-400 hover:text-blue-600 transition-colors">
<a href="{{ route('admin.question-bank.index') }}" class="text-slate-400 hover:text-blue-600 transition-colors">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
</a>
<h2 class="text-2xl font-bold text-slate-800 tracking-tight">Pratinjau Soal</h2>