"Refactor admin user template and base layout"
This commit is contained in:
parent
3cf8899f3e
commit
8e402d13bf
@ -33,15 +33,15 @@
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
<input type="hidden" name="_method" value="PUT"/>
|
||||
|
||||
<!-- E-Mail -->
|
||||
<!-- Benutzername -->
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
E-Mail-Adresse
|
||||
<label for="username" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Benutzername
|
||||
</label>
|
||||
<input type="email" name="email" id="email" required
|
||||
value="{{ user.email }}"
|
||||
<input type="text" name="username" id="username" required
|
||||
value="{{ user.username }}"
|
||||
class="w-full px-4 py-3 border border-slate-300 dark:border-slate-600 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-slate-700 dark:text-white"
|
||||
placeholder="benutzer@mercedes-benz.com">
|
||||
placeholder="max.mustermann">
|
||||
</div>
|
||||
|
||||
<!-- Name -->
|
||||
|
@ -277,11 +277,11 @@
|
||||
>
|
||||
<!-- Profile Avatar -->
|
||||
<div class="w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center text-white text-xs font-medium">
|
||||
{{ current_user.email[0].upper() if current_user.email else 'U' }}
|
||||
{{ current_user.username[0].upper() if current_user.username else 'U' }}
|
||||
</div>
|
||||
<!-- User Info (nur auf größeren Geräten) -->
|
||||
<div class="hidden sm:block text-left ml-1">
|
||||
<div class="text-xs font-medium text-slate-900 dark:text-white transition-colors duration-300">{{ current_user.email.split('@')[0] if current_user.email else 'Benutzer' }}</div>
|
||||
<div class="text-xs font-medium text-slate-900 dark:text-white transition-colors duration-300">{{ current_user.username if current_user.username else 'Benutzer' }}</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@ -291,14 +291,14 @@
|
||||
<div class="px-4 py-3 border-b border-slate-200 dark:border-slate-600">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white font-medium">
|
||||
{{ current_user.email[0].upper() if current_user.email else 'U' }}
|
||||
{{ current_user.username[0].upper() if current_user.username else 'U' }}
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-sm font-medium text-slate-900 dark:text-white truncate">
|
||||
{{ current_user.full_name if current_user.full_name else current_user.email.split('@')[0] if current_user.email else 'Benutzer' }}
|
||||
{{ current_user.full_name if current_user.full_name else current_user.username if current_user.username else 'Benutzer' }}
|
||||
</p>
|
||||
<p class="text-xs text-slate-500 dark:text-slate-400 truncate">
|
||||
{{ current_user.email if current_user.email else 'Keine E-Mail' }}
|
||||
Benutzer: {{ current_user.username if current_user.username else 'Unbekannt' }}
|
||||
</p>
|
||||
{% if current_user.is_admin %}
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200 mt-1">
|
||||
|
@ -273,18 +273,24 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="space-y-8">
|
||||
<!-- Page Header -->
|
||||
<!-- Enhanced Page Header -->
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-6">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="w-12 h-12 flex-shrink-0">
|
||||
<svg class="w-full h-full text-slate-900 dark:text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="flex items-center gap-6">
|
||||
<div class="w-16 h-16 flex-shrink-0 bg-mercedes-blue text-white rounded-xl flex items-center justify-center">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-slate-900 dark:text-white tracking-tight">Schichtplan</h1>
|
||||
<p class="text-slate-500 dark:text-slate-400 mt-1">Planung und Überwachung Ihrer 3D-Druckprozesse</p>
|
||||
<h1 class="text-4xl font-bold text-mercedes-black dark:text-white tracking-tight">Produktionsplanung</h1>
|
||||
<p class="text-mercedes-gray dark:text-slate-400 mt-1 text-lg">Intelligente Planung und Überwachung Ihrer 3D-Druckprozesse</p>
|
||||
<div class="flex items-center mt-2 text-sm text-mercedes-blue">
|
||||
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
<span id="calendar-status">Live-Synchronisation aktiv</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
@ -292,96 +298,182 @@
|
||||
<button onclick="openCreateEventModal()"
|
||||
class="btn-primary flex items-center gap-2">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
|
||||
</svg>
|
||||
<span>Neuen Job planen</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
<button onclick="refreshCalendar()"
|
||||
<button onclick="openBatchPlanningModal()"
|
||||
class="btn-secondary flex items-center gap-2">
|
||||
<svg class="w-5 h-5" 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>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"/>
|
||||
</svg>
|
||||
<span>Batch-Planung</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
<button onclick="refreshCalendar()" id="refresh-button"
|
||||
class="btn-secondary flex items-center gap-2">
|
||||
<svg class="w-5 h-5" 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"/>
|
||||
</svg>
|
||||
<span>Aktualisieren</span>
|
||||
</button>
|
||||
<button onclick="exportCalendar()"
|
||||
class="btn-secondary flex items-center gap-2">
|
||||
<svg class="w-5 h-5" 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>
|
||||
<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>
|
||||
<span>Exportieren</span>
|
||||
</button>
|
||||
<button onclick="toggleAutoOptimization()" id="auto-opt-toggle"
|
||||
class="btn-secondary flex items-center gap-2">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
<span>Auto-Optimierung</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filter Section -->
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="flex flex-col lg:flex-row lg:items-end lg:justify-between gap-6">
|
||||
<div class="flex flex-col sm:flex-row sm:items-end gap-6">
|
||||
<!-- Drucker Filter -->
|
||||
<div class="group">
|
||||
<label for="printerFilter" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Drucker auswählen
|
||||
</label>
|
||||
<select id="printerFilter"
|
||||
class="block w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-800 text-slate-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
<option value="">Alle Produktionseinheiten</option>
|
||||
{% for printer in printers %}
|
||||
<option value="{{ printer.id }}">{{ printer.name }} {% if printer.location %}({{ printer.location }}){% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Status Filter -->
|
||||
<div class="group">
|
||||
<label for="statusFilter" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Status-Filter
|
||||
</label>
|
||||
<select id="statusFilter"
|
||||
class="block w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-800 text-slate-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
<option value="">Alle Status</option>
|
||||
<option value="running">Aktiv</option>
|
||||
<option value="queued">Warteschlange</option>
|
||||
<option value="completed">Abgeschlossen</option>
|
||||
<option value="cancelled">Abgebrochen</option>
|
||||
</select>
|
||||
<!-- Enhanced Filter and Analytics Section -->
|
||||
<div class="filter-section p-6">
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-mercedes-black dark:text-white mb-2">Intelligente Filter & Analyse</h3>
|
||||
<p class="text-sm text-mercedes-gray dark:text-slate-400">Optimieren Sie Ihre Produktionsplanung mit erweiterten Filteroptionen</p>
|
||||
</div>
|
||||
<button onclick="clearAllFilters()" class="text-sm text-mercedes-blue hover:text-blue-700 transition-colors">
|
||||
<svg class="w-4 h-4 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
Alle Filter zurücksetzen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6 mb-6">
|
||||
<!-- Enhanced Drucker Filter -->
|
||||
<div>
|
||||
<label for="printerFilter" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
|
||||
<svg class="w-4 h-4 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"/>
|
||||
</svg>
|
||||
Produktionseinheit
|
||||
</label>
|
||||
<select id="printerFilter" class="mercedes-form-input block w-full px-4 py-3 rounded-lg">
|
||||
<option value="">Alle Produktionseinheiten</option>
|
||||
{% for printer in printers %}
|
||||
<option value="{{ printer.id }}">{{ printer.name }} {% if printer.location %}({{ printer.location }}){% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Enhanced Status Filter -->
|
||||
<div>
|
||||
<label for="statusFilter" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
|
||||
<svg class="w-4 h-4 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.414A1 1 0 013 6.707V4z"/>
|
||||
</svg>
|
||||
Produktionsstatus
|
||||
</label>
|
||||
<select id="statusFilter" class="mercedes-form-input block w-full px-4 py-3 rounded-lg">
|
||||
<option value="">Alle Status</option>
|
||||
<option value="running">Aktiv</option>
|
||||
<option value="queued">Warteschlange</option>
|
||||
<option value="completed">Abgeschlossen</option>
|
||||
<option value="cancelled">Abgebrochen</option>
|
||||
<option value="maintenance">Wartung</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Priority Filter -->
|
||||
<div>
|
||||
<label for="priorityFilter" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
|
||||
<svg class="w-4 h-4 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
Prioritätsstufe
|
||||
</label>
|
||||
<select id="priorityFilter" class="mercedes-form-input block w-full px-4 py-3 rounded-lg">
|
||||
<option value="">Alle Prioritäten</option>
|
||||
<option value="urgent">Dringend</option>
|
||||
<option value="high">Hoch</option>
|
||||
<option value="normal">Standard</option>
|
||||
<option value="low">Niedrig</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Time Range Filter -->
|
||||
<div>
|
||||
<label for="timeRangeFilter" class="block text-sm font-medium text-mercedes-black dark:text-slate-300 mb-2">
|
||||
<svg class="w-4 h-4 inline mr-1" 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"/>
|
||||
</svg>
|
||||
Zeitbereich
|
||||
</label>
|
||||
<select id="timeRangeFilter" class="mercedes-form-input block w-full px-4 py-3 rounded-lg">
|
||||
<option value="">Alle Zeiten</option>
|
||||
<option value="today">Heute</option>
|
||||
<option value="tomorrow">Morgen</option>
|
||||
<option value="week">Diese Woche</option>
|
||||
<option value="month">Dieser Monat</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Analytics -->
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
<div class="stat-card active p-4">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-mercedes-gray dark:text-slate-400 mb-1">Aktive Jobs</h3>
|
||||
<div class="text-2xl font-bold text-green-600 dark:text-green-400" id="active-jobs">-</div>
|
||||
<div class="text-xs text-mercedes-gray dark:text-slate-400">Läuft derzeit</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 bg-green-100 dark:bg-green-900/30 rounded-lg flex items-center justify-center">
|
||||
<div class="w-3 h-3 bg-green-500 rounded-full animate-pulse"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Stats -->
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<div class="dashboard-card p-4 min-w-0">
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<h3 class="stat-label">Aktiv</h3>
|
||||
<div class="stat-value text-green-600 dark:text-green-400" id="active-jobs">0</div>
|
||||
</div>
|
||||
<div class="mb-stat-icon text-green-600 dark:text-green-400">
|
||||
<div class="w-3 h-3 bg-green-500 rounded-full"></div>
|
||||
</div>
|
||||
<div class="stat-card queued p-4">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-mercedes-gray dark:text-slate-400 mb-1">Warteschlange</h3>
|
||||
<div class="text-2xl font-bold text-blue-600 dark:text-blue-400" id="queued-jobs">-</div>
|
||||
<div class="text-xs text-mercedes-gray dark:text-slate-400">Geplant</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 bg-blue-100 dark:bg-blue-900/30 rounded-lg flex items-center justify-center">
|
||||
<div class="w-3 h-3 bg-blue-500 rounded-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-card p-4 min-w-0">
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<h3 class="stat-label">Wartend</h3>
|
||||
<div class="stat-value text-blue-600 dark:text-blue-400" id="queued-jobs">0</div>
|
||||
</div>
|
||||
<div class="mb-stat-icon text-blue-600 dark:text-blue-400">
|
||||
<div class="w-3 h-3 bg-blue-500 rounded-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-card time p-4">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-mercedes-gray dark:text-slate-400 mb-1">Heute geplant</h3>
|
||||
<div class="text-2xl font-bold text-orange-600 dark:text-orange-400" id="total-time">-h</div>
|
||||
<div class="text-xs text-mercedes-gray dark:text-slate-400">Produktionszeit</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 bg-orange-100 dark:bg-orange-900/30 rounded-lg flex items-center justify-center">
|
||||
<svg class="w-5 h-5 text-orange-600" 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"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-card p-4 min-w-0">
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<h3 class="stat-label">Heute</h3>
|
||||
<div class="stat-value text-orange-600 dark:text-orange-400" id="total-time">0h</div>
|
||||
</div>
|
||||
<div class="mb-stat-icon text-orange-600 dark:text-orange-400">
|
||||
<div class="w-3 h-3 bg-orange-500 rounded-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-card p-4">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-mercedes-gray dark:text-slate-400 mb-1">Auslastung</h3>
|
||||
<div class="text-2xl font-bold text-mercedes-blue dark:text-blue-400" id="utilization">-%</div>
|
||||
<div class="text-xs text-mercedes-gray dark:text-slate-400">Durchschnitt</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 bg-mercedes-silver rounded-lg flex items-center justify-center">
|
||||
<svg class="w-5 h-5 text-mercedes-black dark: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"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -677,4 +769,5 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
};
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user