structure updates

This commit is contained in:
Mark Gregory
2026-08-26 15:50:31 +01:00
parent 7546698a3c
commit 55458f3109
2 changed files with 64 additions and 200 deletions
@@ -1,158 +0,0 @@
@props([
'title' => null,
])
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
<head>
@include('partials.head')
@if(!empty($title))
<title>{{ $title }} · {{ config('app.name', 'Laravel') }}</title>
@endif
</head>
<body class="hd-app-body">
@php
$user = auth()->user();
$isAdmin = $user !== null && (
(bool) ($user->helpdesk_admin ?? false)
|| (method_exists($user, 'isHelpdeskAdmin') && $user->isHelpdeskAdmin())
);
$roleLabel = $isAdmin ? 'Administrator' : ((method_exists($user, 'isHelpdeskAgent') && $user->isHelpdeskAgent()) || (bool) ($user->helpdesk_agent ?? false) ? 'Agent' : 'User');
@endphp
<div class="hd-app-shell" data-hd-shell>
<header class="hd-topbar">
<div class="hd-topbar-brand">
<button class="hd-icon-button hd-mobile-menu-button" type="button" data-hd-sidebar-toggle aria-label="Toggle navigation"><i class="fa-solid fa-bars"></i></button>
<a href="{{ route('dashboard') }}" wire:navigate class="hd-brand-name">{{ config('app.name', 'Laravel') }}</a>
</div>
<div class="hd-topbar-main">
@if(Route::has('helpdesk.tickets.index'))
<form method="GET" action="{{ route('helpdesk.tickets.index') }}" class="hd-top-search">
<i class="fa-solid fa-magnifying-glass"></i><input name="search" placeholder="Search tickets" aria-label="Search tickets">
</form>
@endif
<div class="hd-topbar-spacer"></div>
<details class="hd-account-menu">
<summary class="hd-account-button">
<span class="hd-user-avatar hd-user-avatar--gravatar">
<span class="hd-user-avatar-fallback">{{ $user->initials() }}</span>
<img
src="{{ $user->gravatarUrl(160) }}"
alt="{{ $user->name }}"
loading="lazy"
referrerpolicy="no-referrer"
onerror="this.style.display='none'"
>
</span>
<span class="hd-account-copy">
<strong>{{ $user->name }}</strong>
<small>{{ $roleLabel }}</small>
</span>
<i class="fa-solid fa-chevron-down hd-account-chevron"></i>
</summary>
<div class="hd-account-dropdown" role="menu">
<div class="hd-account-dropdown-user">
<span class="hd-user-avatar hd-user-avatar--gravatar hd-user-avatar--large">
<span class="hd-user-avatar-fallback">{{ $user->initials() }}</span>
<img
src="{{ $user->gravatarUrl(160) }}"
alt="{{ $user->name }}"
loading="lazy"
referrerpolicy="no-referrer"
onerror="this.style.display='none'"
>
</span>
<div class="hd-account-dropdown-copy">
<strong>{{ $user->name }}</strong>
<span>{{ $user->email }}</span>
<small>{{ $roleLabel }}</small>
</div>
</div>
<div class="hd-account-dropdown-divider"></div>
<nav class="hd-account-dropdown-nav" aria-label="Account">
@if(Route::has('profile.edit'))
<a href="{{ route('profile.edit') }}" wire:navigate role="menuitem">
<i class="fa-regular fa-user"></i>
<span>Profile</span>
</a>
@endif
@if(Route::has('helpdesk.settings'))
<a href="{{ route('helpdesk.settings') }}" wire:navigate role="menuitem">
<i class="fa-solid fa-gear"></i>
<span>Helpdesk Settings</span>
</a>
@endif
@if($isAdmin)
<a href="{{ url('/admin/users') }}" wire:navigate role="menuitem">
<i class="fa-solid fa-users"></i>
<span>User Management</span>
</a>
@endif
</nav>
<div class="hd-account-dropdown-divider"></div>
<form method="POST" action="{{ route('logout') }}">
@csrf
<button class="hd-account-logout" type="submit" role="menuitem">
<i class="fa-solid fa-arrow-right-from-bracket"></i>
<span>Log out</span>
</button>
</form>
</div>
</details>
</div>
</header>
<aside class="hd-shell-sidebar" data-hd-sidebar>
<nav class="hd-shell-nav" aria-label="Primary navigation">
<div class="hd-nav-section">
<div class="hd-nav-heading">Platform</div>
<a
class="hd-nav-link {{ request()->routeIs('dashboard') ? 'is-active' : '' }}"
href="{{ route('dashboard') }}"
wire:navigate
>
<i class="fa-solid fa-house"></i>
<span>Dashboard</span>
</a>
</div>
<div class="hd-nav-section"><div class="hd-nav-heading">Helpdesk</div>
@if(Route::has('helpdesk.tickets.index'))<a class="hd-nav-link {{ request()->routeIs('helpdesk.tickets.*') ? 'is-active' : '' }}" href="{{ route('helpdesk.tickets.index') }}" wire:navigate><i class="fa-solid fa-ticket"></i><span>Tickets</span></a>@endif
@if(Route::has('helpdesk.kanban'))<a class="hd-nav-link {{ request()->routeIs('helpdesk.kanban') ? 'is-active' : '' }}" href="{{ route('helpdesk.kanban') }}" wire:navigate><i class="fa-solid fa-table-columns"></i><span>Kanban</span></a>@endif
@if(Route::has('helpdesk.settings'))<a class="hd-nav-link {{ request()->routeIs('helpdesk.settings*') ? 'is-active' : '' }}" href="{{ route('helpdesk.settings') }}" wire:navigate><i class="fa-solid fa-gear"></i><span>Settings</span></a>@endif
</div>
@if(Route::has('documentation.index') || Route::has('documentation.documents.index'))
<div class="hd-nav-section"><div class="hd-nav-heading">Documentation</div>
<a class="hd-nav-link {{ request()->routeIs('documentation.documents.*') || request()->routeIs('documentation.index') ? 'is-active' : '' }}" href="{{ Route::has('documentation.documents.index') ? route('documentation.documents.index') : route('documentation.index') }}" wire:navigate><i class="fa-regular fa-file-lines"></i><span>Documents</span></a>
@if(Route::has('documentation.categories.index'))<a class="hd-nav-link {{ request()->routeIs('documentation.categories.*') ? 'is-active' : '' }}" href="{{ route('documentation.categories.index') }}" wire:navigate><i class="fa-regular fa-folder"></i><span>Categories</span></a>@endif
</div>
@endif
@if($isAdmin && Route::has('user-management.index'))
<div class="hd-nav-section"><div class="hd-nav-heading">Users</div>
<a class="hd-nav-link {{ request()->routeIs('user-management.index') || request()->routeIs('user-management.create') || request()->routeIs('user-management.edit') ? 'is-active' : '' }}" href="{{ route('user-management.index') }}" wire:navigate><i class="fa-solid fa-users"></i><span>Users</span></a>
<a class="hd-nav-link {{ request()->routeIs('user-management.roles') ? 'is-active' : '' }}" href="{{ route('user-management.roles') }}" wire:navigate><i class="fa-solid fa-shield-halved"></i><span>Roles & Permissions</span></a>
</div>
@endif
</nav>
<div class="hd-sidebar-resizer" data-hd-sidebar-resizer title="Drag to resize sidebar"><span></span></div>
</aside>
<button type="button" class="hd-sidebar-backdrop" data-hd-sidebar-toggle aria-label="Close navigation"></button>
<main class="hd-shell-main">{{ $slot }}</main>
</div>
@persist('toast')<flux:toast.group><flux:toast /></flux:toast.group>@endpersist
@fluxScripts
</body>
</html>
@@ -3,65 +3,87 @@
<div
class="overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-700 dark:bg-zinc-900">
<div class="bg-gradient-to-br from-slate-950 via-slate-900 to-blue-950 px-6 py-7 text-white">
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
<div>
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-blue-200">Helpdesk workflow</p>
<h1 class="mt-2 text-3xl font-semibold tracking-tight">Kanban board</h1>
<p class="mt-2 max-w-3xl text-sm text-blue-100/90">Drag tickets between board columns. Boards and
columns are configured in Helpdesk Settings.</p>
<div class="grid gap-8 lg:grid-cols-[minmax(0,1fr)_minmax(460px,0.9fr)] lg:items-start">
<div class="min-w-0 pt-1">
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-blue-200">
Helpdesk workflow
</p>
<h1 class="mt-2 text-3xl font-semibold tracking-tight text-white">
Kanban board
</h1>
<p class="mt-2 max-w-3xl text-sm font-normal leading-6 text-blue-100/90">
Drag tickets between board columns. Boards and columns are configured in Helpdesk Settings.
</p>
</div>
<div class="flex w-full flex-col gap-3 lg:w-auto lg:min-w-[420px]">
<div class="flex flex-wrap justify-start gap-2 lg:justify-end">
<a href="{{ route('helpdesk.index') }}" wire:navigate class="hd-btn hd-btn-blue">
<i class="fa-solid fa-gauge-high" aria-hidden="true"></i>
<span>Dashboard</span>
</a>
<div class="min-w-0">
<div class="flex flex-wrap gap-2 lg:justify-end">
<a href="{{ route('helpdesk.index') }}" wire:navigate class="hd-btn hd-btn-blue">
<i class="fa-solid fa-gauge-high" aria-hidden="true"></i>
<span>Dashboard</span>
</a>
<a href="{{ route('helpdesk.tickets.create') }}" wire:navigate class="hd-btn hd-btn-green">
<i class="fa-solid fa-plus" aria-hidden="true"></i>
<span>New Ticket</span>
</a>
<a href="{{ route('helpdesk.tickets.create') }}" wire:navigate class="hd-btn hd-btn-green">
<i class="fa-solid fa-plus" aria-hidden="true"></i>
<span>New Ticket</span>
</a>
<a href="{{ route('helpdesk.settings') }}" wire:navigate class="hd-btn hd-btn-amber">
<i class="fa-solid fa-gear" aria-hidden="true"></i>
<span>Configure boards</span>
</a>
<a href="{{ route('helpdesk.settings') }}" wire:navigate class="hd-btn hd-btn-amber">
<i class="fa-solid fa-gear" aria-hidden="true"></i>
<span>Configure boards</span>
</a>
<a href="{{ route('helpdesk.tickets.index') }}" wire:navigate class="hd-btn hd-btn-blue">
<i class="fa-solid fa-list" aria-hidden="true"></i>
<span>List view</span>
</a>
<a href="{{ route('helpdesk.tickets.index') }}" wire:navigate class="hd-btn hd-btn-blue">
<i class="fa-solid fa-list" aria-hidden="true"></i>
<span>List view</span>
</a>
</div>
@if ($boards->isNotEmpty())
<div class="hd-kanban-active-board-card">
<div class="mt-7 grid gap-5 xl:grid-cols-[minmax(0,1fr)_minmax(220px,290px)] xl:items-end">
<div class="min-w-0">
<p class="hd-kanban-active-board-label">Active board</p>
<h2 class="hd-kanban-active-board-title">{{ $board?->name ?? 'None' }}</h2>
<p class="hd-kanban-active-board-description">
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-blue-200">
Active board
</p>
<h2 class="mt-2 text-2xl font-semibold tracking-tight text-white">
{{ $board?->name ?? 'None' }}
</h2>
<p class="mt-2 max-w-xl text-sm font-normal leading-6 text-blue-100/90">
{{ $board?->description ?: 'Select the workflow board to display.' }}
</p>
@if ($board?->owner)
<p class="hd-kanban-active-board-owner">
<p class="mt-3 inline-flex items-center gap-2 text-xs font-medium text-blue-200/90">
<i class="fa-solid fa-user-shield" aria-hidden="true"></i>
{{ $board->owner->name }}
<span>{{ $board->owner->name }}</span>
</p>
@endif
</div>
<div class="hd-select-wrap hd-kanban-board-selector">
<select
class="hd-select"
aria-label="Select Kanban board"
onchange="window.location.href = '{{ route('helpdesk.kanban') }}?board_id=' + encodeURIComponent(this.value)"
>
@foreach ($boards as $availableBoard)
<option value="{{ $availableBoard->id }}" @selected((int) $board_id === (int) $availableBoard->id)>
{{ $availableBoard->name }}{{ $availableBoard->owner ? ' · ' . $availableBoard->owner->name : '' }}
</option>
@endforeach
</select>
<div class="min-w-0">
<label for="helpdesk-kanban-board-selector"
class="mb-2 block text-xs font-semibold uppercase tracking-[0.2em] text-blue-200">
Board
</label>
<div class="hd-select-wrap !max-w-none">
<select
id="helpdesk-kanban-board-selector"
class="hd-select !min-h-[2.9rem] !rounded-xl !px-4 !pr-11 !text-sm !font-semibold"
aria-label="Select Kanban board"
onchange="window.location.href = '{{ route('helpdesk.kanban') }}?board_id=' + encodeURIComponent(this.value)"
>
@foreach ($boards as $availableBoard)
<option value="{{ $availableBoard->id }}" @selected((int) $board_id === (int) $availableBoard->id)>
{{ $availableBoard->name }}{{ $availableBoard->owner ? ' · ' . $availableBoard->owner->name : '' }}
</option>
@endforeach
</select>
</div>
</div>
</div>
@endif