"feat: Integrate custom icons in admin templates"

This commit is contained in:
Till Tomczak 2025-05-29 17:56:52 +02:00
parent 83119f1f4a
commit 0879a66cb2
3 changed files with 194 additions and 88 deletions

View File

@ -0,0 +1,75 @@
#!/usr/bin/env python3
"""
Icon-Generator für Mercedes-Benz MYP Platform
Generiert PWA-Icons in verschiedenen Größen
"""
import os
from PIL import Image, ImageDraw, ImageFont
def create_mercedes_icon(size, output_path):
"""
Erstellt ein einfaches Mercedes-Benz-Logo-Icon
Args:
size: Größe des Icons (quadratisch)
output_path: Ausgabepfad für das Icon
"""
# Erstelle ein schwarzes quadratisches Bild
img = Image.new('RGB', (size, size), color='#000000')
draw = ImageDraw.Draw(img)
# Berechne Kreis-Dimensionen
center = size // 2
radius = int(size * 0.4) # 80% der Größe für den äußeren Kreis
# Äußerer weißer Kreis
draw.ellipse([center - radius, center - radius, center + radius, center + radius],
outline='#FFFFFF', width=max(2, size // 50))
# Mercedes-Stern (vereinfacht)
star_radius = int(radius * 0.7)
# Drei Linien für den Mercedes-Stern
# Linie nach oben
draw.line([center, center, center, center - star_radius],
fill='#FFFFFF', width=max(2, size // 40))
# Linie nach rechts unten (60°)
import math
angle1 = math.radians(60)
x1 = center + int(star_radius * math.sin(angle1))
y1 = center + int(star_radius * math.cos(angle1))
draw.line([center, center, x1, y1],
fill='#FFFFFF', width=max(2, size // 40))
# Linie nach links unten (120°)
angle2 = math.radians(120)
x2 = center + int(star_radius * math.sin(angle2))
y2 = center + int(star_radius * math.cos(angle2))
draw.line([center, center, x2, y2],
fill='#FFFFFF', width=max(2, size // 40))
# Speichere das Bild
img.save(output_path, 'PNG', optimize=True)
print(f"✅ Icon erstellt: {output_path} ({size}x{size})")
def main():
"""Generiert alle benötigten Icon-Größen"""
sizes = [72, 96, 128, 144, 152, 192, 384, 512]
# Stelle sicher, dass das Verzeichnis existiert
os.makedirs('static/icons', exist_ok=True)
for size in sizes:
output_path = f'icon-{size}x{size}.png'
try:
create_mercedes_icon(size, output_path)
except Exception as e:
print(f"❌ Fehler beim Erstellen von {output_path}: {str(e)}")
print("\n🎯 Alle Icons wurden erfolgreich generiert!")
print("📁 Verzeichnis: static/icons/")
if __name__ == "__main__":
main()

View File

@ -1,48 +1,79 @@
{ {
"name": "Mercedes-Benz MYP Platform", "name": "Mercedes-Benz MYP Platform",
"short_name": "MYP", "short_name": "MYP Platform",
"description": "3D-Druck Management System", "description": "Mercedes-Benz 3D-Druck Management System",
"start_url": "/", "start_url": "/",
"display": "standalone", "display": "standalone",
"background_color": "#0f172a", "background_color": "#000000",
"theme_color": "#0f172a", "theme_color": "#000000",
"orientation": "portrait-primary", "orientation": "portrait-primary",
"scope": "/", "scope": "/",
"lang": "de", "lang": "de",
"categories": ["productivity", "business"], "categories": ["productivity", "business"],
"icons": [ "icons": [
{ {
"src": "icons/mercedes-logo.svg", "src": "/static/icons/icon-72x72.png",
"sizes": "192x192", "sizes": "72x72",
"type": "image/svg+xml" "type": "image/png",
"purpose": "any maskable"
}, },
{ {
"src": "icons/mercedes-logo.svg", "src": "/static/icons/icon-96x96.png",
"sizes": "512x512", "sizes": "96x96",
"type": "image/svg+xml" "type": "image/png",
"purpose": "any maskable"
}, },
{ {
"src": "icons/icon-144x144.png", "src": "/static/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/static/icons/icon-144x144.png",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png", "type": "image/png",
"purpose": "maskable any" "purpose": "any maskable"
},
{
"src": "/static/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/static/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/static/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/static/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
} }
], ],
"shortcuts": [ "shortcuts": [
{ {
"name": "Dashboard", "name": "Dashboard",
"short_name": "Dashboard",
"description": "Öffne das Haupt-Dashboard",
"url": "/dashboard", "url": "/dashboard",
"description": "Übersicht anzeigen" "icons": [{ "src": "/static/icons/icon-96x96.png", "sizes": "96x96" }]
}, },
{ {
"name": "Drucker", "name": "Neue Anfrage",
"url": "/printers", "short_name": "Neue Anfrage",
"description": "Drucker verwalten" "description": "Erstelle eine neue Gastanfrage",
}, "url": "/guest/request",
{ "icons": [{ "src": "/static/icons/icon-96x96.png", "sizes": "96x96" }]
"name": "Druckaufträge",
"url": "/jobs",
"description": "Druckaufträge verwalten"
} }
], ],
"screenshots": [], "screenshots": [],

View File

@ -9,11 +9,11 @@
<script src="{{ url_for('static', filename='js/admin-guest-requests.js') }}" defer></script> <script src="{{ url_for('static', filename='js/admin-guest-requests.js') }}" defer></script>
<!-- Loading Overlay --> <!-- Loading Overlay -->
<div id="loading-overlay" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center hidden"> <div id="loading-overlay" class="fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center hidden">
<div class="bg-white dark:bg-slate-800 rounded-2xl p-8 shadow-2xl"> <div class="bg-white dark:bg-slate-900 rounded-2xl p-8 shadow-2xl border border-gray-200 dark:border-slate-700">
<div class="flex items-center space-x-4"> <div class="flex items-center space-x-4">
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"></div> <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 dark:border-blue-400"></div>
<span class="text-lg font-medium text-gray-900 dark:text-white">Wird geladen...</span> <span class="text-lg font-medium text-gray-900 dark:text-slate-100">Wird geladen...</span>
</div> </div>
</div> </div>
</div> </div>
@ -21,26 +21,26 @@
{% block content %} {% block content %}
<!-- Moderne Gastaufträge-Verwaltung --> <!-- Moderne Gastaufträge-Verwaltung -->
<div class="min-h-screen"> <div class="min-h-screen bg-gray-50 dark:bg-slate-950">
<!-- Hero Header --> <!-- Hero Header -->
<div class="relative overflow-hidden bg-gradient-to-r from-slate-900 via-blue-900 to-indigo-900 text-white rounded-3xl mx-4 mt-4"> <div class="relative overflow-hidden bg-gradient-to-r from-slate-900 via-blue-900 to-indigo-900 dark:from-slate-950 dark:via-blue-950 dark:to-indigo-950 text-white rounded-3xl mx-4 mt-4">
<div class="absolute inset-0 bg-black/20"></div> <div class="absolute inset-0 bg-black/30 dark:bg-black/50"></div>
<div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent"></div> <div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 dark:via-white/3 to-transparent"></div>
<!-- Live Status Indicator --> <!-- Live Status Indicator -->
<div class="absolute top-4 right-4 flex items-center space-x-2"> <div class="absolute top-4 right-4 flex items-center space-x-2">
<div class="flex items-center space-x-2 bg-white/10 backdrop-blur-sm border border-white/20 rounded-full px-3 py-1"> <div class="flex items-center space-x-2 bg-white/15 dark:bg-white/10 backdrop-blur-sm border border-white/30 dark:border-white/20 rounded-full px-3 py-1">
<div id="live-indicator" class="w-2 h-2 bg-green-400 rounded-full animate-pulse"></div> <div id="live-indicator" class="w-2 h-2 bg-green-400 dark:bg-green-300 rounded-full animate-pulse"></div>
<span class="text-sm font-medium">Live</span> <span class="text-sm font-medium text-white">Live</span>
</div> </div>
<div class="bg-white/10 backdrop-blur-sm border border-white/20 rounded-full px-3 py-1"> <div class="bg-white/15 dark:bg-white/10 backdrop-blur-sm border border-white/30 dark:border-white/20 rounded-full px-3 py-1">
<span id="live-time" class="text-sm font-medium"></span> <span id="live-time" class="text-sm font-medium text-white"></span>
</div> </div>
</div> </div>
<!-- Animated Background Pattern --> <!-- Animated Background Pattern -->
<div class="absolute inset-0 opacity-10 rounded-3xl overflow-hidden"> <div class="absolute inset-0 opacity-10 dark:opacity-5 rounded-3xl overflow-hidden">
<div class="absolute inset-0" style="background-image: radial-gradient(circle at 25% 25%, white 2px, transparent 2px), radial-gradient(circle at 75% 75%, white 2px, transparent 2px); background-size: 50px 50px;"></div> <div class="absolute inset-0" style="background-image: radial-gradient(circle at 25% 25%, white 2px, transparent 2px), radial-gradient(circle at 75% 75%, white 2px, transparent 2px); background-size: 50px 50px;"></div>
</div> </div>
@ -48,7 +48,7 @@
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<div> <div>
<!-- Mercedes-Benz Logo --> <!-- Mercedes-Benz Logo -->
<div class="inline-flex items-center justify-center w-20 h-20 bg-white/10 backdrop-blur-sm rounded-full mb-6 border border-white/20"> <div class="inline-flex items-center justify-center w-20 h-20 bg-white/15 dark:bg-white/10 backdrop-blur-sm rounded-full mb-6 border border-white/30 dark:border-white/20">
<svg class="w-10 h-10 text-white" viewBox="0 0 80 80" fill="currentColor"> <svg class="w-10 h-10 text-white" viewBox="0 0 80 80" fill="currentColor">
<path d="M58.6,4.5C53,1.6,46.7,0,40,0c-6.7,0-13,1.6-18.6,4.5v0C8.7,11.2,0,24.6,0,40c0,15.4,8.7,28.8,21.5,35.5 <path d="M58.6,4.5C53,1.6,46.7,0,40,0c-6.7,0-13,1.6-18.6,4.5v0C8.7,11.2,0,24.6,0,40c0,15.4,8.7,28.8,21.5,35.5
C27,78.3,33.3,80,40,80c6.7,0,12.9-1.7,18.5-4.6C71.3,68.8,80,55.4,80,40C80,24.6,71.3,11.2,58.6,4.5z M4,40 C27,78.3,33.3,80,40,80c6.7,0,12.9-1.7,18.5-4.6C71.3,68.8,80,55.4,80,40C80,24.6,71.3,11.2,58.6,4.5z M4,40
@ -60,11 +60,11 @@
</div> </div>
<h1 class="text-4xl md:text-5xl font-bold mb-4 tracking-tight"> <h1 class="text-4xl md:text-5xl font-bold mb-4 tracking-tight">
<span class="bg-gradient-to-r from-white to-blue-200 bg-clip-text text-transparent"> <span class="bg-gradient-to-r from-white via-blue-100 to-slate-100 dark:from-white dark:via-blue-200 dark:to-slate-200 bg-clip-text text-transparent">
Gastaufträge Verwaltung Gastaufträge Verwaltung
</span> </span>
</h1> </h1>
<p class="text-xl text-blue-100 max-w-2xl leading-relaxed"> <p class="text-xl text-blue-100 dark:text-blue-200 max-w-2xl leading-relaxed">
Verwalten Sie Gastdruckaufträge mit modernster Technologie und Mercedes-Benz Qualität Verwalten Sie Gastdruckaufträge mit modernster Technologie und Mercedes-Benz Qualität
</p> </p>
</div> </div>
@ -72,7 +72,7 @@
<!-- Back to Admin Button --> <!-- Back to Admin Button -->
<div> <div>
<a href="{{ url_for('admin_page') }}" <a href="{{ url_for('admin_page') }}"
class="inline-flex items-center px-6 py-3 bg-white/10 backdrop-blur-sm border border-white/20 rounded-xl text-white hover:bg-white/20 transition-all duration-300 hover:scale-105"> class="inline-flex items-center px-6 py-3 bg-white/15 dark:bg-white/10 backdrop-blur-sm border border-white/30 dark:border-white/20 rounded-xl text-white hover:bg-white/25 dark:hover:bg-white/15 transition-all duration-300 hover:scale-105">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
</svg> </svg>
@ -88,88 +88,88 @@
<!-- Quick Stats Dashboard --> <!-- Quick Stats Dashboard -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12">
<!-- Pending Requests --> <!-- Pending Requests -->
<div class="group relative bg-white/80 dark:bg-slate-800/80 backdrop-blur-xl rounded-3xl border border-white/20 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl transition-all duration-500 hover:-translate-y-2"> <div class="group relative bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl rounded-3xl border border-gray-200/50 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl dark:shadow-2xl dark:hover:shadow-slate-900/50 transition-all duration-500 hover:-translate-y-2">
<div class="absolute inset-0 bg-gradient-to-br from-orange-500/10 to-red-500/10 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div> <div class="absolute inset-0 bg-gradient-to-br from-orange-500/10 dark:from-orange-400/20 to-red-500/10 dark:to-red-400/20 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<div class="relative"> <div class="relative">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<div class="p-3 bg-gradient-to-br from-orange-500 to-orange-600 rounded-xl shadow-lg"> <div class="p-3 bg-gradient-to-br from-orange-500 to-orange-600 dark:from-orange-400 dark:to-orange-500 rounded-xl shadow-lg">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
</div> </div>
<div class="text-right"> <div class="text-right">
<div id="pending-count" class="text-2xl font-bold text-slate-900 dark:text-white">-</div> <div id="pending-count" class="text-2xl font-bold text-slate-900 dark:text-slate-100">-</div>
<div class="text-sm text-slate-500 dark:text-slate-400">Wartend</div> <div class="text-sm text-slate-500 dark:text-slate-400">Wartend</div>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2 mb-2"> <div class="flex items-center space-x-2 mb-2">
<div class="w-2 h-2 bg-orange-400 rounded-full animate-pulse"></div> <div class="w-2 h-2 bg-orange-400 dark:bg-orange-300 rounded-full animate-pulse"></div>
<span class="text-xs text-orange-600 dark:text-orange-400 font-medium">Benötigt Aufmerksamkeit</span> <span class="text-xs text-orange-600 dark:text-orange-400 font-medium">Benötigt Aufmerksamkeit</span>
</div> </div>
</div> </div>
</div> </div>
<!-- Approved Requests --> <!-- Approved Requests -->
<div class="group relative bg-white/80 dark:bg-slate-800/80 backdrop-blur-xl rounded-3xl border border-white/20 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl transition-all duration-500 hover:-translate-y-2"> <div class="group relative bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl rounded-3xl border border-gray-200/50 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl dark:shadow-2xl dark:hover:shadow-slate-900/50 transition-all duration-500 hover:-translate-y-2">
<div class="absolute inset-0 bg-gradient-to-br from-green-500/10 to-emerald-500/10 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div> <div class="absolute inset-0 bg-gradient-to-br from-green-500/10 dark:from-green-400/20 to-emerald-500/10 dark:to-emerald-400/20 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<div class="relative"> <div class="relative">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<div class="p-3 bg-gradient-to-br from-green-500 to-green-600 rounded-xl shadow-lg"> <div class="p-3 bg-gradient-to-br from-green-500 to-green-600 dark:from-green-400 dark:to-green-500 rounded-xl shadow-lg">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
</div> </div>
<div class="text-right"> <div class="text-right">
<div id="approved-count" class="text-2xl font-bold text-slate-900 dark:text-white">-</div> <div id="approved-count" class="text-2xl font-bold text-slate-900 dark:text-slate-100">-</div>
<div class="text-sm text-slate-500 dark:text-slate-400">Genehmigt</div> <div class="text-sm text-slate-500 dark:text-slate-400">Genehmigt</div>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2 mb-2"> <div class="flex items-center space-x-2 mb-2">
<div class="w-2 h-2 bg-green-400 rounded-full animate-pulse"></div> <div class="w-2 h-2 bg-green-400 dark:bg-green-300 rounded-full animate-pulse"></div>
<span class="text-xs text-green-600 dark:text-green-400 font-medium">Aktiv</span> <span class="text-xs text-green-600 dark:text-green-400 font-medium">Aktiv</span>
</div> </div>
</div> </div>
</div> </div>
<!-- Rejected Requests --> <!-- Rejected Requests -->
<div class="group relative bg-white/80 dark:bg-slate-800/80 backdrop-blur-xl rounded-3xl border border-white/20 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl transition-all duration-500 hover:-translate-y-2"> <div class="group relative bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl rounded-3xl border border-gray-200/50 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl dark:shadow-2xl dark:hover:shadow-slate-900/50 transition-all duration-500 hover:-translate-y-2">
<div class="absolute inset-0 bg-gradient-to-br from-red-500/10 to-pink-500/10 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div> <div class="absolute inset-0 bg-gradient-to-br from-red-500/10 dark:from-red-400/20 to-pink-500/10 dark:to-pink-400/20 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<div class="relative"> <div class="relative">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<div class="p-3 bg-gradient-to-br from-red-500 to-red-600 rounded-xl shadow-lg"> <div class="p-3 bg-gradient-to-br from-red-500 to-red-600 dark:from-red-400 dark:to-red-500 rounded-xl shadow-lg">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
</div> </div>
<div class="text-right"> <div class="text-right">
<div id="rejected-count" class="text-2xl font-bold text-slate-900 dark:text-white">-</div> <div id="rejected-count" class="text-2xl font-bold text-slate-900 dark:text-slate-100">-</div>
<div class="text-sm text-slate-500 dark:text-slate-400">Abgelehnt</div> <div class="text-sm text-slate-500 dark:text-slate-400">Abgelehnt</div>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2 mb-2"> <div class="flex items-center space-x-2 mb-2">
<div class="w-2 h-2 bg-red-400 rounded-full"></div> <div class="w-2 h-2 bg-red-400 dark:bg-red-300 rounded-full"></div>
<span class="text-xs text-red-600 dark:text-red-400 font-medium">Archiviert</span> <span class="text-xs text-red-600 dark:text-red-400 font-medium">Archiviert</span>
</div> </div>
</div> </div>
</div> </div>
<!-- Total Requests --> <!-- Total Requests -->
<div class="group relative bg-white/80 dark:bg-slate-800/80 backdrop-blur-xl rounded-3xl border border-white/20 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl transition-all duration-500 hover:-translate-y-2"> <div class="group relative bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl rounded-3xl border border-gray-200/50 dark:border-slate-700/50 p-8 shadow-xl hover:shadow-2xl dark:shadow-2xl dark:hover:shadow-slate-900/50 transition-all duration-500 hover:-translate-y-2">
<div class="absolute inset-0 bg-gradient-to-br from-blue-500/10 to-indigo-500/10 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div> <div class="absolute inset-0 bg-gradient-to-br from-blue-500/10 dark:from-blue-400/20 to-indigo-500/10 dark:to-indigo-400/20 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<div class="relative"> <div class="relative">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<div class="p-3 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl shadow-lg"> <div class="p-3 bg-gradient-to-br from-blue-500 to-blue-600 dark:from-blue-400 dark:to-blue-500 rounded-xl shadow-lg">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>
</svg> </svg>
</div> </div>
<div class="text-right"> <div class="text-right">
<div id="total-count" class="text-2xl font-bold text-slate-900 dark:text-white">-</div> <div id="total-count" class="text-2xl font-bold text-slate-900 dark:text-slate-100">-</div>
<div class="text-sm text-slate-500 dark:text-slate-400">Gesamt</div> <div class="text-sm text-slate-500 dark:text-slate-400">Gesamt</div>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2 mb-2"> <div class="flex items-center space-x-2 mb-2">
<div class="w-2 h-2 bg-blue-400 rounded-full animate-pulse"></div> <div class="w-2 h-2 bg-blue-400 dark:bg-blue-300 rounded-full animate-pulse"></div>
<span class="text-xs text-blue-600 dark:text-blue-400 font-medium">Alle Zeit</span> <span class="text-xs text-blue-600 dark:text-blue-400 font-medium">Alle Zeit</span>
</div> </div>
</div> </div>
@ -177,25 +177,25 @@
</div> </div>
<!-- Control Panel --> <!-- Control Panel -->
<div class="bg-white/80 dark:bg-slate-800/80 backdrop-blur-xl rounded-3xl border border-white/20 dark:border-slate-700/50 p-8 shadow-xl mb-8"> <div class="bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl rounded-3xl border border-gray-200/50 dark:border-slate-700/50 p-8 shadow-xl dark:shadow-2xl mb-8">
<div class="flex flex-col lg:flex-row justify-between items-start lg:items-center space-y-4 lg:space-y-0"> <div class="flex flex-col lg:flex-row justify-between items-start lg:items-center space-y-4 lg:space-y-0">
<!-- Search and Filters --> <!-- Search and Filters -->
<div class="flex flex-col sm:flex-row gap-4 flex-1"> <div class="flex flex-col sm:flex-row gap-4 flex-1">
<div class="relative flex-1 max-w-md"> <div class="relative flex-1 max-w-md">
<input type="text" id="search-requests" placeholder="Gastaufträge durchsuchen..." <input type="text" id="search-requests" placeholder="Gastaufträge durchsuchen..."
class="w-full pl-10 pr-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl class="w-full pl-10 pr-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl
bg-white/70 dark:bg-slate-700/70 text-slate-900 dark:text-white bg-white/80 dark:bg-slate-800/80 text-slate-900 dark:text-slate-100
focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 focus:border-transparent
placeholder-slate-500 dark:placeholder-slate-400"> placeholder-slate-500 dark:placeholder-slate-400">
<svg class="w-5 h-5 text-slate-400 absolute left-3 top-1/2 transform -translate-y-1/2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5 text-slate-400 dark:text-slate-500 absolute left-3 top-1/2 transform -translate-y-1/2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg> </svg>
</div> </div>
<select id="status-filter" <select id="status-filter"
class="px-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl class="px-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl
bg-white/70 dark:bg-slate-700/70 text-slate-900 dark:text-white bg-white/80 dark:bg-slate-800/80 text-slate-900 dark:text-slate-100
focus:ring-2 focus:ring-blue-500 focus:border-transparent min-w-[150px]"> focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 focus:border-transparent min-w-[150px]">
<option value="all">Alle Status</option> <option value="all">Alle Status</option>
<option value="pending">Wartend</option> <option value="pending">Wartend</option>
<option value="approved">Genehmigt</option> <option value="approved">Genehmigt</option>
@ -205,8 +205,8 @@
<select id="sort-order" <select id="sort-order"
class="px-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl class="px-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl
bg-white/70 dark:bg-slate-700/70 text-slate-900 dark:text-white bg-white/80 dark:bg-slate-800/80 text-slate-900 dark:text-slate-100
focus:ring-2 focus:ring-blue-500 focus:border-transparent min-w-[150px]"> focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 focus:border-transparent min-w-[150px]">
<option value="newest">Neueste zuerst</option> <option value="newest">Neueste zuerst</option>
<option value="oldest">Älteste zuerst</option> <option value="oldest">Älteste zuerst</option>
<option value="priority">Nach Priorität</option> <option value="priority">Nach Priorität</option>
@ -216,7 +216,7 @@
<!-- Action Buttons --> <!-- Action Buttons -->
<div class="flex space-x-3"> <div class="flex space-x-3">
<button id="refresh-btn" <button id="refresh-btn"
class="inline-flex items-center px-4 py-3 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-all duration-300 shadow-lg hover:shadow-xl hover:scale-105"> class="inline-flex items-center px-4 py-3 bg-blue-500 dark:bg-blue-600 text-white rounded-xl hover:bg-blue-600 dark:hover:bg-blue-700 transition-all duration-300 shadow-lg hover:shadow-xl hover:scale-105">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
</svg> </svg>
@ -224,7 +224,7 @@
</button> </button>
<button id="export-btn" <button id="export-btn"
class="inline-flex items-center px-4 py-3 bg-green-500 text-white rounded-xl hover:bg-green-600 transition-all duration-300 shadow-lg hover:shadow-xl hover:scale-105"> class="inline-flex items-center px-4 py-3 bg-green-500 dark:bg-green-600 text-white rounded-xl hover:bg-green-600 dark:hover:bg-green-700 transition-all duration-300 shadow-lg hover:shadow-xl hover:scale-105">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg> </svg>
@ -232,7 +232,7 @@
</button> </button>
<button id="bulk-actions-btn" <button id="bulk-actions-btn"
class="inline-flex items-center px-4 py-3 bg-purple-500 text-white rounded-xl hover:bg-purple-600 transition-all duration-300 shadow-lg hover:shadow-xl hover:scale-105"> class="inline-flex items-center px-4 py-3 bg-purple-500 dark:bg-purple-600 text-white rounded-xl hover:bg-purple-600 dark:hover:bg-purple-700 transition-all duration-300 shadow-lg hover:shadow-xl hover:scale-105">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"/>
</svg> </svg>
@ -243,13 +243,13 @@
</div> </div>
<!-- Guest Requests Table --> <!-- Guest Requests Table -->
<div class="bg-white/80 dark:bg-slate-800/80 backdrop-blur-xl rounded-3xl border border-white/20 dark:border-slate-700/50 shadow-xl overflow-hidden"> <div class="bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl rounded-3xl border border-gray-200/50 dark:border-slate-700/50 shadow-xl dark:shadow-2xl overflow-hidden">
<div class="p-8 border-b border-slate-200 dark:border-slate-700"> <div class="p-8 border-b border-slate-200 dark:border-slate-700">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h2 class="text-2xl font-bold text-slate-900 dark:text-white">Gastaufträge</h2> <h2 class="text-2xl font-bold text-slate-900 dark:text-slate-100">Gastaufträge</h2>
<div class="flex items-center space-x-2 text-sm text-slate-500 dark:text-slate-400"> <div class="flex items-center space-x-2 text-sm text-slate-500 dark:text-slate-400">
<span>Automatische Aktualisierung:</span> <span>Automatische Aktualisierung:</span>
<div class="w-2 h-2 bg-green-400 rounded-full animate-pulse"></div> <div class="w-2 h-2 bg-green-400 dark:bg-green-300 rounded-full animate-pulse"></div>
<span>Aktiv</span> <span>Aktiv</span>
</div> </div>
</div> </div>
@ -257,11 +257,11 @@
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="min-w-full"> <table class="min-w-full">
<thead class="bg-slate-50 dark:bg-slate-900/50"> <thead class="bg-slate-50 dark:bg-slate-900/80">
<tr> <tr>
<th class="px-6 py-4 text-left"> <th class="px-6 py-4 text-left">
<input type="checkbox" id="select-all" <input type="checkbox" id="select-all"
class="rounded border-slate-300 text-blue-600 focus:ring-blue-500"> class="rounded border-slate-300 dark:border-slate-600 text-blue-600 dark:text-blue-500 focus:ring-blue-500 dark:focus:ring-blue-400 bg-white dark:bg-slate-800">
</th> </th>
<th class="px-6 py-4 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider"> <th class="px-6 py-4 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider">
Antragsteller Antragsteller
@ -283,7 +283,7 @@
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody id="requests-table-body" class="bg-white dark:bg-slate-800/50 divide-y divide-slate-200 dark:divide-slate-700"> <tbody id="requests-table-body" class="bg-white dark:bg-slate-900/50 divide-y divide-slate-200 dark:divide-slate-700">
<!-- Dynamic content will be loaded here --> <!-- Dynamic content will be loaded here -->
</tbody> </tbody>
</table> </table>
@ -291,16 +291,16 @@
<!-- Loading State --> <!-- Loading State -->
<div id="table-loading" class="flex items-center justify-center py-12 hidden"> <div id="table-loading" class="flex items-center justify-center py-12 hidden">
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mr-4"></div> <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 dark:border-blue-400 mr-4"></div>
<span class="text-slate-600 dark:text-slate-400">Lade Gastaufträge...</span> <span class="text-slate-600 dark:text-slate-400">Lade Gastaufträge...</span>
</div> </div>
<!-- Empty State --> <!-- Empty State -->
<div id="empty-state" class="text-center py-12 hidden"> <div id="empty-state" class="text-center py-12 hidden">
<svg class="mx-auto h-12 w-12 text-slate-400 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="mx-auto h-12 w-12 text-slate-400 dark:text-slate-500 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"/>
</svg> </svg>
<h3 class="text-lg font-medium text-slate-900 dark:text-white mb-2">Keine Gastaufträge gefunden</h3> <h3 class="text-lg font-medium text-slate-900 dark:text-slate-100 mb-2">Keine Gastaufträge gefunden</h3>
<p class="text-slate-500 dark:text-slate-400">Es sind derzeit keine Gastaufträge vorhanden oder sie entsprechen nicht den Filterkriterien.</p> <p class="text-slate-500 dark:text-slate-400">Es sind derzeit keine Gastaufträge vorhanden oder sie entsprechen nicht den Filterkriterien.</p>
</div> </div>
</div> </div>
@ -313,9 +313,9 @@
</div> </div>
<!-- Guest Request Detail Modal --> <!-- Guest Request Detail Modal -->
<div id="detail-modal" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-50 hidden"> <div id="detail-modal" class="fixed inset-0 bg-black/60 dark:bg-black/80 backdrop-blur-sm z-50 hidden">
<div class="flex items-center justify-center min-h-screen p-4"> <div class="flex items-center justify-center min-h-screen p-4">
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-y-auto"> <div class="bg-white dark:bg-slate-900 rounded-2xl shadow-2xl border border-gray-200 dark:border-slate-700 max-w-4xl w-full max-h-[90vh] overflow-y-auto">
<div id="modal-content"> <div id="modal-content">
<!-- Modal content will be dynamically loaded --> <!-- Modal content will be dynamically loaded -->
</div> </div>
@ -324,24 +324,24 @@
</div> </div>
<!-- Bulk Actions Modal --> <!-- Bulk Actions Modal -->
<div id="bulk-modal" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-50 hidden"> <div id="bulk-modal" class="fixed inset-0 bg-black/60 dark:bg-black/80 backdrop-blur-sm z-50 hidden">
<div class="flex items-center justify-center min-h-screen p-4"> <div class="flex items-center justify-center min-h-screen p-4">
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-2xl max-w-md w-full"> <div class="bg-white dark:bg-slate-900 rounded-2xl shadow-2xl border border-gray-200 dark:border-slate-700 max-w-md w-full">
<div class="p-6 border-b border-gray-200 dark:border-gray-700"> <div class="p-6 border-b border-gray-200 dark:border-slate-700">
<h3 class="text-xl font-bold text-gray-900 dark:text-white">Massenaktionen</h3> <h3 class="text-xl font-bold text-gray-900 dark:text-slate-100">Massenaktionen</h3>
</div> </div>
<div class="p-6"> <div class="p-6">
<div class="space-y-4"> <div class="space-y-4">
<button onclick="performBulkAction('approve')" <button onclick="performBulkAction('approve')"
class="w-full px-4 py-3 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors"> class="w-full px-4 py-3 bg-green-500 dark:bg-green-600 text-white rounded-lg hover:bg-green-600 dark:hover:bg-green-700 transition-colors">
Ausgewählte genehmigen Ausgewählte genehmigen
</button> </button>
<button onclick="performBulkAction('reject')" <button onclick="performBulkAction('reject')"
class="w-full px-4 py-3 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors"> class="w-full px-4 py-3 bg-red-500 dark:bg-red-600 text-white rounded-lg hover:bg-red-600 dark:hover:bg-red-700 transition-colors">
Ausgewählte ablehnen Ausgewählte ablehnen
</button> </button>
<button onclick="performBulkAction('delete')" <button onclick="performBulkAction('delete')"
class="w-full px-4 py-3 bg-gray-500 text-white rounded-lg hover:bg-gray-600 transition-colors"> class="w-full px-4 py-3 bg-gray-500 dark:bg-gray-600 text-white rounded-lg hover:bg-gray-600 dark:hover:bg-gray-700 transition-colors">
Ausgewählte löschen Ausgewählte löschen
</button> </button>
</div> </div>