301 lines
17 KiB
PHP
301 lines
17 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 stashable class="border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
|
||
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" />
|
||
<a href="{{ config('domains.domain_main_url') }}" class="me-5 flex items-center space-x-2 rtl:space-x-reverse">
|
||
<x-app-logo />
|
||
</a>
|
||
|
||
@php
|
||
$user = auth()->user();
|
||
$impersonation = app(\App\Actions\Admin\UserImpersonation::class);
|
||
$impersonator = $impersonation->impersonator();
|
||
$isImpersonating = $impersonation->isActive();
|
||
$canAdmin = ($user?->canAccessAdmin() ?? false) && ! $isImpersonating;
|
||
$canCustomer = $user?->canAccessCustomer() ?? false;
|
||
$reviewCount = $canAdmin
|
||
? app(\App\Services\Admin\AdminPerformanceCache::class)->pressReleaseReviewCount()
|
||
: 0;
|
||
@endphp
|
||
|
||
<flux:navlist variant="outline">
|
||
{{-- Dashboard (Admin/Editor) --}}
|
||
@if($canAdmin)
|
||
<flux:navlist.item icon="chart-bar" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate class="mb-4">
|
||
{{ __('Dashboard') }}
|
||
</flux:navlist.item>
|
||
@endif
|
||
|
||
{{-- Mein Bereich – sichtbar für alle Panel-User --}}
|
||
@if($canCustomer)
|
||
<flux:navlist.group :heading="__('Mein Bereich')" class="grid mb-4">
|
||
<flux:navlist.item icon="home" :href="route('me.dashboard')" :current="request()->routeIs('me.dashboard')" wire:navigate>
|
||
{{ __('Übersicht') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="newspaper" :href="route('me.press-releases.index')" :current="request()->routeIs('me.press-releases.*')" wire:navigate>
|
||
{{ __('Meine Pressemitteilungen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="building-office" :href="route('me.press-kits.index')" :current="request()->routeIs('me.press-kits.*')" wire:navigate>
|
||
{{ __('Firmen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="shopping-bag" :href="route('me.bookings.index')" :current="request()->routeIs('me.bookings.*')" wire:navigate>
|
||
{{ __('Buchungen & Add-ons') }}
|
||
</flux:navlist.item>
|
||
<div class="px-3 py-1.5 text-sm text-zinc-400 dark:text-zinc-500">
|
||
{{ __('Statistiken') }} <span class="text-xs">{{ __('später') }}</span>
|
||
</div>
|
||
</flux:navlist.group>
|
||
|
||
<flux:navlist.group :heading="__('Finanzen')" class="grid mb-4">
|
||
<div class="px-3 py-1.5 text-sm text-zinc-400 dark:text-zinc-500">
|
||
{{ __('Credits & Tarif') }} <span class="text-xs">{{ __('später') }}</span>
|
||
</div>
|
||
<flux:navlist.item icon="document-text" :href="route('me.invoices.index')" :current="request()->routeIs('me.invoices.*')" wire:navigate>
|
||
{{ __('Rechnungen') }}
|
||
</flux:navlist.item>
|
||
<div class="px-3 py-1.5 text-sm text-zinc-400 dark:text-zinc-500">
|
||
{{ __('Zahlungsarten') }} <span class="text-xs">{{ __('später') }}</span>
|
||
</div>
|
||
</flux:navlist.group>
|
||
|
||
<flux:navlist.group :heading="__('Konto')" class="grid mb-4">
|
||
<flux:navlist.item icon="user" :href="route('me.profile')" :current="request()->routeIs('me.profile')" wire:navigate>
|
||
{{ __('Profil') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="shield-check" :href="route('me.security')" :current="request()->routeIs('me.security')" wire:navigate>
|
||
{{ __('Sicherheit') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="key" :href="route('me.tokens.index')" :current="request()->routeIs('me.tokens.*')" wire:navigate>
|
||
{{ __('API & Integrationen') }}
|
||
</flux:navlist.item>
|
||
<div class="px-3 py-1.5 text-sm text-zinc-400 dark:text-zinc-500">
|
||
{{ __('Benachrichtigungen') }} <span class="text-xs">{{ __('später') }}</span>
|
||
</div>
|
||
</flux:navlist.group>
|
||
@endif
|
||
|
||
{{-- Content Management (Admin/Editor) --}}
|
||
@if($canAdmin)
|
||
<flux:navlist.group :heading="__('Content')" class="grid mb-4">
|
||
<flux:navlist.item
|
||
icon="newspaper"
|
||
:href="route('admin.press-releases.index', $reviewCount > 0 ? ['status' => 'review'] : [])"
|
||
:current="request()->routeIs('admin.press-releases.*')"
|
||
:badge="$reviewCount > 0 ? $reviewCount : null"
|
||
badge-color="yellow"
|
||
wire:navigate
|
||
>
|
||
{{ __('Pressemitteilungen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="folder" :href="route('admin.categories.index')" :current="request()->routeIs('admin.categories.*')" wire:navigate>
|
||
{{ __('Kategorien') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="code-bracket-square" :href="route('admin.footer-codes.index')" :current="request()->routeIs('admin.footer-codes.*')" wire:navigate>
|
||
{{ __('Footer-Codes') }}
|
||
</flux:navlist.item>
|
||
</flux:navlist.group>
|
||
|
||
{{-- CRM --}}
|
||
<flux:navlist.group :heading="__('CRM')" class="grid mb-4">
|
||
<flux:navlist.item icon="building-office" :href="route('admin.companies.index')" :current="request()->routeIs('admin.companies.*')" wire:navigate>
|
||
{{ __('Firmen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="user-group" :href="route('admin.contacts.index')" :current="request()->routeIs('admin.contacts.*')" wire:navigate>
|
||
{{ __('Kontakte') }}
|
||
</flux:navlist.item>
|
||
</flux:navlist.group>
|
||
|
||
{{-- Billing --}}
|
||
<flux:navlist.group :heading="__('Billing')" class="grid mb-4">
|
||
<flux:navlist.item icon="archive-box" :href="route('admin.invoices.index')" :current="request()->routeIs('admin.invoices.*')" wire:navigate>
|
||
{{ __('Legacy Rechnungen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="credit-card" :href="route('admin.payments.index')" :current="request()->routeIs('admin.payments.*')" wire:navigate>
|
||
{{ __('Zahlungen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="ticket" :href="route('admin.coupons.index')" :current="request()->routeIs('admin.coupons.*')" wire:navigate>
|
||
{{ __('Gutscheine') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="envelope" :href="route('admin.newsletter.sync')" :current="request()->routeIs('admin.newsletter.sync')" wire:navigate>
|
||
{{ __('Newsletter Sync') }}
|
||
</flux:navlist.item>
|
||
</flux:navlist.group>
|
||
|
||
{{-- Administration --}}
|
||
<flux:navlist.group :heading="__('Administration')" class="grid mb-4">
|
||
<flux:navlist.item icon="cog" :href="route('admin.presets.index')" :current="request()->routeIs('admin.presets.*')" wire:navigate>
|
||
{{ __('Voreinstellungen') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="users" :href="route('admin.users.index')" :current="request()->routeIs('admin.users.*')" wire:navigate>
|
||
{{ __('Benutzer') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="shield-check" :href="route('admin.roles.index')" :current="request()->routeIs('admin.roles.*')" wire:navigate>
|
||
{{ __('Rollen & Rechte') }}
|
||
</flux:navlist.item>
|
||
</flux:navlist.group>
|
||
|
||
{{-- Reports --}}
|
||
<flux:navlist.group :heading="__('Reports')" class="grid mb-4">
|
||
<flux:navlist.item icon="chart-bar-square" :href="route('admin.reports.slow-requests')" :current="request()->routeIs('admin.reports.*')" wire:navigate>
|
||
{{ __('Performance') }}
|
||
</flux:navlist.item>
|
||
</flux:navlist.group>
|
||
@endif
|
||
|
||
</flux:navlist>
|
||
|
||
{{-- Portal-Filter für Admin-Benutzer (P2.6) --}}
|
||
@auth
|
||
@if($canAdmin)
|
||
<div class="border-t border-zinc-200 dark:border-zinc-700 mt-2 pt-2">
|
||
<livewire:admin.portal-switcher />
|
||
</div>
|
||
@endif
|
||
@endauth
|
||
|
||
@if($impersonator)
|
||
<div class="mt-3 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-700/60 dark:bg-amber-950/40 dark:text-amber-100">
|
||
<flux:text weight="semibold">{{ __('Testmodus aktiv') }}</flux:text>
|
||
<flux:text class="mt-1 text-xs">
|
||
{{ __('Angemeldet als :user. Admin: :admin.', ['user' => $user?->name, 'admin' => $impersonator->name]) }}
|
||
</flux:text>
|
||
|
||
<form method="POST" action="{{ route('admin.impersonate.leave') }}" class="mt-3">
|
||
@csrf
|
||
<flux:button type="submit" size="sm" variant="primary" class="w-full">
|
||
{{ __('Zurück zum Admin') }}
|
||
</flux:button>
|
||
</form>
|
||
</div>
|
||
@endif
|
||
|
||
<flux:spacer />
|
||
|
||
<flux:navlist variant="outline">
|
||
<flux:navlist.group :heading="__('Resources')">
|
||
<flux:navlist.item icon="pencil" href="https://tailwindcss.com/docs/installation/using-vite" target="_blank">
|
||
{{ __('Tailwind CSS') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="shield-check" href="https://heroicons.com" target="_blank">
|
||
{{ __('Hero Icons') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="bolt" href="https://fluxui.dev/docs/installation" target="_blank">
|
||
{{ __('Flux UI') }}
|
||
</flux:navlist.item>
|
||
<flux:navlist.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
|
||
{{ __('Repository') }}
|
||
</flux:navlist.item>
|
||
|
||
<flux:navlist.item icon="book-open-text" href="https://laravel.com/docs/starter-kits" target="_blank">
|
||
{{ __('Documentation') }}
|
||
</flux:navlist.item>
|
||
</flux:navlist.group>
|
||
</flux:navlist>
|
||
<!-- Desktop User Menu -->
|
||
<flux:dropdown position="bottom" align="start">
|
||
<flux:profile
|
||
:name="auth()->user()->name"
|
||
:initials="auth()->user()->initials()"
|
||
icon-trailing="chevrons-up-down"
|
||
/>
|
||
|
||
<flux:menu class="w-[220px]">
|
||
<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">
|
||
<span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-lg">
|
||
<span
|
||
class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white"
|
||
>
|
||
{{ auth()->user()->initials() }}
|
||
</span>
|
||
</span>
|
||
|
||
<div class="grid flex-1 text-start text-sm leading-tight">
|
||
<span class="truncate font-semibold">{{ auth()->user()->name }}</span>
|
||
<span class="truncate text-xs">{{ auth()->user()->email }}</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</flux:menu.radio.group>
|
||
|
||
<flux:menu.separator />
|
||
|
||
<flux:menu.radio.group>
|
||
<flux:menu.item :href="route('settings.profile')" 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">
|
||
{{ __('Log Out') }}
|
||
</flux:menu.item>
|
||
</form>
|
||
</flux:menu>
|
||
</flux:dropdown>
|
||
</flux:sidebar>
|
||
|
||
<!-- Mobile User Menu -->
|
||
<flux:header class="lg:hidden">
|
||
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />
|
||
|
||
<a href="{{ config('domains.domain_main_url') }}" class="me-5 ml-2 flex items-center space-x-2 rtl:space-x-reverse">
|
||
<x-app-logo />
|
||
</a>
|
||
<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">
|
||
<span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-lg">
|
||
<span
|
||
class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white"
|
||
>
|
||
{{ auth()->user()->initials() }}
|
||
</span>
|
||
</span>
|
||
|
||
<div class="grid flex-1 text-start text-sm leading-tight">
|
||
<span class="truncate font-semibold">{{ auth()->user()->name }}</span>
|
||
<span class="truncate text-xs">{{ auth()->user()->email }}</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</flux:menu.radio.group>
|
||
|
||
<flux:menu.separator />
|
||
|
||
<flux:menu.radio.group>
|
||
<flux:menu.item :href="route('settings.profile')" 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">
|
||
{{ __('Log Out') }}
|
||
</flux:menu.item>
|
||
</form>
|
||
</flux:menu>
|
||
</flux:dropdown>
|
||
</flux:header>
|
||
|
||
{{ $slot }}
|
||
|
||
@fluxScripts
|
||
</body>
|
||
</html>
|