93 lines
6.4 KiB
PHP
93 lines
6.4 KiB
PHP
{{--
|
||
Setting Prodi (akun DB lama): filter Periode + Unit/Prodi (formulir GET, dimuat di tempat), tabel pohon
|
||
fakultas > jurusan > prodi dengan kolom katalog SATU. Kurikulum mahasiswa baru = pilihan kurikulum prodi (aktif terpilih);
|
||
kolom centang dari tabel periode DB lama; kolom tanpa sumber "–". Hanya baca: ubahan hanya memberi notifikasi.
|
||
--}}
|
||
@php
|
||
$checks = [
|
||
['key' => 'biodata', 'label' => 'Biodata'], ['key' => 'krs', 'label' => 'KRS'], ['key' => null, 'label' => 'Validasi KRS'], ['key' => null, 'label' => 'Cetak KRS'],
|
||
['key' => null, 'label' => 'KHS'], ['key' => 'nilai', 'label' => 'Pengisian Nilai'], ['key' => null, 'label' => 'Pengisian Kuesioner'], ['key' => null, 'label' => 'Dosen Generate Pertemuan'],
|
||
];
|
||
$readonly = "window.toast('info', 'Pengaturan belum bisa diubah dari halaman ini.')";
|
||
@endphp
|
||
|
||
<x-satu.frame :page="$page" :crumbs="$crumbs" :note="$note">
|
||
<x-glass.panel padding="sm" as="section" aria-label="Filter data">
|
||
<form method="GET" action="{{ route('operator.halaman', $page['slug']) }}" class="filter-bar" x-data x-on:change="$el.requestSubmit()">
|
||
<x-form.select name="periode" :label="$labels['periode']" :options="$periods->all()" :value="$values['periode']" placeholder="" data-no-clear />
|
||
<x-form.select name="unit" :label="$labels['unit']" :options="$units" :value="$values['unit']" placeholder="-- Semua Unit --" />
|
||
<noscript><x-ui.button type="submit" variant="secondary" size="sm">Tampilkan</x-ui.button></noscript>
|
||
</form>
|
||
</x-glass.panel>
|
||
|
||
@if (! $ready)
|
||
<x-glass.panel padding="lg" as="section" aria-label="Setting program studi">
|
||
<x-ui.empty icon="building-library" title="Akun belum terhubung ke program studi" description="Setting prodi tampil setelah akun Anda dipetakan ke program studi oleh Pusat Komputer." />
|
||
</x-glass.panel>
|
||
@else
|
||
<x-glass.panel padding="none" as="section" :aria-label="'Daftar '.$page['title']">
|
||
<x-ui.table label="Setting program studi">
|
||
<table class="table satu-table setting-table" x-data>
|
||
<thead>
|
||
<tr>
|
||
<th scope="col">Program Studi</th>
|
||
<th scope="col">Kurikulum Mahasiswa Baru</th>
|
||
@foreach ($checks as $c)
|
||
<th scope="col" class="setting-table__check">{{ $c['label'] }}</th>
|
||
@endforeach
|
||
<th scope="col" class="table__actions"><span class="visually-hidden">Aksi</span></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach ($tree as $fak)
|
||
<tr class="setting-table__unit">
|
||
<th scope="row" colspan="{{ 3 + count($checks) }}">{{ $fak['nama'] }}</th>
|
||
</tr>
|
||
@foreach ($fak['jurusan'] as $jur)
|
||
@if ($jur['nama'] !== null)
|
||
<tr class="setting-table__unit setting-table__unit--jurusan">
|
||
<th scope="row" colspan="{{ 3 + count($checks) }}">Jurusan {{ $jur['nama'] }}</th>
|
||
</tr>
|
||
@endif
|
||
@foreach ($jur['prodi'] as $prodi)
|
||
<tr>
|
||
<td class="table__title setting-table__prodi">{{ $prodi['nama'] }}</td>
|
||
<td>
|
||
@if ($prodi['kurikulum'] === [])
|
||
<span class="kv__muted">–</span>
|
||
@else
|
||
<label class="visually-hidden" for="kurikulum-{{ $prodi['id'] }}">Kurikulum mahasiswa baru {{ $prodi['nama'] }}</label>
|
||
<select id="kurikulum-{{ $prodi['id'] }}" class="field__input field__select setting-table__select" data-no-select2 x-on:change="{{ $readonly }}; $event.target.value = '{{ $prodi['kurikulum_aktif'] ?? '' }}'">
|
||
<option value="" @selected($prodi['kurikulum_aktif'] === null)>–</option>
|
||
@foreach ($prodi['kurikulum'] as $k)
|
||
<option value="{{ $k['id'] }}" @selected($k['id'] === $prodi['kurikulum_aktif'])>{{ $k['nama'] }}</option>
|
||
@endforeach
|
||
</select>
|
||
@endif
|
||
</td>
|
||
@foreach ($checks as $c)
|
||
<td class="setting-table__check">
|
||
@if ($c['key'] === null)
|
||
<span class="kv__muted" aria-label="{{ $c['label'] }} tidak tercatat">–</span>
|
||
@else
|
||
<input type="checkbox" class="check__input" aria-label="{{ $c['label'] }} {{ $prodi['nama'] }}" @checked($prodi[$c['key']]) x-on:change="{{ $readonly }}; $event.target.checked = {{ $prodi[$c['key']] ? 'true' : 'false' }}">
|
||
@endif
|
||
</td>
|
||
@endforeach
|
||
<td class="table__actions">
|
||
<a class="btn btn--ghost btn--sm btn--icon" href="{{ route('operator.setting-prodi.show', ['id' => $prodi['id'], 'periode' => $values['periode']]) }}" aria-label="Lihat {{ $prodi['nama'] }}"><x-heroicon-o-eye /></a>
|
||
</td>
|
||
</tr>
|
||
@endforeach
|
||
@endforeach
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
</x-ui.table>
|
||
@if ($tree === [])
|
||
<p class="satu-empty">Tidak ada program studi pada unit terpilih.</p>
|
||
@endif
|
||
</x-glass.panel>
|
||
@endif
|
||
</x-satu.frame>
|