Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
@php
|
||||
try {
|
||||
$branding = \App\Models\AppSetting::branding();
|
||||
} catch (\Throwable $e) {
|
||||
$branding = \App\Models\AppSetting::brandingDefaults();
|
||||
}
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ $branding['app_name'] ?? config('app.name', 'Database Kesiswaan') }}</title>
|
||||
|
||||
@if (!empty($branding['app_favicon']))
|
||||
<link rel="icon" type="image/png" href="{{ asset('storage/' . $branding['app_favicon']) }}">
|
||||
@endif
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
</head>
|
||||
<body class="bg-slate-50 font-sans antialiased text-slate-900">
|
||||
@include('sweetalert::alert')
|
||||
@include('layouts.navigation')
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
@php
|
||||
try {
|
||||
$branding = \App\Models\AppSetting::branding();
|
||||
} catch (\Throwable $e) {
|
||||
$branding = \App\Models\AppSetting::brandingDefaults();
|
||||
}
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ $branding['app_name'] ?? config('app.name', 'Database Kesiswaan') }}</title>
|
||||
|
||||
@if (!empty($branding['app_favicon']))
|
||||
<link rel="icon" type="image/png" href="{{ asset('storage/' . $branding['app_favicon']) }}">
|
||||
@endif
|
||||
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
|
||||
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
</head>
|
||||
<body class="min-h-screen bg-slate-100 font-sans antialiased text-slate-900">
|
||||
<div class="relative min-h-screen overflow-hidden bg-[radial-gradient(circle_at_top_left,_rgba(99,102,241,0.18),_transparent_35%),radial-gradient(circle_at_bottom_right,_rgba(14,165,233,0.15),_transparent_30%)]">
|
||||
<div class="absolute inset-0 bg-[linear-gradient(to_bottom,_rgba(255,255,255,0.55),_rgba(248,250,252,0.9))]"></div>
|
||||
|
||||
<div class="relative mx-auto flex min-h-screen max-w-7xl items-center px-4 py-10 sm:px-6 lg:px-8">
|
||||
<div class="grid w-full grid-cols-1 gap-8 lg:grid-cols-[1.1fr_520px] lg:items-center">
|
||||
<div class="hidden lg:block">
|
||||
<div class="max-w-xl">
|
||||
<div class="inline-flex items-center gap-3 rounded-full border border-indigo-100 bg-white/80 px-4 py-2 shadow-sm shadow-slate-200/60 backdrop-blur">
|
||||
<div class="flex h-9 w-9 items-center justify-center overflow-hidden rounded-2xl bg-indigo-600 text-sm font-bold text-white shadow-lg shadow-indigo-200">
|
||||
@if (!empty($branding['app_logo']))
|
||||
<img src="{{ asset('storage/' . $branding['app_logo']) }}" alt="{{ $branding['app_name'] }}" class="h-full w-full object-contain bg-white p-1">
|
||||
@else
|
||||
{{ $branding['app_short_name'] ?? 'DK' }}
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm font-semibold text-slate-900">{{ $branding['app_name'] ?? 'Database Kesiswaan' }}</div>
|
||||
<div class="text-xs text-slate-500">Sistem Administrasi Sekolah</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 class="mt-8 text-4xl font-bold leading-tight text-slate-900">
|
||||
Kelola data siswa, dokumen sekolah, dan proses kenaikan kelas dalam satu panel administrasi yang tertata.
|
||||
</h1>
|
||||
<p class="mt-4 text-base leading-7 text-slate-600">
|
||||
Masuk ke sistem untuk mengelola master data, verifikasi dokumen siswa, histori akademik, dan proses kenaikan kelas dengan alur kerja yang lebih nyaman.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full">
|
||||
<div class="overflow-hidden rounded-[32px] border border-white/80 bg-white/95 shadow-[0_30px_80px_-35px_rgba(15,23,42,0.35)] backdrop-blur">
|
||||
<div class="border-b border-slate-100 bg-gradient-to-r from-indigo-50 via-white to-sky-50 px-6 py-6 sm:px-8">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-3xl bg-indigo-600 text-lg font-bold text-white shadow-lg shadow-indigo-200">
|
||||
@if (!empty($branding['app_logo']))
|
||||
<img src="{{ asset('storage/' . $branding['app_logo']) }}" alt="{{ $branding['app_name'] }}" class="h-full w-full object-contain bg-white p-2">
|
||||
@else
|
||||
{{ $branding['app_short_name'] ?? 'DK' }}
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm font-semibold uppercase tracking-[0.18em] text-indigo-500">Login Admin</div>
|
||||
<h1 class="mt-1 text-2xl font-bold text-slate-900">Masuk ke {{ $branding['app_name'] ?? 'Database Kesiswaan' }}</h1>
|
||||
<p class="mt-1 text-sm text-slate-500">Gunakan akun administrator untuk mengakses panel.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="px-6 py-6 sm:px-8 sm:py-8">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,48 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold leading-tight text-slate-900">{{ $title }}</h2>
|
||||
@isset($description)
|
||||
<p class="mt-1 text-sm text-slate-500">{{ $description }}</p>
|
||||
@endisset
|
||||
</div>
|
||||
|
||||
@isset($actionLabel)
|
||||
<button type="button" class="inline-flex items-center rounded-xl bg-slate-900 px-4 py-2.5 text-sm font-medium text-white transition hover:bg-slate-800">
|
||||
{{ $actionLabel }}
|
||||
</button>
|
||||
@endisset
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<div>
|
||||
<div class="overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-sm shadow-slate-200/50">
|
||||
<div class="border-b border-slate-200 px-6 py-5">
|
||||
<div class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<div class="text-sm font-semibold text-slate-800">Halaman sedang disiapkan</div>
|
||||
<p class="mt-1 text-sm text-slate-500">
|
||||
Struktur route, layout, dan navigasi sudah aktif. Berikutnya tinggal implementasi CRUD penuh untuk modul ini.
|
||||
</p>
|
||||
</div>
|
||||
<span class="inline-flex rounded-full bg-indigo-50 px-4 py-2 text-xs font-semibold text-indigo-700">TailAdmin Inspired</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6">
|
||||
<div class="rounded-3xl border border-dashed border-slate-300 bg-slate-50 p-10 text-center">
|
||||
<div class="mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-indigo-100 text-indigo-700">
|
||||
<svg class="h-7 w-7" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 5v14M5 12h14" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="mt-5 text-lg font-semibold text-slate-800">{{ $title }}</div>
|
||||
<p class="mx-auto mt-2 max-w-2xl text-sm leading-6 text-slate-500">
|
||||
Placeholder aktif. Bro bisa lanjut langsung membuat tabel data, form tambah/edit, validasi, pencarian, pagination, dan aksi simpan/hapus dengan gaya UI yang konsisten.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,342 @@
|
||||
@php
|
||||
$user = auth()->user();
|
||||
$isAdmin = $user && method_exists($user, 'isAdmin') ? $user->isAdmin() : false;
|
||||
try {
|
||||
$branding = \App\Models\AppSetting::branding();
|
||||
} catch (\Throwable $e) {
|
||||
$branding = \App\Models\AppSetting::brandingDefaults();
|
||||
}
|
||||
|
||||
$masterDataOpen = request()->routeIs('academic-years.*')
|
||||
|| request()->routeIs('departments.*')
|
||||
|| request()->routeIs('classes.*')
|
||||
|| request()->routeIs('document-types.*');
|
||||
|
||||
$kesiswaanOpen = request()->routeIs('students.*')
|
||||
|| request()->routeIs('student-exits.*')
|
||||
|| request()->routeIs('student-transfers.*')
|
||||
|| request()->routeIs('student-promotions.*')
|
||||
|| request()->routeIs('student-self-service.*');
|
||||
|
||||
$settingsOpen = request()->routeIs('settings.*');
|
||||
@endphp
|
||||
|
||||
<div x-data="{ sidebarOpen: false, masterDataOpen: @js($masterDataOpen), kesiswaanOpen: @js($kesiswaanOpen), settingsOpen: @js($settingsOpen), profileMenuOpen: false }" class="min-h-screen bg-slate-50">
|
||||
<div
|
||||
x-show="sidebarOpen"
|
||||
x-transition.opacity
|
||||
class="fixed inset-0 z-40 bg-slate-900/50 lg:hidden"
|
||||
@click="sidebarOpen = false"
|
||||
></div>
|
||||
|
||||
<aside
|
||||
:class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'"
|
||||
class="fixed left-0 top-0 z-50 flex h-screen w-72 flex-col border-r border-slate-200 bg-white transition-transform duration-300 lg:translate-x-0"
|
||||
>
|
||||
<div class="flex h-20 items-center justify-between border-b border-slate-200 px-6">
|
||||
<a href="{{ route('dashboard') }}" class="flex items-center gap-3">
|
||||
<div class="flex h-12 w-12 items-center justify-center overflow-hidden rounded-2xl bg-indigo-600 text-base font-bold text-white shadow-lg shadow-indigo-200">
|
||||
@if (!empty($branding['app_logo']))
|
||||
<img src="{{ asset('storage/' . $branding['app_logo']) }}" alt="{{ $branding['app_name'] }}" class="h-full w-full object-contain bg-white p-2">
|
||||
@else
|
||||
{{ $branding['app_short_name'] ?? 'DK' }}
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm font-semibold text-slate-900">{{ $branding['app_name'] ?? 'Database Kesiswaan' }}</div>
|
||||
<div class="text-xs text-slate-500">Admin Dashboard</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<button @click="sidebarOpen = false" class="rounded-lg p-2 text-slate-500 hover:bg-slate-100 lg:hidden">
|
||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-y-auto px-4 py-6">
|
||||
<div class="mb-6 px-3">
|
||||
<p class="text-[11px] font-semibold uppercase tracking-[0.2em] text-slate-400">Menu Utama</p>
|
||||
</div>
|
||||
|
||||
<nav class="space-y-2">
|
||||
<a href="{{ route('dashboard') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('dashboard') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-600 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<span class="inline-flex h-9 w-9 items-center justify-center rounded-lg {{ request()->routeIs('dashboard') ? 'bg-indigo-100 text-indigo-700' : 'bg-slate-100 text-slate-500' }}">
|
||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M3 10.5L12 3l9 7.5V21a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1v-10.5Z" />
|
||||
</svg>
|
||||
</span>
|
||||
<span>Dashboard</span>
|
||||
</a>
|
||||
|
||||
@if ($isAdmin)
|
||||
<div class="space-y-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="masterDataOpen = !masterDataOpen"
|
||||
class="flex w-full items-center justify-between rounded-xl px-4 py-3 text-sm font-medium transition {{ $masterDataOpen ? 'bg-indigo-50 text-indigo-700' : 'text-slate-600 hover:bg-slate-100 hover:text-slate-900' }}"
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="inline-flex h-9 w-9 items-center justify-center rounded-lg {{ $masterDataOpen ? 'bg-indigo-100 text-indigo-700' : 'bg-slate-100 text-slate-500' }}">
|
||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 7.5A1.5 1.5 0 0 1 5.5 6h13A1.5 1.5 0 0 1 20 7.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 16.5v-9Z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8 10h8M8 14h5" />
|
||||
</svg>
|
||||
</span>
|
||||
<span>Master Data</span>
|
||||
</div>
|
||||
<svg class="h-4 w-4 transition-transform" :class="masterDataOpen ? 'rotate-180' : ''" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m6 9 6 6 6-6" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div x-show="masterDataOpen" x-collapse class="space-y-1 pl-4">
|
||||
<a href="{{ route('academic-years.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('academic-years.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8 3v3M16 3v3M4 9h16M5.5 5.5h13A1.5 1.5 0 0 1 20 7v11.5A1.5 1.5 0 0 1 18.5 20h-13A1.5 1.5 0 0 1 4 18.5V7A1.5 1.5 0 0 1 5.5 5.5Z" />
|
||||
</svg>
|
||||
<span>Tahun Angkatan</span>
|
||||
</a>
|
||||
<a href="{{ route('departments.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('departments.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 19h16M6 19V9l6-4 6 4v10M10 13h4M10 16h4" />
|
||||
</svg>
|
||||
<span>Program Keahlian</span>
|
||||
</a>
|
||||
<a href="{{ route('classes.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('classes.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M3 7.5 12 3l9 4.5-9 4.5-9-4.5Zm3 4.5v4.5c0 .7 2.7 2.5 6 2.5s6-1.8 6-2.5V12" />
|
||||
</svg>
|
||||
<span>Kelas</span>
|
||||
</a>
|
||||
<a href="{{ route('document-types.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('document-types.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8 3.5h6l4 4V20a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1Z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M14 3.5V8h4" />
|
||||
</svg>
|
||||
<span>Jenis Dokumen</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="space-y-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="kesiswaanOpen = !kesiswaanOpen"
|
||||
class="flex w-full items-center justify-between rounded-xl px-4 py-3 text-sm font-medium transition {{ $kesiswaanOpen ? 'bg-indigo-50 text-indigo-700' : 'text-slate-600 hover:bg-slate-100 hover:text-slate-900' }}"
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="inline-flex h-9 w-9 items-center justify-center rounded-lg {{ $kesiswaanOpen ? 'bg-indigo-100 text-indigo-700' : 'bg-slate-100 text-slate-500' }}">
|
||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM4 20a6 6 0 1 1 12 0" />
|
||||
</svg>
|
||||
</span>
|
||||
<span>Kesiswaan</span>
|
||||
</div>
|
||||
<svg class="h-4 w-4 transition-transform" :class="kesiswaanOpen ? 'rotate-180' : ''" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m6 9 6 6 6-6" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div x-show="kesiswaanOpen" x-collapse class="space-y-1 pl-4">
|
||||
<a href="{{ route('students.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('students.index') || request()->routeIs('students.create') || request()->routeIs('students.edit') || request()->routeIs('students.show') || request()->routeIs('students.import.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM4 20a6 6 0 1 1 12 0" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M18 9a3 3 0 0 1 0 6m-1 5a5 5 0 0 0-3-4.58" />
|
||||
</svg>
|
||||
<span>Data Siswa</span>
|
||||
</a>
|
||||
<a href="{{ route('student-exits.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('student-exits.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M17 7 7 17" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M7 7h10v10" />
|
||||
</svg>
|
||||
<span>Data Siswa Keluar</span>
|
||||
</a>
|
||||
<a href="{{ route('student-transfers.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('student-transfers.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 12h11" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m11 5 7 7-7 7" />
|
||||
</svg>
|
||||
<span>Data Siswa Mutasi</span>
|
||||
</a>
|
||||
<a href="{{ route('students.graduated') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('students.graduated') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M3 9.5 12 5l9 4.5-9 4.5-9-4.5Z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M7 12.5v3.5c0 .8 2.2 2.5 5 2.5s5-1.7 5-2.5v-3.5" />
|
||||
</svg>
|
||||
<span>Data Siswa Lulus</span>
|
||||
</a>
|
||||
<a href="{{ route('student-promotions.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('student-promotions.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M7 17 17 7M9 7h8v8" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M5 12v7h7" />
|
||||
</svg>
|
||||
<span>Kenaikan Kelas</span>
|
||||
</a>
|
||||
<a href="{{ route('student-self-service.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('student-self-service.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 4v16" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 12h16" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M7.5 7.5h9v9h-9z" />
|
||||
</svg>
|
||||
<span>Self Servis Siswa</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($isAdmin)
|
||||
<div class="space-y-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="settingsOpen = !settingsOpen"
|
||||
class="flex w-full items-center justify-between rounded-xl px-4 py-3 text-sm font-medium transition {{ $settingsOpen ? 'bg-indigo-50 text-indigo-700' : 'text-slate-600 hover:bg-slate-100 hover:text-slate-900' }}"
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="inline-flex h-9 w-9 items-center justify-center rounded-lg {{ $settingsOpen ? 'bg-indigo-100 text-indigo-700' : 'bg-slate-100 text-slate-500' }}">
|
||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M11.25 3h1.5l.62 2.18a7.52 7.52 0 0 1 1.78.74l2.05-.98 1.06 1.06-.98 2.05c.29.56.54 1.16.74 1.78L21 11.25v1.5l-2.18.62a7.52 7.52 0 0 1-.74 1.78l.98 2.05-1.06 1.06-2.05-.98a7.52 7.52 0 0 1-1.78.74L12.75 21h-1.5l-.62-2.18a7.52 7.52 0 0 1-1.78-.74l-2.05.98-1.06-1.06.98-2.05a7.52 7.52 0 0 1-.74-1.78L3 12.75v-1.5l2.18-.62c.2-.62.45-1.22.74-1.78l-.98-2.05 1.06-1.06 2.05.98c.56-.29 1.16-.54 1.78-.74L11.25 3Z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
||||
</svg>
|
||||
</span>
|
||||
<span>Pengaturan</span>
|
||||
</div>
|
||||
<svg class="h-4 w-4 transition-transform" :class="settingsOpen ? 'rotate-180' : ''" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m6 9 6 6 6-6" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div x-show="settingsOpen" x-collapse class="space-y-1 pl-4">
|
||||
<a href="{{ route('settings.users.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('settings.users.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM4 20a6 6 0 1 1 12 0" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M19 8v6M22 11h-6" />
|
||||
</svg>
|
||||
<span>Manajemen Pengguna</span>
|
||||
</a>
|
||||
<a href="{{ route('settings.branding.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('settings.branding.*') ? 'bg-indigo-50 text-indigo-700' : 'text-slate-500 hover:bg-slate-100 hover:text-slate-900' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 3l2.7 5.46 6.03.88-4.36 4.25 1.03 6.01L12 16.77 6.6 19.6l1.03-6.01L3.27 9.34l6.03-.88L12 3Z" />
|
||||
</svg>
|
||||
<span>Branding Aplikasi</span>
|
||||
</a>
|
||||
<a href="{{ route('settings.reset-data.index') }}"
|
||||
class="flex items-center gap-3 rounded-xl px-4 py-3 text-sm font-medium transition {{ request()->routeIs('settings.reset-data.*') ? 'bg-rose-50 text-rose-700' : 'text-slate-500 hover:bg-rose-50 hover:text-rose-700' }}">
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M6 7h12M9 7V5.5A1.5 1.5 0 0 1 10.5 4h3A1.5 1.5 0 0 1 15 5.5V7m-8 0 1 12a1.5 1.5 0 0 0 1.5 1.5h5A1.5 1.5 0 0 0 16 19l1-12" />
|
||||
</svg>
|
||||
<span>Kosongkan Data</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="mt-auto border-t border-slate-200 px-4 py-3">
|
||||
<div class="text-center">
|
||||
<span class="text-[10px] font-semibold uppercase tracking-[0.22em] text-slate-400">Developed by</span>
|
||||
<a href="https://noctkj.net" target="_blank" rel="noopener noreferrer" class="mt-1 block text-sm font-semibold tracking-[0.04em] text-slate-700 transition hover:text-indigo-600">
|
||||
noctkj.net
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="lg:pl-72">
|
||||
<header class="sticky top-0 z-30 border-b border-slate-200 bg-white/80 backdrop-blur-xl">
|
||||
<div class="flex h-20 items-center justify-between px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex items-center gap-3">
|
||||
<button @click="sidebarOpen = true" class="inline-flex h-11 w-11 items-center justify-center rounded-xl border border-slate-200 bg-white text-slate-500 shadow-sm lg:hidden">
|
||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 6h16M4 12h16M4 18h16" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-[0.2em] text-slate-400">Panel Admin</p>
|
||||
<h1 class="text-lg font-semibold text-slate-900">{{ $branding['app_name'] ?? 'Database Kesiswaan' }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="relative" @click.away="profileMenuOpen = false">
|
||||
@php
|
||||
$currentUser = auth()->user();
|
||||
$currentUserName = data_get($currentUser, 'name', 'User');
|
||||
$currentUserEmail = data_get($currentUser, 'email', '-');
|
||||
$currentUserInitial = strtoupper(substr((string) $currentUserName, 0, 1)) ?: 'U';
|
||||
@endphp
|
||||
|
||||
<button
|
||||
type="button"
|
||||
@click="profileMenuOpen = !profileMenuOpen"
|
||||
class="flex items-center gap-3 rounded-2xl border border-slate-200 bg-white px-3 py-2 shadow-sm transition hover:border-indigo-200 hover:bg-slate-50"
|
||||
>
|
||||
<div class="hidden text-right md:block">
|
||||
<div class="text-sm font-semibold text-slate-800">{{ $currentUserName }}</div>
|
||||
<div class="text-xs text-slate-500">{{ $isAdmin ? 'Administrator' : 'Staff' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="flex h-11 w-11 items-center justify-center rounded-full bg-indigo-100 text-sm font-bold text-indigo-700">
|
||||
{{ $currentUserInitial }}
|
||||
</div>
|
||||
|
||||
<svg class="hidden h-4 w-4 text-slate-400 transition-transform md:block" :class="profileMenuOpen ? 'rotate-180' : ''" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m6 9 6 6 6-6" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div
|
||||
x-show="profileMenuOpen"
|
||||
x-transition.origin.top.right
|
||||
class="absolute right-0 z-50 mt-3 w-60 overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl shadow-slate-200/70"
|
||||
>
|
||||
<div class="border-b border-slate-100 px-4 py-4">
|
||||
<div class="text-sm font-semibold text-slate-800">{{ $currentUserName }}</div>
|
||||
<div class="mt-1 text-xs text-slate-500">{{ $currentUserEmail }}</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<a href="{{ route('profile.edit') }}" class="flex items-center rounded-xl px-3 py-3 text-sm font-medium text-slate-700 transition hover:bg-slate-50 hover:text-indigo-700">
|
||||
Profil Administrator
|
||||
</a>
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button type="submit" class="flex w-full items-center rounded-xl px-3 py-3 text-sm font-medium text-rose-600 transition hover:bg-rose-50">
|
||||
Logout
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="px-4 py-6 sm:px-6 lg:px-8">
|
||||
@isset($header)
|
||||
<div class="mb-6 rounded-2xl border border-slate-200 bg-white px-6 py-5 shadow-sm">
|
||||
{{ $header }}
|
||||
</div>
|
||||
@endisset
|
||||
|
||||
{{ $slot }}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user