Deploy Laravel rebuild via Coolify
Point Docker and Coolify compose to the Laravel rebuild app so mahasiswa, dosen, and admin flows are served from the new Laravel public entrypoint.
This commit is contained in:
92
rebuild/app/Support/AdminNavigation.php
Normal file
92
rebuild/app/Support/AdminNavigation.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
class AdminNavigation
|
||||
{
|
||||
public static function build(array $user): array
|
||||
{
|
||||
$isSuper = ($user['lvl'] ?? null) === 'S';
|
||||
|
||||
$sections = [
|
||||
[
|
||||
'title' => 'Manajemen Data',
|
||||
'icon' => 'folder',
|
||||
'items' => $isSuper ? [
|
||||
self::page('Data Fakultas', 'admin.data.fakultas', 'document'),
|
||||
self::page('Data Jurusan', 'admin.data.jurusan', 'document'),
|
||||
self::page('Data Program Studi', 'admin.data.prodi', 'document'),
|
||||
] : [
|
||||
self::page('Data Mahasiswa', 'admin.data.mahasiswa', 'users'),
|
||||
self::page('Data Dosen', 'admin.data.dosen', 'users'),
|
||||
self::page('Data Kelompok Keahlian', 'admin.data.kk', 'folder'),
|
||||
],
|
||||
],
|
||||
[
|
||||
'title' => 'User',
|
||||
'icon' => 'user',
|
||||
'items' => array_values(array_filter([
|
||||
self::page('Profil Saya', 'admin.profile', 'user'),
|
||||
$isSuper ? self::page('Manajemen Admin', 'admin.users', 'users') : null,
|
||||
])),
|
||||
],
|
||||
[
|
||||
'title' => 'Lainnya',
|
||||
'icon' => 'briefcase',
|
||||
'items' => [
|
||||
['title' => 'Dokumen Sidang', 'href' => 'https://edoxid.untan.ac.id/', 'icon' => 'document', 'external' => true],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
if (! $isSuper) {
|
||||
array_splice($sections, 1, 0, [[
|
||||
'title' => 'Praoutline',
|
||||
'icon' => 'clipboard',
|
||||
'items' => [
|
||||
self::page('Daftar Draft Praoutline', 'admin.praoutline.index', 'document'),
|
||||
self::page('Pencarian', 'admin.praoutline.search', 'search'),
|
||||
self::page('Kep. Penunjukan Dosen', 'admin.praoutline.keputusan', 'clipboard'),
|
||||
self::page('Kep. Draft Praoutline', 'admin.praoutline.kep-draft', 'clipboard'),
|
||||
self::page('Pemberitahuan', 'admin.praoutline.pemberitahuan', 'bell'),
|
||||
],
|
||||
], [
|
||||
'title' => 'Pengumuman',
|
||||
'icon' => 'megaphone',
|
||||
'items' => [
|
||||
self::page('Daftar Pengumuman', 'admin.pengumuman.index', 'megaphone'),
|
||||
self::page('Buat Pengumuman Baru', 'admin.pengumuman.create', 'document'),
|
||||
],
|
||||
], [
|
||||
'title' => 'Jadwal Seminar/Sidang',
|
||||
'icon' => 'clock',
|
||||
'items' => [
|
||||
self::page('Manajemen Data', 'admin.jadwal.index', 'document'),
|
||||
self::page('Kalender', 'admin.jadwal.kalender', 'clock'),
|
||||
],
|
||||
], [
|
||||
'title' => 'Pengaturan',
|
||||
'icon' => 'warning',
|
||||
'items' => [
|
||||
self::page('Pengaturan Prodi', 'admin.pengaturan', 'warning'),
|
||||
],
|
||||
]]);
|
||||
}
|
||||
|
||||
return [
|
||||
'main' => [
|
||||
['title' => 'Dashboard', 'href' => route('dashboard.admin'), 'icon' => 'home', 'active' => true],
|
||||
],
|
||||
'sections' => $sections,
|
||||
];
|
||||
}
|
||||
|
||||
private static function page(string $title, string $route, string $icon): array
|
||||
{
|
||||
return [
|
||||
'title' => $title,
|
||||
'href' => route($route, [], false),
|
||||
'icon' => $icon,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user