134 lines
5.9 KiB
PHP
134 lines
5.9 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
|
|
<head>
|
|
@include('partials.head')
|
|
</head>
|
|
<body class="min-h-screen bg-white dark:bg-zinc-800">
|
|
<flux:sidebar sticky collapsible="mobile" class="border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
|
|
<flux:sidebar.header>
|
|
<x-app-logo :sidebar="true" href="{{ route('dashboard') }}" wire:navigate />
|
|
<flux:sidebar.collapse class="lg:hidden" />
|
|
</flux:sidebar.header>
|
|
|
|
@php
|
|
$adminEmail = trim((string) config('lodge.admin_email', ''));
|
|
$isLodgeAdmin = auth()->check()
|
|
&& $adminEmail !== ''
|
|
&& strcasecmp(trim((string) auth()->user()->email), $adminEmail) === 0;
|
|
@endphp
|
|
|
|
<flux:sidebar.nav>
|
|
@if ($isLodgeAdmin)
|
|
<flux:sidebar.group heading="Overview" class="grid">
|
|
@if (Route::has('admin.dashboard'))
|
|
<flux:sidebar.item icon="home" :href="route('admin.dashboard')" :current="request()->routeIs('admin.dashboard')">Dashboard</flux:sidebar.item>
|
|
@endif
|
|
</flux:sidebar.group>
|
|
|
|
<flux:sidebar.group heading="Reservations" class="grid">
|
|
@if (Route::has('lodge.admin'))
|
|
<flux:sidebar.item icon="calendar" :href="route('lodge.admin')" :current="request()->routeIs('lodge.admin')">Bookings</flux:sidebar.item>
|
|
@endif
|
|
@if (Route::has('lodge.availability'))
|
|
<flux:sidebar.item icon="clock" :href="route('lodge.availability')">Availability</flux:sidebar.item>
|
|
@endif
|
|
</flux:sidebar.group>
|
|
|
|
<flux:sidebar.group heading="Lodge Management" class="grid">
|
|
@if (Route::has('admin.photos'))
|
|
<flux:sidebar.item icon="photo" :href="route('admin.photos')" :current="request()->routeIs('admin.photos')">Photo Gallery</flux:sidebar.item>
|
|
@endif
|
|
</flux:sidebar.group>
|
|
|
|
<flux:sidebar.group heading="System" class="grid">
|
|
@if (Route::has('admin.modules.index'))
|
|
<flux:sidebar.item icon="squares-2x2" :href="route('admin.modules.index')" :current="request()->routeIs('admin.modules.*')">Modules</flux:sidebar.item>
|
|
@elseif (Route::has('modules.index'))
|
|
<flux:sidebar.item icon="squares-2x2" :href="route('modules.index')">Modules</flux:sidebar.item>
|
|
@endif
|
|
</flux:sidebar.group>
|
|
@endif
|
|
|
|
<flux:sidebar.group heading="Account" class="grid">
|
|
@if (Route::has('profile.edit'))
|
|
<flux:sidebar.item icon="cog" :href="route('profile.edit')" :current="request()->routeIs('profile.edit')">Profile Settings</flux:sidebar.item>
|
|
@endif
|
|
</flux:sidebar.group>
|
|
</flux:sidebar.nav>
|
|
|
|
<flux:spacer />
|
|
|
|
<flux:sidebar.nav>
|
|
<flux:sidebar.item icon="home" :href="url('/')">View Website</flux:sidebar.item>
|
|
</flux:sidebar.nav>
|
|
|
|
<x-desktop-user-menu class="hidden lg:block" :name="auth()->user()->name" />
|
|
</flux:sidebar>
|
|
|
|
<!-- Mobile User Menu -->
|
|
<flux:header class="lg:hidden">
|
|
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />
|
|
|
|
<flux:spacer />
|
|
|
|
<flux:dropdown position="top" align="end">
|
|
<flux:profile
|
|
:initials="auth()->user()->initials()"
|
|
icon-trailing="chevron-down"
|
|
/>
|
|
|
|
<flux:menu>
|
|
<flux:menu.radio.group>
|
|
<div class="p-0 text-sm font-normal">
|
|
<div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm">
|
|
<flux:avatar
|
|
:name="auth()->user()->name"
|
|
:initials="auth()->user()->initials()"
|
|
/>
|
|
|
|
<div class="grid flex-1 text-start text-sm leading-tight">
|
|
<flux:heading class="truncate">{{ auth()->user()->name }}</flux:heading>
|
|
<flux:text class="truncate">{{ auth()->user()->email }}</flux:text>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</flux:menu.radio.group>
|
|
|
|
<flux:menu.separator />
|
|
|
|
<flux:menu.radio.group>
|
|
<flux:menu.item :href="route('profile.edit')" icon="cog" wire:navigate>
|
|
{{ __('Settings') }}
|
|
</flux:menu.item>
|
|
</flux:menu.radio.group>
|
|
|
|
<flux:menu.separator />
|
|
|
|
<form method="POST" action="{{ route('logout') }}" class="w-full">
|
|
@csrf
|
|
<flux:menu.item
|
|
as="button"
|
|
type="submit"
|
|
icon="arrow-right-start-on-rectangle"
|
|
class="w-full cursor-pointer"
|
|
data-test="logout-button"
|
|
>
|
|
{{ __('Log out') }}
|
|
</flux:menu.item>
|
|
</form>
|
|
</flux:menu>
|
|
</flux:dropdown>
|
|
</flux:header>
|
|
|
|
{{ $slot }}
|
|
|
|
@persist('toast')
|
|
<flux:toast.group>
|
|
<flux:toast />
|
|
</flux:toast.group>
|
|
@endpersist
|
|
|
|
@fluxScripts
|
|
</body>
|
|
</html>
|