settings updates
This commit is contained in:
@@ -1,184 +1,223 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
|
||||
<head>
|
||||
@include('partials.head')
|
||||
</head>
|
||||
<head>
|
||||
@include('partials.head')
|
||||
</head>
|
||||
|
||||
<body class="min-h-screen bg-white dark:bg-zinc-800">
|
||||
<flux:sidebar
|
||||
sticky
|
||||
collapsible="mobile"
|
||||
class="hd-sidebar 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
|
||||
/>
|
||||
<body class="min-h-screen bg-white dark:bg-zinc-800">
|
||||
@php
|
||||
/*
|
||||
* Match the Core WMS support navigation strategy:
|
||||
* detect routes rather than hiding navigation behind role checks.
|
||||
*/
|
||||
$helpdeskEnabled = Route::has('helpdesk.index') || Route::has('helpdesk.tickets.index');
|
||||
|
||||
<flux:sidebar.collapse class="lg:hidden" />
|
||||
</flux:sidebar.header>
|
||||
$helpdeskSettingsRoute = Route::has('helpdesk.settings')
|
||||
? 'helpdesk.settings'
|
||||
: (Route::has('helpdesk.settings.index')
|
||||
? 'helpdesk.settings.index'
|
||||
: null);
|
||||
|
||||
<flux:sidebar.nav>
|
||||
<flux:sidebar.group :heading="__('Platform')" class="grid">
|
||||
<flux:sidebar.item
|
||||
icon="home"
|
||||
:href="route('dashboard')"
|
||||
:current="request()->routeIs('dashboard')"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Dashboard') }}
|
||||
</flux:sidebar.item>
|
||||
</flux:sidebar.group>
|
||||
$helpdeskActive = request()->routeIs('helpdesk.*');
|
||||
@endphp
|
||||
|
||||
<flux:sidebar.group :heading="__('Helpdesk')" class="grid">
|
||||
<flux:sidebar.item
|
||||
icon="inbox"
|
||||
:href="route('helpdesk.tickets.index')"
|
||||
:current="request()->routeIs('helpdesk.tickets.*')"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Tickets') }}
|
||||
</flux:sidebar.item>
|
||||
|
||||
<flux:sidebar.item
|
||||
icon="squares-2x2"
|
||||
:href="route('helpdesk.kanban')"
|
||||
:current="request()->routeIs('helpdesk.kanban')"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Kanban') }}
|
||||
</flux:sidebar.item>
|
||||
|
||||
<flux:sidebar.item
|
||||
icon="lifebuoy"
|
||||
:href="route('helpdesk.index')"
|
||||
:current="request()->routeIs('helpdesk.index')"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Support') }}
|
||||
</flux:sidebar.item>
|
||||
|
||||
@if (auth()->user()->isHelpdeskAdmin())
|
||||
<flux:sidebar.item
|
||||
icon="cog"
|
||||
:href="route('helpdesk.settings')"
|
||||
:current="request()->routeIs('helpdesk.settings')"
|
||||
<flux:sidebar
|
||||
sticky
|
||||
collapsible="mobile"
|
||||
class="hd-sidebar 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
|
||||
>
|
||||
{{ __('Settings') }}
|
||||
</flux:sidebar.item>
|
||||
@endif
|
||||
</flux:sidebar.group>
|
||||
</flux:sidebar.nav>
|
||||
/>
|
||||
|
||||
<flux:spacer />
|
||||
<flux:sidebar.collapse class="lg:hidden" />
|
||||
</flux:sidebar.header>
|
||||
|
||||
<x-desktop-user-menu
|
||||
class="hidden lg:block"
|
||||
:name="auth()->user()->name"
|
||||
/>
|
||||
</flux:sidebar>
|
||||
|
||||
<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('helpdesk.index')"
|
||||
icon="lifebuoy"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Support') }}
|
||||
</flux:menu.item>
|
||||
|
||||
@if (auth()->user()->isHelpdeskAdmin())
|
||||
<flux:menu.item
|
||||
:href="route('helpdesk.settings')"
|
||||
icon="cog"
|
||||
<flux:sidebar.nav>
|
||||
<flux:sidebar.group :heading="__('Platform')" class="grid">
|
||||
<flux:sidebar.item
|
||||
icon="home"
|
||||
:href="route('dashboard')"
|
||||
:current="request()->routeIs('dashboard')"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Helpdesk Settings') }}
|
||||
</flux:menu.item>
|
||||
{{ __('Dashboard') }}
|
||||
</flux:sidebar.item>
|
||||
</flux:sidebar.group>
|
||||
|
||||
@if ($helpdeskEnabled)
|
||||
<div class="hd-support-group">
|
||||
{{-- Core WMS uses Support as the selected parent group. --}}
|
||||
@if (Route::has('helpdesk.index'))
|
||||
<flux:sidebar.item
|
||||
icon="lifebuoy"
|
||||
:href="route('helpdesk.index')"
|
||||
class="hd-support-parent {{ $helpdeskActive ? 'is-section-active' : '' }}"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Support') }}
|
||||
</flux:sidebar.item>
|
||||
@else
|
||||
<div class="hd-support-parent is-section-active">
|
||||
<span class="hd-support-parent-label">{{ __('Support') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="hd-support-children">
|
||||
@if (Route::has('helpdesk.tickets.index'))
|
||||
<flux:sidebar.item
|
||||
icon="inbox"
|
||||
:href="route('helpdesk.tickets.index')"
|
||||
:current="request()->routeIs('helpdesk.tickets.*')"
|
||||
class="hd-support-child"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Tickets') }}
|
||||
</flux:sidebar.item>
|
||||
@endif
|
||||
|
||||
@if (Route::has('helpdesk.kanban'))
|
||||
<flux:sidebar.item
|
||||
icon="squares-2x2"
|
||||
:href="route('helpdesk.kanban')"
|
||||
:current="request()->routeIs('helpdesk.kanban')"
|
||||
class="hd-support-child"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Kanban') }}
|
||||
</flux:sidebar.item>
|
||||
@endif
|
||||
|
||||
@if ($helpdeskSettingsRoute)
|
||||
<flux:sidebar.item
|
||||
icon="cog"
|
||||
:href="route($helpdeskSettingsRoute)"
|
||||
:current="request()->routeIs('helpdesk.settings') || request()->routeIs('helpdesk.settings.index')"
|
||||
class="hd-support-child"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Settings') }}
|
||||
</flux:sidebar.item>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</flux:sidebar.nav>
|
||||
|
||||
<flux:menu.item
|
||||
:href="route('profile.edit')"
|
||||
icon="user-circle"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Profile Settings') }}
|
||||
</flux:menu.item>
|
||||
</flux:menu.radio.group>
|
||||
<flux:spacer />
|
||||
|
||||
<flux:menu.separator />
|
||||
<x-desktop-user-menu
|
||||
class="hidden lg:block"
|
||||
:name="auth()->user()->name"
|
||||
/>
|
||||
</flux:sidebar>
|
||||
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('logout') }}"
|
||||
class="w-full"
|
||||
>
|
||||
@csrf
|
||||
<!-- Mobile User Menu -->
|
||||
<flux:header class="lg:hidden">
|
||||
<flux:sidebar.toggle
|
||||
class="lg:hidden"
|
||||
icon="bars-2"
|
||||
inset="left"
|
||||
/>
|
||||
|
||||
<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>
|
||||
<flux:spacer />
|
||||
|
||||
{{ $slot }}
|
||||
<flux:dropdown position="top" align="end">
|
||||
<flux:profile
|
||||
:initials="auth()->user()->initials()"
|
||||
icon-trailing="chevron-down"
|
||||
/>
|
||||
|
||||
@persist('toast')
|
||||
<flux:toast.group>
|
||||
<flux:toast />
|
||||
</flux:toast.group>
|
||||
@endpersist
|
||||
<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()"
|
||||
/>
|
||||
|
||||
@fluxScripts
|
||||
</body>
|
||||
<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>
|
||||
@if (Route::has('helpdesk.index'))
|
||||
<flux:menu.item
|
||||
:href="route('helpdesk.index')"
|
||||
icon="lifebuoy"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Support') }}
|
||||
</flux:menu.item>
|
||||
@endif
|
||||
|
||||
@if ($helpdeskSettingsRoute)
|
||||
<flux:menu.item
|
||||
:href="route($helpdeskSettingsRoute)"
|
||||
icon="cog"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Helpdesk Settings') }}
|
||||
</flux:menu.item>
|
||||
@endif
|
||||
|
||||
@if (Route::has('profile.edit'))
|
||||
<flux:menu.item
|
||||
:href="route('profile.edit')"
|
||||
icon="user-circle"
|
||||
wire:navigate
|
||||
>
|
||||
{{ __('Profile') }}
|
||||
</flux:menu.item>
|
||||
@endif
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user