Detailing fungsi semua modul dari bugs error
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user