Files
siakad/resources/views/admin/laporan.blade.php
T
2026-10-24 11:45:32 +07:00

69 lines
3.6 KiB
PHP

<x-layouts.app title="Laporan">
<x-ui.page-header
title="Laporan akademik"
:description="'Ringkasan data institusi'.($tahun ? ' untuk '.$tahun['nama'] : '').'. Data tahap prototipe.'"
>
<x-slot:actions>
<div class="flex flex-wrap gap-2" x-data>
<x-ui.button variant="secondary" icon="printer" x-on:click="window.print()">Cetak</x-ui.button>
<x-ui.button icon="arrow-down-tray" x-on:click="window.toast('info', 'Tampilan prototipe: berkas laporan belum dibuat karena basis data belum dibangun.')">Unduh laporan</x-ui.button>
</div>
</x-slot:actions>
</x-ui.page-header>
<div class="stack">
<x-ui.stats>
<x-ui.stat label="Mahasiswa terdaftar" :value="$totalMahasiswa" icon="users" hint="Seluruh program studi" />
<x-ui.stat label="Dosen" :value="$totalDosen" icon="user-group" />
<x-ui.stat label="Program studi" :value="$totalProdi" icon="academic-cap" />
<x-ui.stat label="Mata kuliah" :value="$totalMataKuliah" icon="book-open" />
</x-ui.stats>
<div class="split--even split">
<x-ui.chart title="Mahasiswa per program studi" type="bar" :labels="$prodiLabels" :datasets="[['label' => 'Mahasiswa', 'data' => $prodiData]]" />
<x-ui.chart title="Akreditasi program studi" type="doughnut" :labels="$akreditasiLabels" :datasets="[['label' => 'Program studi', 'data' => $akreditasiData]]" />
</div>
<x-glass.panel as="section" padding="none" aria-labelledby="judul-sebaran">
<div class="panel-title p-6 pb-0">
<h2 id="judul-sebaran">Mahasiswa per program studi dan angkatan</h2>
</div>
<x-ui.table label="Sebaran mahasiswa per program studi dan angkatan">
<table class="table">
<thead>
<tr>
<th scope="col">Program studi</th>
<th scope="col">Jenjang</th>
@foreach ($angkatan as $tahunMasuk)
<th scope="col" class="num">{{ $tahunMasuk }}</th>
@endforeach
<th scope="col" class="num">Total</th>
</tr>
</thead>
<tbody>
@foreach ($sebaran as $baris)
<tr>
<td class="table__title">{{ $baris['prodi'] }}</td>
<td>{{ $baris['jenjang'] }}</td>
@foreach ($angkatan as $tahunMasuk)
<td class="num">{{ number_format($baris['angkatan'][$tahunMasuk], 0, ',', '.') }}</td>
@endforeach
<td class="num table__title">{{ number_format($baris['total'], 0, ',', '.') }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th scope="row" colspan="2">Jumlah</th>
@foreach ($angkatan as $tahunMasuk)
<td class="num table__title">{{ number_format($totalPerAngkatan[$tahunMasuk], 0, ',', '.') }}</td>
@endforeach
<td class="num table__title">{{ number_format($totalMahasiswa, 0, ',', '.') }}</td>
</tr>
</tfoot>
</table>
</x-ui.table>
</x-glass.panel>
</div>
</x-layouts.app>