UI-Verbesserungen, PWA-Icons, Branding und Settings-Erweiterung
Invertiertes Logo für Admin-Navbar, neue PWA-Icons, Manifest-Updates, Tailwind-Config-Extraktion, Farb-/Namenseinstellungen im Admin-Bereich und diverse Layout-Optimierungen. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
{{ __('admin.settings_tab_categories') }}
|
||||
</button>
|
||||
@if (auth()->user()->isAdmin())
|
||||
<button type="button" @click="tab = 'seasons'"
|
||||
:class="tab === 'seasons' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
|
||||
class="whitespace-nowrap px-4 py-2.5 border-b-2 text-sm font-medium transition-colors" role="tab">
|
||||
{{ __('admin.settings_tab_seasons') }}
|
||||
</button>
|
||||
<button type="button" @click="tab = 'visibility'"
|
||||
:class="tab === 'visibility' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
|
||||
class="whitespace-nowrap px-4 py-2.5 border-b-2 text-sm font-medium transition-colors" role="tab">
|
||||
@@ -438,6 +443,119 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Tab: Saisons (nur Admin) --}}
|
||||
@if (auth()->user()->isAdmin())
|
||||
<div x-show="tab === 'seasons'" role="tabpanel" x-data="{ editId: null, editName: '', editStart: '', editEnd: '', editCurrent: false }">
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">{{ __('admin.seasons_title') }}</h3>
|
||||
|
||||
{{-- Bestehende Saisons --}}
|
||||
@if ($seasons->isNotEmpty())
|
||||
<div class="overflow-x-auto mb-6">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 border-b">
|
||||
<tr>
|
||||
<th class="text-left px-4 py-2 font-medium text-gray-600">{{ __('admin.season_name') }}</th>
|
||||
<th class="text-left px-4 py-2 font-medium text-gray-600">{{ __('admin.season_start') }}</th>
|
||||
<th class="text-left px-4 py-2 font-medium text-gray-600">{{ __('admin.season_end') }}</th>
|
||||
<th class="text-center px-4 py-2 font-medium text-gray-600">{{ __('admin.season_current') }}</th>
|
||||
<th class="text-right px-4 py-2 font-medium text-gray-600">{{ __('admin.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@foreach ($seasons as $season)
|
||||
<tr>
|
||||
<template x-if="editId === {{ $season->id }}">
|
||||
<td colspan="5" class="px-4 py-3">
|
||||
<form method="POST" action="{{ route('admin.seasons.update', $season) }}" class="flex flex-wrap items-end gap-3">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">{{ __('admin.season_name') }}</label>
|
||||
<input type="text" name="name" x-model="editName" required class="px-2 py-1.5 border border-gray-300 rounded-md text-sm w-32">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">{{ __('admin.season_start') }}</label>
|
||||
<input type="date" name="start_date" x-model="editStart" required class="px-2 py-1.5 border border-gray-300 rounded-md text-sm">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">{{ __('admin.season_end') }}</label>
|
||||
<input type="date" name="end_date" x-model="editEnd" required class="px-2 py-1.5 border border-gray-300 rounded-md text-sm">
|
||||
</div>
|
||||
<label class="flex items-center gap-1.5 text-sm">
|
||||
<input type="hidden" name="is_current" value="0">
|
||||
<input type="checkbox" name="is_current" value="1" x-model="editCurrent" class="rounded border-gray-300">
|
||||
{{ __('admin.season_current') }}
|
||||
</label>
|
||||
<div class="flex gap-2">
|
||||
<button type="submit" class="px-3 py-1.5 bg-blue-600 text-white rounded-md text-sm hover:bg-blue-700">{{ __('ui.save') }}</button>
|
||||
<button type="button" @click="editId = null" class="px-3 py-1.5 bg-gray-100 text-gray-700 rounded-md text-sm hover:bg-gray-200">{{ __('ui.cancel') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</template>
|
||||
<template x-if="editId !== {{ $season->id }}">
|
||||
<td class="px-4 py-2 font-medium">{{ $season->name }}</td>
|
||||
</template>
|
||||
<template x-if="editId !== {{ $season->id }}">
|
||||
<td class="px-4 py-2">{{ $season->start_date->format('d.m.Y') }}</td>
|
||||
</template>
|
||||
<template x-if="editId !== {{ $season->id }}">
|
||||
<td class="px-4 py-2">{{ $season->end_date->format('d.m.Y') }}</td>
|
||||
</template>
|
||||
<template x-if="editId !== {{ $season->id }}">
|
||||
<td class="px-4 py-2 text-center">
|
||||
@if ($season->is_current)
|
||||
<span class="inline-block px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">{{ __('admin.season_current') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</template>
|
||||
<template x-if="editId !== {{ $season->id }}">
|
||||
<td class="px-4 py-2 text-right space-x-2">
|
||||
<button type="button" @click="editId = {{ $season->id }}; editName = @js($season->name); editStart = @js($season->start_date->format('Y-m-d')); editEnd = @js($season->end_date->format('Y-m-d')); editCurrent = {{ $season->is_current ? 'true' : 'false' }}" class="text-blue-600 hover:underline text-sm">{{ __('ui.edit') }}</button>
|
||||
<form method="POST" action="{{ route('admin.seasons.destroy', $season) }}" class="inline" onsubmit="return confirm('{{ __('admin.season_confirm_delete') }}')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="text-red-600 hover:underline text-sm">{{ __('ui.delete') }}</button>
|
||||
</form>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<p class="text-sm text-gray-500 mb-6">{{ __('admin.no_seasons_yet') }}</p>
|
||||
@endif
|
||||
|
||||
{{-- Neue Saison erstellen --}}
|
||||
<h4 class="text-sm font-semibold text-gray-700 mb-3">{{ __('admin.new_season') }}</h4>
|
||||
<form method="POST" action="{{ route('admin.seasons.store') }}" class="flex flex-wrap items-end gap-3">
|
||||
@csrf
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">{{ __('admin.season_name') }}</label>
|
||||
<input type="text" name="name" required placeholder="2025/2026" class="px-2 py-1.5 border border-gray-300 rounded-md text-sm w-32">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">{{ __('admin.season_start') }}</label>
|
||||
<input type="date" name="start_date" required class="px-2 py-1.5 border border-gray-300 rounded-md text-sm">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">{{ __('admin.season_end') }}</label>
|
||||
<input type="date" name="end_date" required class="px-2 py-1.5 border border-gray-300 rounded-md text-sm">
|
||||
</div>
|
||||
<label class="flex items-center gap-1.5 text-sm">
|
||||
<input type="hidden" name="is_current" value="0">
|
||||
<input type="checkbox" name="is_current" value="1" class="rounded border-gray-300">
|
||||
{{ __('admin.season_current') }}
|
||||
</label>
|
||||
<button type="submit" class="px-3 py-1.5 bg-blue-600 text-white rounded-md text-sm hover:bg-blue-700">{{ __('ui.create') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Tab: Sichtbarkeit (nur Admin) --}}
|
||||
@if (auth()->user()->isAdmin())
|
||||
<div x-show="tab === 'visibility'" role="tabpanel">
|
||||
@@ -447,6 +565,7 @@
|
||||
@php
|
||||
$features = [
|
||||
'statistics' => __('admin.visibility_feature_statistics'),
|
||||
'finances' => __('admin.visibility_feature_finances'),
|
||||
'catering_history' => __('admin.visibility_feature_catering_history'),
|
||||
];
|
||||
$roles = [
|
||||
@@ -756,10 +875,13 @@
|
||||
],
|
||||
|
||||
init() {
|
||||
const validTabs = ['general', 'mail', 'legal', 'defaults', 'categories', 'visibility', 'license', 'maintenance'];
|
||||
const validTabs = ['general', 'mail', 'legal', 'defaults', 'categories', 'seasons', 'visibility', 'license', 'maintenance'];
|
||||
const urlTab = new URLSearchParams(window.location.search).get('tab');
|
||||
const hash = window.location.hash.replace('#', '');
|
||||
const stored = sessionStorage.getItem('settings_tab');
|
||||
if (validTabs.includes(hash)) {
|
||||
if (validTabs.includes(urlTab)) {
|
||||
this.tab = urlTab;
|
||||
} else if (validTabs.includes(hash)) {
|
||||
this.tab = hash;
|
||||
} else if (validTabs.includes(stored)) {
|
||||
this.tab = stored;
|
||||
|
||||
Reference in New Issue
Block a user