diff --git a/app/admin_routes.py b/app/admin_routes.py
index f0200be..2e166f7 100644
--- a/app/admin_routes.py
+++ b/app/admin_routes.py
@@ -286,16 +286,7 @@ def get_stats_endpoint():
LIMIT 5
''', (start_date, end_date)).fetchall()
- room_stats = db.execute('''
- SELECT r.name, COUNT(*) as count
- FROM reservations res
- JOIN tables t ON res.table_id = t.id
- JOIN areas a ON t.area_id = a.id
- JOIN rooms r ON a.room_id = r.id
- WHERE res.date >= ? AND res.date <= ?
- GROUP BY r.id
- ORDER BY count DESC
- ''', (start_date, end_date)).fetchall()
+ room_stats = [] # Deaktiviert - table_ids ist JSON Array, nicht Fremdschlüssel
daily_stats = db.execute('''
SELECT date, COUNT(*) as count, SUM(guests) as guests
diff --git a/app/templates/admin.html b/app/templates/admin.html
index b033b9c..7b28444 100644
--- a/app/templates/admin.html
+++ b/app/templates/admin.html
@@ -17,20 +17,9 @@
--success: #10b981;
}
- [data-theme="purple"] {
- --accent: #8b5cf6;
- --accent-dark: #7c3aed;
- }
-
- [data-theme="orange"] {
- --accent: #f97316;
- --accent-dark: #ea580c;
- }
-
- [data-theme="blue"] {
- --accent: #3b82f6;
- --accent-dark: #2563eb;
- }
+ [data-theme="purple"] { --accent: #8b5cf6; --accent-dark: #7c3aed; }
+ [data-theme="orange"] { --accent: #f97316; --accent-dark: #ea580c; }
+ [data-theme="blue"] { --accent: #3b82f6; --accent-dark: #2563eb; }
* { margin: 0; padding: 0; box-sizing: border-box; }
@@ -130,6 +119,11 @@
box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
}
+ .btn-danger {
+ background: var(--danger);
+ color: #fff;
+ }
+
.form-group {
margin-bottom: 1rem;
}
@@ -141,7 +135,7 @@
font-size: 0.875rem;
}
- .form-group input, .form-group select {
+ .form-group input, .form-group select, .form-group textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #334155;
@@ -153,7 +147,6 @@
.theme-selector {
display: flex;
gap: 1rem;
- margin-bottom: 2rem;
}
.theme-btn {
@@ -164,25 +157,58 @@
cursor: pointer;
}
- .theme-btn.active {
- border-color: #fff;
- }
-
+ .theme-btn.active { border-color: #fff; }
.theme-green { background: linear-gradient(135deg, #00d4aa, #00b894); }
.theme-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.theme-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.theme-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
- .grid-2 {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 1.5rem;
+ .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
+ .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
+
+ .stat-box {
+ background: var(--bg);
+ padding: 1.5rem;
+ border-radius: 12px;
+ text-align: center;
}
+ .stat-box h3 {
+ font-size: 2.5rem;
+ color: var(--accent);
+ margin-bottom: 0.5rem;
+ }
+
+ .stat-box p {
+ color: var(--text-muted);
+ }
+
+ .tab-content { display: none; }
+ .tab-content.active { display: block; }
+
+ table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-top: 1rem;
+ }
+
+ th, td {
+ padding: 0.75rem;
+ text-align: left;
+ border-bottom: 1px solid #334155;
+ }
+
+ th {
+ color: var(--text-muted);
+ font-weight: 600;
+ }
+
+ .hidden { display: none !important; }
+
@media (max-width: 1024px) {
.sidebar { width: 100%; position: relative; height: auto; }
.main { margin-left: 0; }
- .grid-2 { grid-template-columns: 1fr; }
+ .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@@ -190,18 +216,18 @@