updates for admin area

This commit is contained in:
Mark Gregory
2026-09-12 21:04:45 +01:00
parent 8c9dbfee08
commit ab3134de13
43 changed files with 573 additions and 137 deletions
+23
View File
@@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<main class="account-page">
<div class="shell account-shell">
<aside class="account-sidebar">
<div class="account-person">
<div class="account-avatar">{{ strtoupper(substr(auth()->user()->name,0,1)) }}</div>
<div><strong>{{ auth()->user()->name }}</strong><span>{{ auth()->user()->email }}</span></div>
</div>
<nav class="account-nav">
<a class="{{ request()->routeIs('dashboard') ? 'active' : '' }}" href="{{ route('dashboard') }}">Overview</a>
<a class="{{ request()->routeIs('account.enquiries') ? 'active' : '' }}" href="{{ route('account.enquiries') }}">Enquiries</a>
<a class="{{ request()->routeIs('account.bookings') ? 'active' : '' }}" href="{{ route('account.bookings') }}">Bookings</a>
<a class="{{ request()->routeIs('account.profile*') ? 'active' : '' }}" href="{{ route('account.profile') }}">Account details</a>
@if(auth()->user()->hasAnyRole(['admin','super-admin']))
<a href="{{ route('admin.dashboard') }}">Administration</a>
@endif
</nav>
</aside>
<section class="account-content">@yield('account-content')</section>
</div>
</main>
@endsection
+47
View File
@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', 'Administration') — BeatBook</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="admin-body">
<div class="admin-shell">
<aside class="admin-sidebar" id="adminSidebar">
<div class="admin-sidebar-head">
<a class="brand" href="{{ route('admin.dashboard') }}"><b>◉</b> BeatBook</a>
<button class="icon-button admin-close" type="button" data-admin-close aria-label="Close menu">×</button>
</div>
<div class="admin-kicker">Administration</div>
<nav class="admin-nav">
<a class="{{ request()->routeIs('admin.dashboard') ? 'active' : '' }}" href="{{ route('admin.dashboard') }}">Overview</a>
@foreach([
'users' => 'Users', 'djs' => 'DJs & businesses', 'clients' => 'Clients', 'bookings' => 'Bookings',
'payments' => 'Payments', 'reviews' => 'Reviews', 'messages' => 'Messages', 'notifications' => 'Notifications',
'support' => 'Support', 'reports' => 'Reports', 'content' => 'Content', 'roles' => 'Roles & permissions',
'privacy' => 'Privacy', 'settings' => 'Settings'
] as $key => $label)
<a class="{{ request()->is('admin/'.$key) ? 'active' : '' }}" href="{{ route('admin.section', $key) }}">{{ $label }}</a>
@endforeach
</nav>
<div class="admin-sidebar-foot">
<a href="{{ route('home') }}">View public site</a>
<a href="{{ route('dashboard') }}">My account</a>
<form method="post" action="{{ route('logout') }}">@csrf<button type="submit">Sign out</button></form>
</div>
</aside>
<div class="admin-overlay" data-admin-overlay></div>
<main class="admin-content">
<header class="admin-topbar">
<button class="icon-button admin-menu" type="button" data-admin-open aria-label="Open menu">☰</button>
<div><strong>@yield('page-title', 'Administration')</strong><span>{{ auth()->user()->name }}</span></div>
<a class="button small" href="{{ route('home') }}">Public site</a>
</header>
@if(session('success'))<div class="admin-flash">{{ session('success') }}</div>@endif
<div class="admin-page">@yield('content')</div>
</main>
</div>
</body>
</html>
+27 -51
View File
@@ -2,69 +2,45 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="description" content="Find and book outstanding DJs for weddings, parties, clubs and corporate events.">
<title>@yield('title', 'BeatBook — Find Your Perfect DJ')</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body>
<header>
<header class="site-header">
<div class="shell nav">
<a class="brand" href="{{ route('home') }}"><b>◉</b> BeatBook</a>
<nav class="navlinks">
<a href="{{ route('djs.index') }}">Find a DJ</a>
<a href="{{ route('home') }}#how">How it works</a>
<a href="{{ route('home') }}#for-djs">For DJs</a>
<a href="{{ route('home') }}#pricing">Pricing</a>
</nav>
<div class="nav-actions">
@auth
@if(auth()->user()->hasAnyRole(['admin', 'super-admin']))
<a class="button ghost" href="{{ route('admin.dashboard') }}">Admin</a>
@endif
<a class="button ghost" href="{{ route('dashboard') }}">Dashboard</a>
<form method="post" action="{{ route('logout') }}" class="inline-form">
@csrf
<button class="button" type="submit">Sign out</button>
</form>
@else
<a class="button ghost" href="{{ route('login') }}">Sign in</a>
<a class="button" href="{{ route('register') }}">Join</a>
@endauth
<button class="mobile-menu-button" type="button" data-menu-toggle aria-label="Open navigation" aria-expanded="false">☰</button>
<div class="nav-panel" data-menu-panel>
<nav class="navlinks">
<a href="{{ route('djs.index') }}">Find a DJ</a>
<a href="{{ route('home') }}#how">How it works</a>
<a href="{{ route('home') }}#for-djs">For DJs</a>
<a href="{{ route('home') }}#pricing">Pricing</a>
</nav>
<div class="nav-actions">
@auth
<a class="nav-account-link" href="{{ route('dashboard') }}"><span class="mini-avatar">{{ strtoupper(substr(auth()->user()->name,0,1)) }}</span><span>My account</span></a>
@if(auth()->user()->hasAnyRole(['admin', 'super-admin']))<a class="button ghost small" href="{{ route('admin.dashboard') }}">Admin</a>@endif
<form method="post" action="{{ route('logout') }}" class="inline-form">@csrf<button class="text-button" type="submit">Sign out</button></form>
@else
<a class="text-button" href="{{ route('login') }}">Sign in</a>
<a class="button small" href="{{ route('register') }}">Join BeatBook</a>
@endauth
</div>
</div>
</div>
</header>
@if(session('success'))
<div class="shell flash success">{{ session('success') }}</div>
@endif
@if(session('status'))
<div class="shell flash success">{{ session('status') }}</div>
@endif
@if(session('success'))<div class="shell flash success">{{ session('success') }}</div>@endif
@if(session('status'))<div class="shell flash success">{{ session('status') }}</div>@endif
@yield('content')
<footer class="section footer">
<div class="shell">
<b class="brand">BeatBook</b>
<p class="muted">DJs for every moment. Secure enquiries, bookings and verified reviews.</p>
<p>
<a href="{{ route('privacy') }}" class="muted">Privacy</a> ·
<a href="{{ route('cookies') }}" class="muted">Cookies</a> ·
<a href="{{ route('terms') }}" class="muted">Terms</a>
</p>
</div>
<footer class="site-footer">
<div class="shell footer-grid"><div><a class="brand" href="{{ route('home') }}"><b>◉</b> BeatBook</a><p>DJs for every moment. Search, compare and book with confidence.</p></div><div><strong>Discover</strong><a href="{{ route('djs.index') }}">Find a DJ</a><a href="{{ route('home') }}#how">How it works</a><a href="{{ route('home') }}#for-djs">For DJs</a></div><div><strong>Legal</strong><a href="{{ route('privacy') }}">Privacy</a><a href="{{ route('cookies') }}">Cookies</a><a href="{{ route('terms') }}">Terms</a></div></div>
<div class="shell footer-bottom">© {{ date('Y') }} BeatBook. All rights reserved.</div>
</footer>
<div class="cookie" id="cookie">
<strong>Your privacy matters</strong>
<p>We use necessary cookies to run BeatBook. Analytics and marketing remain off until you choose them.</p>
<button class="button" type="button" onclick="localStorage.setItem('cookieChoice','necessary');document.getElementById('cookie').remove()">Necessary only</button>
<button class="button ghost cookie-secondary" type="button" onclick="localStorage.setItem('cookieChoice','all');document.getElementById('cookie').remove()">Accept all</button>
</div>
<script>
if (localStorage.getItem('cookieChoice')) document.getElementById('cookie')?.remove();
</script>
<div class="cookie" id="cookie"><div><strong>Your privacy matters</strong><p>Necessary cookies keep BeatBook working. Optional analytics and marketing stay off unless you accept them.</p></div><div class="cookie-actions"><button class="button small" type="button" onclick="localStorage.setItem('cookieChoice','necessary');document.getElementById('cookie').remove()">Necessary only</button><button class="button ghost small" type="button" onclick="localStorage.setItem('cookieChoice','all');document.getElementById('cookie').remove()">Accept all</button></div></div>
<script>if(localStorage.getItem('cookieChoice')) document.getElementById('cookie')?.remove();</script>
</body>
</html>