Avoid mixed-content form submissions behind Coolify by rendering internal links and form actions as relative paths.
119 lines
8.7 KiB
PHP
119 lines
8.7 KiB
PHP
<x-layouts.app :title="$title" :dashboard-layout="true">
|
|
<main class="bg-[#F9FAFB] min-h-screen">
|
|
<div class="dashboard-shell">
|
|
<aside class="dashboard-sidebar">
|
|
<div class="dashboard-sidebar-card">
|
|
<p class="text-xs font-semibold uppercase tracking-[0.18em] text-[#979797]">Menu Mahasiswa</p>
|
|
<div class="mt-4 space-y-1">
|
|
@foreach ($dashboard['menus'] as $menu)
|
|
@if (isset($menu['children']))
|
|
<div class="dashboard-sidebar-group">
|
|
<div class="dashboard-sidebar-group-label">
|
|
<span class="dashboard-sidebar-icon">@include('dashboard.partials.icon', ['icon' => $menu['icon']])</span>
|
|
<span>{{ $menu['title'] }}</span>
|
|
</div>
|
|
<div class="dashboard-sidebar-submenu">
|
|
@foreach ($menu['children'] as $child)
|
|
<a href="{{ $child['href'] }}" class="dashboard-sidebar-link">
|
|
<span class="dashboard-sidebar-icon">@include('dashboard.partials.icon', ['icon' => $child['icon']])</span>
|
|
<span>{{ $child['title'] }}</span>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@else
|
|
<a href="{{ $menu['href'] }}" class="dashboard-sidebar-link {{ !empty($menu['active']) ? 'dashboard-sidebar-link-active' : '' }}">
|
|
<span class="dashboard-sidebar-icon">@include('dashboard.partials.icon', ['icon' => $menu['icon']])</span>
|
|
<span>{{ $menu['title'] }}</span>
|
|
</a>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
<div class="dashboard-content">
|
|
<div class="flex flex-col gap-7.5 rounded-xl bg-white p-4 shadow-[0_8px_12px_rgba(13,10,44,0.04)] lg:flex-row lg:items-center lg:justify-between lg:p-6">
|
|
<div class="lg:max-w-[700px]">
|
|
<span class="mb-4 inline-flex rounded-full bg-[#625DF5]/[0.08] px-3 py-1 text-sm font-medium text-[#625DF5]">{{ $dashboard['eyebrow'] }}</span>
|
|
<h1 class="mb-4 font-bold text-[22px] leading-[30px] text-[#15171A] xl:text-[30px] xl:leading-[38px]">{{ $dashboard['title'] }}</h1>
|
|
<p>{{ $dashboard['description'] }}</p>
|
|
</div>
|
|
<div class="flex flex-wrap items-center gap-3">
|
|
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['nim'] }} · {{ $user['nmprodi'] }}</div>
|
|
<form method="POST" action="{{ route('legacy.logout', [], false) }}">
|
|
@csrf
|
|
<button type="submit" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Logout</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<section id="ringkasan" class="mt-5 grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
|
@foreach ($dashboard['stats'] as $stat)
|
|
<article class="rounded-xl border border-[#E5E7EB] bg-white p-5 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
|
<p class="text-sm font-semibold text-[#5C6A78]">{{ $stat['label'] }}</p>
|
|
<div class="mt-3 flex items-start justify-between gap-4">
|
|
<p class="text-3xl font-bold text-[#15171A]">{{ $stat['value'] }}</p>
|
|
<span class="rounded-md px-3 py-1 text-xs font-semibold {{ $stat['deltaClass'] }}">{{ $stat['delta'] }}</span>
|
|
</div>
|
|
<p class="mt-3 text-sm leading-7">{{ $stat['note'] }}</p>
|
|
</article>
|
|
@endforeach
|
|
</section>
|
|
<div class="mt-6 grid gap-6 lg:grid-cols-[minmax(0,1fr)_380px]">
|
|
<section class="space-y-6">
|
|
<article id="status-usulan" class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
|
<h2 class="text-xl font-semibold text-[#15171A]">Status Usulan</h2>
|
|
@if ($dashboard['latestTitle'])
|
|
<p class="mt-3 text-sm leading-7 text-[#4B5563]">Judul terakhir: {{ $dashboard['latestTitle'] }}</p>
|
|
@endif
|
|
<div class="mt-5 rounded-xl border p-5 {{ $dashboard['statusAlert']['class'] }}">
|
|
<h3 class="text-lg font-semibold">{{ $dashboard['statusAlert']['title'] }}</h3>
|
|
<p class="mt-3 text-sm leading-7">{{ $dashboard['statusAlert']['description'] }}</p>
|
|
@if ($dashboard['statusAlert']['button'])
|
|
<div class="mt-4">
|
|
<a href="{{ $dashboard['statusAlert']['buttonHref'] }}" class="inline-flex rounded-md px-4 py-2.5 text-sm font-medium {{ $dashboard['statusAlert']['buttonClass'] }}">{{ $dashboard['statusAlert']['button'] }}</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</article>
|
|
|
|
<article id="pengumuman" class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
|
<h2 class="text-xl font-semibold text-[#15171A]">Pengumuman</h2>
|
|
<div class="mt-5 rounded-xl border p-5 {{ $dashboard['announcementAlert']['class'] }}">
|
|
<h3 class="text-lg font-semibold">{{ $dashboard['announcementAlert']['title'] }}</h3>
|
|
<p class="mt-3 text-sm leading-7">{{ $dashboard['announcementAlert']['description'] }}</p>
|
|
<div class="mt-4">
|
|
<a href="{{ $dashboard['announcementAlert']['buttonHref'] }}" class="inline-flex rounded-md px-4 py-2.5 text-sm font-medium {{ $dashboard['announcementAlert']['buttonClass'] }}">{{ $dashboard['announcementAlert']['button'] }}</a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
</section>
|
|
|
|
<section id="jadwal" class="space-y-6">
|
|
<article class="rounded-xl border border-[#E5E7EB] bg-white p-6 shadow-[0_8px_12px_rgba(13,10,44,0.04)]">
|
|
<div class="flex items-center justify-between gap-3">
|
|
<div>
|
|
<p class="text-sm font-semibold uppercase tracking-[0.16em] text-[#979797]">Jadwal</p>
|
|
<h2 class="mt-2 text-xl font-semibold text-[#15171A]">Jadwal Terdekat</h2>
|
|
</div>
|
|
<span class="rounded-full border border-[#E5E7EB] bg-[#F9FAFB] px-3 py-1 text-xs font-semibold text-[#4B5563]">{{ $dashboard['publishedSchedules'] }} publikasi</span>
|
|
</div>
|
|
|
|
@if ($dashboard['nextSchedule'])
|
|
<div class="mt-5 rounded-xl border border-sky-200 bg-sky-50 p-5 text-sky-900">
|
|
<p class="text-sm font-semibold uppercase tracking-[0.16em]">{{ $dashboard['nextSchedule']['jenis'] }}</p>
|
|
<p class="mt-3 text-lg font-semibold">{{ $dashboard['nextSchedule']['tanggal'] }}</p>
|
|
<p class="mt-2 text-sm leading-7">Ruangan: {{ $dashboard['nextSchedule']['ruangan'] }}</p>
|
|
</div>
|
|
@else
|
|
<div class="mt-5 rounded-xl border border-dashed border-[#D1D5DB] bg-[#F9FAFB] p-5 text-sm leading-7 text-[#6B7280]">
|
|
Belum ada jadwal seminar yang dipublikasikan untuk mahasiswa ini.
|
|
</div>
|
|
@endif
|
|
</article>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</x-layouts.app>
|