79 lines
3.1 KiB
PHP
79 lines
3.1 KiB
PHP
{{--
|
||
Halaman cetak laporan (tab baru): KOP universitas bila dipilih, parameter yang dipakai, tabel hasil, dan tombol cetak.
|
||
Selalu tema terang; tombol disembunyikan saat dicetak.
|
||
--}}
|
||
<!DOCTYPE html>
|
||
<html lang="id">
|
||
<head>
|
||
<x-layouts.head :title="$title" description="Cetak laporan SIAKAD Universitas Tanjungpura." />
|
||
<script>document.documentElement.dataset.theme = 'light';</script>
|
||
</head>
|
||
<body class="report-print">
|
||
<main id="isi" class="report-print__page">
|
||
<div class="report-print__tools">
|
||
<x-ui.button icon="printer" x-data x-on:click="window.print()">Cetak</x-ui.button>
|
||
</div>
|
||
|
||
@if ($kop)
|
||
<header class="report-print__kop">
|
||
<x-brand.logo size="lg" />
|
||
<div>
|
||
<p class="report-print__kop-org">Universitas Tanjungpura</p>
|
||
<p class="report-print__kop-sub">Sistem Informasi Akademik (SIAKAD)</p>
|
||
</div>
|
||
</header>
|
||
@endif
|
||
|
||
<h1 class="report-print__title">{{ $title }}</h1>
|
||
|
||
@if ($parameters)
|
||
<dl class="report-print__params">
|
||
@foreach ($parameters as $label => $value)
|
||
<div><dt>{{ $label }}</dt><dd>{{ $value }}</dd></div>
|
||
@endforeach
|
||
</dl>
|
||
@endif
|
||
|
||
@foreach ($result->summary as $line)
|
||
<p class="report-print__summary">{{ $line }}</p>
|
||
@endforeach
|
||
@if ($result->note)
|
||
<p class="report-print__summary">{{ $result->note }}</p>
|
||
@endif
|
||
|
||
@if ($result->rows === [])
|
||
<p>Tidak ada data yang cocok dengan parameter ini.</p>
|
||
@else
|
||
<table class="report-print__table">
|
||
<thead>
|
||
<tr>
|
||
<th scope="col" class="num">No.</th>
|
||
@foreach ($result->columns as $c)
|
||
<th scope="col" @class(['num' => $c['num'] ?? false])>{{ $c['label'] }}</th>
|
||
@endforeach
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach ($result->rows as $n => $row)
|
||
<tr @class(['report-print__total' => in_array($n, $result->totals, true)])>
|
||
<td class="num">{{ $n + 1 }}</td>
|
||
@foreach ($result->columns as $c)
|
||
@php $cell = $row[$c['key']] ?? null; @endphp
|
||
<td @class(['num' => $c['num'] ?? false])>{{ $cell === null || $cell === '' ? '–' : $cell }}</td>
|
||
@endforeach
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
@endif
|
||
|
||
<p class="report-print__foot">
|
||
@if ($result->truncated())
|
||
Dicetak {{ number_format(count($result->rows), 0, ',', '.') }} dari {{ number_format($result->count(), 0, ',', '.') }} baris; gunakan {{ $downloadLabel }} untuk data selengkapnya.
|
||
@endif
|
||
Dicetak oleh {{ $operator }} pada {{ now()->translatedFormat('j F Y H:i') }}.
|
||
</p>
|
||
</main>
|
||
</body>
|
||
</html>
|