"Refactor template files for calendar and guest status"
This commit is contained in:
@@ -10,30 +10,90 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="bg-professional">
|
||||
<div class="bg-professional" style="background: #f8fafc !important;">
|
||||
<!-- Dark Mode Override -->
|
||||
<style>
|
||||
.dark .bg-professional {
|
||||
background: #000000 !important;
|
||||
}
|
||||
.dark .professional-hero {
|
||||
background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .professional-container {
|
||||
background: #111111 !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .mb-glass {
|
||||
background: rgba(17, 17, 17, 0.95) !important;
|
||||
border-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
.dark .input-professional {
|
||||
background: #1a1a1a !important;
|
||||
border-color: #333333 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.dark .input-professional:focus {
|
||||
border-color: #3b82f6 !important;
|
||||
background: #222222 !important;
|
||||
}
|
||||
/* FullCalendar Dark Mode Anpassungen */
|
||||
.dark .fc {
|
||||
background: #111111 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.dark .fc-theme-standard td,
|
||||
.dark .fc-theme-standard th {
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .fc-button {
|
||||
background: #1a1a1a !important;
|
||||
border-color: #333333 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.dark .fc-button:hover {
|
||||
background: #333333 !important;
|
||||
}
|
||||
.dark .fc-button-primary:not(:disabled).fc-button-active {
|
||||
background: #3b82f6 !important;
|
||||
border-color: #3b82f6 !important;
|
||||
}
|
||||
.dark .fc-col-header-cell {
|
||||
background: #1a1a1a !important;
|
||||
}
|
||||
.dark .fc-daygrid-day {
|
||||
background: #111111 !important;
|
||||
}
|
||||
.dark .fc-timegrid-slot {
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .fc-timegrid-axis {
|
||||
background: #1a1a1a !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Professional Hero Header -->
|
||||
<div class="professional-hero hero-pattern animate-fade-in">
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-black/10 to-black/20 dark:from-black/20 dark:to-black/40"></div>
|
||||
<div class="professional-hero hero-pattern animate-fade-in" style="margin: 2rem; margin-bottom: 3rem;">
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-black/10 to-black/20 dark:from-black/40 dark:to-black/60"></div>
|
||||
|
||||
<!-- Status Indicator -->
|
||||
<div class="absolute top-6 right-6 flex items-center space-x-3 z-10">
|
||||
<div class="mb-glass rounded-full px-4 py-2 animate-scale-in">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="absolute top-6 right-6 flex items-center space-x-4 z-10">
|
||||
<div class="mb-glass rounded-full px-6 py-3 animate-scale-in">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="status-dot status-online"></div>
|
||||
<span class="text-sm font-semibold text-professional-primary">Live</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-glass rounded-full px-4 py-2 animate-scale-in">
|
||||
<div class="mb-glass rounded-full px-6 py-3 animate-scale-in">
|
||||
<span id="live-time" class="text-sm font-semibold text-professional-primary"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative max-w-7xl mx-auto px-6 lg:px-8 py-16 z-10">
|
||||
<div class="relative max-w-7xl mx-auto px-6 lg:px-8 py-20 z-10">
|
||||
<div class="text-center animate-slide-up">
|
||||
<!-- Mercedes-Benz Logo -->
|
||||
<div class="inline-flex items-center justify-center w-24 h-24 mb-glass rounded-full mb-8 professional-shadow">
|
||||
<svg class="w-12 h-12 text-professional-primary" viewBox="0 0 80 80" fill="currentColor">
|
||||
<div class="inline-flex items-center justify-center w-28 h-28 mb-glass rounded-full mb-10 professional-shadow">
|
||||
<svg class="w-14 h-14 text-professional-primary" 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
|
||||
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
|
||||
c0-13.1,7-24.5,17.5-30.9v0C26.6,6,32.5,4.2,39,4l-4.5,32.7L21.5,46.8v0L8.3,57.1C5.6,52,4,46.2,4,40z M58.6,70.8
|
||||
@@ -43,18 +103,18 @@
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h1 class="title-professional text-5xl md:text-6xl font-bold mb-6 tracking-tight">
|
||||
<h1 class="title-professional text-6xl md:text-7xl font-bold mb-8 tracking-tight">
|
||||
Intelligenter Schichtplan
|
||||
</h1>
|
||||
<p class="subtitle-professional text-xl md:text-2xl max-w-4xl mx-auto leading-relaxed mb-8">
|
||||
<p class="subtitle-professional text-2xl md:text-3xl max-w-5xl mx-auto leading-relaxed mb-12">
|
||||
Fortschrittliche Planung und Überwachung Ihrer 3D-Druckprozesse mit Mercedes-Benz Präzision
|
||||
</p>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="flex flex-wrap justify-center gap-4">
|
||||
<div class="flex flex-wrap justify-center gap-6">
|
||||
{% if can_edit %}
|
||||
<button onclick="openCreateEventModal()"
|
||||
class="btn-professional group">
|
||||
class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-90 transition-transform duration-300" 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>
|
||||
</svg>
|
||||
@@ -62,14 +122,14 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
<button onclick="refreshCalendar()"
|
||||
class="btn-secondary-professional group">
|
||||
class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-180 transition-transform duration-500" 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>
|
||||
</svg>
|
||||
<span>Aktualisieren</span>
|
||||
</button>
|
||||
<button onclick="exportCalendar()"
|
||||
class="btn-secondary-professional group">
|
||||
class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:scale-110 transition-transform duration-300" 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>
|
||||
</svg>
|
||||
@@ -80,27 +140,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-8 relative z-10">
|
||||
<div class="max-w-7xl mx-auto px-6 lg:px-8 -mt-12 relative z-10" style="margin-bottom: 4rem;">
|
||||
|
||||
<!-- Filter Section -->
|
||||
<div class="professional-container p-8 mb-8 animate-slide-up">
|
||||
<div class="flex flex-col lg:flex-row lg:items-center lg:justify-between space-y-6 lg:space-y-0">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:space-x-6 space-y-4 sm:space-y-0">
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem; margin-bottom: 3rem;">
|
||||
<div class="flex flex-col lg:flex-row lg:items-center lg:justify-between space-y-8 lg:space-y-0">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:space-x-8 space-y-6 sm:space-y-0">
|
||||
<!-- Drucker Filter -->
|
||||
<div class="group">
|
||||
<label for="printerFilter" class="block text-sm font-semibold text-professional-primary mb-2">
|
||||
<label for="printerFilter" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Drucker auswählen
|
||||
</label>
|
||||
<div class="relative">
|
||||
<select id="printerFilter"
|
||||
class="input-professional appearance-none pr-12 cursor-pointer">
|
||||
class="input-professional appearance-none pr-12 cursor-pointer w-full text-base py-4 px-5" style="border-radius: 1rem;">
|
||||
<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 class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none">
|
||||
<svg class="h-5 w-5 text-professional-muted group-hover:text-professional-primary transition-colors duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-5 pointer-events-none">
|
||||
<svg class="h-6 w-6 text-professional-muted group-hover:text-professional-primary transition-colors duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||
</svg>
|
||||
</div>
|
||||
@@ -109,20 +169,20 @@
|
||||
|
||||
<!-- Status Filter -->
|
||||
<div class="group">
|
||||
<label for="statusFilter" class="block text-sm font-semibold text-professional-primary mb-2">
|
||||
<label for="statusFilter" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Status-Filter
|
||||
</label>
|
||||
<div class="relative">
|
||||
<select id="statusFilter"
|
||||
class="input-professional appearance-none pr-12 cursor-pointer">
|
||||
class="input-professional appearance-none pr-12 cursor-pointer w-full text-base py-4 px-5" style="border-radius: 1rem;">
|
||||
<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>
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none">
|
||||
<svg class="h-5 w-5 text-professional-muted group-hover:text-professional-primary transition-colors duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-5 pointer-events-none">
|
||||
<svg class="h-6 w-6 text-professional-muted group-hover:text-professional-primary transition-colors duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||
</svg>
|
||||
</div>
|
||||
@@ -131,30 +191,30 @@
|
||||
</div>
|
||||
|
||||
<!-- Quick Stats -->
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<div class="status-professional status-approved">
|
||||
<div class="flex flex-wrap gap-6">
|
||||
<div class="status-professional status-approved" style="min-width: 160px; padding: 1.5rem;">
|
||||
<div class="status-dot status-online"></div>
|
||||
<span id="active-jobs">0 Aktiv</span>
|
||||
<span id="active-jobs" class="text-lg font-bold">0 Aktiv</span>
|
||||
</div>
|
||||
<div class="status-professional" style="background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: var(--mb-primary);">
|
||||
<div class="w-3 h-3 bg-blue-500 rounded-full"></div>
|
||||
<span id="queued-jobs">0 Wartend</span>
|
||||
<div class="status-professional" style="background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: var(--mb-primary); min-width: 160px; padding: 1.5rem;">
|
||||
<div class="w-4 h-4 bg-blue-500 rounded-full"></div>
|
||||
<span id="queued-jobs" class="text-lg font-bold">0 Wartend</span>
|
||||
</div>
|
||||
<div class="status-professional" style="background: rgba(251, 146, 60, 0.1); border-color: rgba(251, 146, 60, 0.3); color: #ea580c;">
|
||||
<div class="w-3 h-3 bg-orange-500 rounded-full"></div>
|
||||
<span id="total-time">0h Heute</span>
|
||||
<div class="status-professional" style="background: rgba(251, 146, 60, 0.1); border-color: rgba(251, 146, 60, 0.3); color: #ea580c; min-width: 160px; padding: 1.5rem;">
|
||||
<div class="w-4 h-4 bg-orange-500 rounded-full"></div>
|
||||
<span id="total-time" class="text-lg font-bold">0h Heute</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Container -->
|
||||
<div class="professional-container p-6 animate-slide-up">
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem; margin-bottom: 3rem;">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
|
||||
<!-- Legend Section -->
|
||||
<div class="professional-container p-8 mt-8 animate-slide-up">
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem;">
|
||||
<div class="text-center mb-6">
|
||||
<h3 class="text-xl font-bold text-professional-primary mb-2">
|
||||
Status-Legende
|
||||
|
@@ -9,39 +9,91 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900 dark:via-slate-800 dark:to-slate-900">
|
||||
<div class="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<div class="bg-professional" style="background: #f8fafc !important;">
|
||||
<!-- Dark Mode Override -->
|
||||
<style>
|
||||
.dark .bg-professional {
|
||||
background: #000000 !important;
|
||||
}
|
||||
.dark .professional-hero {
|
||||
background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .professional-container {
|
||||
background: #111111 !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
.dark .mb-glass {
|
||||
background: rgba(17, 17, 17, 0.95) !important;
|
||||
border-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Professional Hero Header -->
|
||||
<div class="professional-hero hero-pattern animate-fade-in" style="margin: 2rem; margin-bottom: 3rem;">
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-black/10 to-black/20 dark:from-black/40 dark:to-black/60"></div>
|
||||
|
||||
<!-- Header -->
|
||||
<div class="mb-8 text-center">
|
||||
<h1 class="text-4xl font-bold text-slate-900 dark:text-white mb-4">Anfrage-Status</h1>
|
||||
<p class="text-slate-600 dark:text-slate-400 text-lg">
|
||||
Status Ihrer Gastanfrage für 3D-Druck
|
||||
</p>
|
||||
<!-- Status Indicator -->
|
||||
<div class="absolute top-6 right-6 flex items-center space-x-4 z-10">
|
||||
<div class="mb-glass rounded-full px-6 py-3 animate-scale-in">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="status-dot status-online"></div>
|
||||
<span class="text-sm font-semibold text-professional-primary">Live Status</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-glass rounded-full px-6 py-3 animate-scale-in">
|
||||
<span id="live-time" class="text-sm font-semibold text-professional-primary"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative max-w-6xl mx-auto px-6 lg:px-8 py-20 z-10">
|
||||
<div class="text-center animate-slide-up">
|
||||
<!-- Mercedes-Benz Logo -->
|
||||
<div class="inline-flex items-center justify-center w-28 h-28 mb-glass rounded-full mb-10 professional-shadow">
|
||||
<svg class="w-14 h-14 text-professional-primary" 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
|
||||
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
|
||||
c0-13.1,7-24.5,17.5-30.9v0C26.6,6,32.5,4.2,39,4l-4.5,32.7L21.5,46.8v0L8.3,57.1C5.6,52,4,46.2,4,40z M58.6,70.8
|
||||
C53.1,74.1,46.8,76,40,76c-6.8,0-13.2-1.9-18.6-5.2c-4.9-2.9-8.9-6.9-11.9-11.7l11.9-4.9v0L40,46.6l18.6,7.5v0l12,4.9
|
||||
C67.6,63.9,63.4,67.9,58.6,70.8z M58.6,46.8L58.6,46.8l-12.9-10L41.1,4c6.3,0.2,12.3,2,17.4,5.1v0C69,15.4,76,26.9,76,40
|
||||
c0,6.2-1.5,12-4.3,17.1L58.6,46.8z"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h1 class="title-professional text-6xl md:text-7xl font-bold mb-8 tracking-tight">
|
||||
Anfrage-Status
|
||||
</h1>
|
||||
<p class="subtitle-professional text-2xl md:text-3xl max-w-5xl mx-auto leading-relaxed mb-12">
|
||||
Verfolgen Sie den Status Ihrer Gastanfrage für 3D-Druck in Echtzeit
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="max-w-4xl mx-auto px-6 lg:px-8 -mt-12 relative z-10" style="margin-bottom: 4rem;">
|
||||
|
||||
<!-- Status Card -->
|
||||
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-xl p-8 mb-6">
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem; margin-bottom: 2rem;">
|
||||
|
||||
<!-- Status Badge -->
|
||||
<div class="flex justify-center mb-6">
|
||||
<div class="flex justify-center mb-8">
|
||||
{% if request.status == 'pending' %}
|
||||
<div class="inline-flex items-center px-6 py-3 rounded-full bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200">
|
||||
<svg class="w-5 h-5 mr-2 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="inline-flex items-center px-8 py-4 rounded-3xl bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 text-lg font-bold">
|
||||
<svg class="w-6 h-6 mr-3 animate-spin" 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>
|
||||
</svg>
|
||||
Wird geprüft
|
||||
</div>
|
||||
{% elif request.status == 'approved' %}
|
||||
<div class="inline-flex items-center px-6 py-3 rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200">
|
||||
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="inline-flex items-center px-8 py-4 rounded-3xl bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200 text-lg font-bold">
|
||||
<svg class="w-6 h-6 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
||||
</svg>
|
||||
Genehmigt
|
||||
</div>
|
||||
{% elif request.status == 'denied' %}
|
||||
<div class="inline-flex items-center px-6 py-3 rounded-full bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200">
|
||||
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="inline-flex items-center px-8 py-4 rounded-3xl bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200 text-lg font-bold">
|
||||
<svg class="w-6 h-6 mr-3" 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"></path>
|
||||
</svg>
|
||||
Abgelehnt
|
||||
@@ -50,235 +102,212 @@
|
||||
</div>
|
||||
|
||||
<!-- Anfrage-Details -->
|
||||
<div class="space-y-4 mb-6">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-slate-500 dark:text-slate-400">Anfrage-ID</h3>
|
||||
<p class="text-lg font-semibold text-slate-900 dark:text-white">#{{ request.id }}</p>
|
||||
<div class="space-y-8 mb-10">
|
||||
<div class="text-center mb-12">
|
||||
<h2 class="title-professional text-3xl font-bold mb-4">
|
||||
Anfrage Details
|
||||
</h2>
|
||||
<p class="subtitle-professional text-lg">
|
||||
Übersicht Ihrer eingereichten Gastanfrage
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
<div class="mb-glass p-6 rounded-2xl">
|
||||
<h3 class="text-base font-bold text-professional-primary mb-3">Anfrage-ID</h3>
|
||||
<p class="text-2xl font-bold text-professional-accent">#{{ request.id }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-slate-500 dark:text-slate-400">Erstellt am</h3>
|
||||
<p class="text-lg font-semibold text-slate-900 dark:text-white">{{ request.created_at|format_datetime }}</p>
|
||||
<div class="mb-glass p-6 rounded-2xl">
|
||||
<h3 class="text-base font-bold text-professional-primary mb-3">Erstellt am</h3>
|
||||
<p class="text-2xl font-bold text-professional-primary">{{ request.created_at|format_datetime }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-slate-500 dark:text-slate-400">Name</h3>
|
||||
<p class="text-lg font-semibold text-slate-900 dark:text-white">{{ request.name }}</p>
|
||||
<div class="mb-glass p-6 rounded-2xl">
|
||||
<h3 class="text-base font-bold text-professional-primary mb-3">Name</h3>
|
||||
<p class="text-2xl font-bold text-professional-primary">{{ request.name }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-slate-500 dark:text-slate-400">Gewünschte Dauer</h3>
|
||||
<p class="text-lg font-semibold text-slate-900 dark:text-white">{{ request.duration_min }} Minuten</p>
|
||||
<div class="mb-glass p-6 rounded-2xl">
|
||||
<h3 class="text-base font-bold text-professional-primary mb-3">Gewünschte Dauer</h3>
|
||||
<p class="text-2xl font-bold text-professional-accent">{{ request.duration_min }} Minuten</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if request.reason %}
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-slate-500 dark:text-slate-400">Begründung</h3>
|
||||
<p class="text-slate-900 dark:text-white mt-1">{{ request.reason }}</p>
|
||||
<div class="mb-glass p-6 rounded-2xl">
|
||||
<h3 class="text-base font-bold text-professional-primary mb-4">Begründung</h3>
|
||||
<p class="text-professional-secondary text-lg leading-relaxed">{{ request.reason }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if request.printer %}
|
||||
<div>
|
||||
<h3 class="text-sm font-medium text-slate-500 dark:text-slate-400">Drucker</h3>
|
||||
<p class="text-slate-900 dark:text-white mt-1">{{ request.printer.name }} {% if request.printer.location %}({{ request.printer.location }}){% endif %}</p>
|
||||
<div class="mb-glass p-6 rounded-2xl">
|
||||
<h3 class="text-base font-bold text-professional-primary mb-4">Drucker</h3>
|
||||
<p class="text-professional-secondary text-lg">{{ request.printer.name }} {% if request.printer.location %}({{ request.printer.location }}){% endif %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Status-spezifische Inhalte -->
|
||||
{% if request.status == 'pending' %}
|
||||
<div class="bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-700 rounded-xl p-4">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
<svg class="h-5 w-5 text-yellow-400" fill="currentColor" viewBox="0 0 20 20">
|
||||
<div class="alert-professional alert-warning" style="border-radius: 2rem; padding: 2.5rem;">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-yellow-500 to-orange-600 rounded-3xl flex items-center justify-center">
|
||||
<svg class="h-8 w-8 text-white" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-yellow-800 dark:text-yellow-200">Ihre Anfrage wird geprüft</h3>
|
||||
<p class="text-sm text-yellow-700 dark:text-yellow-300 mt-1">
|
||||
Unser Team prüft Ihre Anfrage. Sie erhalten eine Benachrichtigung, sobald eine Entscheidung getroffen wurde.
|
||||
Diese Seite aktualisiert sich automatisch alle 30 Sekunden.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 ml-8">
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-4">Ihre Anfrage wird geprüft</h3>
|
||||
<p class="text-lg text-professional-secondary leading-relaxed">
|
||||
Unser Team prüft Ihre Anfrage mit höchster Priorität. Sie erhalten eine sofortige Benachrichtigung, sobald eine Entscheidung getroffen wurde.
|
||||
Diese Seite aktualisiert sich automatisch alle 30 Sekunden.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif request.status == 'approved' %}
|
||||
<div class="mb-8 p-6 bg-gradient-to-r from-green-50 to-emerald-50 dark:from-green-900/20 dark:to-emerald-900/20 border border-green-200 dark:border-green-700 rounded-2xl">
|
||||
<div class="flex items-center mb-4">
|
||||
<div class="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center mr-4">
|
||||
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="alert-professional alert-success" style="border-radius: 2rem; padding: 2.5rem; margin-bottom: 2rem;">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-green-500 to-emerald-600 rounded-3xl flex items-center justify-center">
|
||||
<svg class="h-8 w-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-green-800 dark:text-green-200">Anfrage genehmigt!</h3>
|
||||
<p class="text-green-700 dark:text-green-300">Ihr Druckauftrag wurde genehmigt und ist bereit zum Start.</p>
|
||||
</div>
|
||||
<div class="flex-1 ml-8">
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-4">Anfrage genehmigt!</h3>
|
||||
<p class="text-lg text-professional-secondary leading-relaxed">Ihr Druckauftrag wurde genehmigt und ist bereit zum Start.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if otp_code %}
|
||||
<!-- Code-Anzeige -->
|
||||
<div class="professional-container" style="padding: 2.5rem; border-radius: 2rem; margin-bottom: 2rem;">
|
||||
<h4 class="text-2xl font-bold text-professional-primary mb-8 text-center">Ihr Zugangscode</h4>
|
||||
|
||||
<!-- 6-stelliger Code in schönen Boxen -->
|
||||
<div class="flex justify-center space-x-4 mb-8">
|
||||
{% for char in otp_code %}
|
||||
<div class="w-20 h-20 bg-gradient-to-br from-blue-500 to-indigo-600 text-white rounded-2xl flex items-center justify-center text-3xl font-bold shadow-lg transform hover:scale-105 transition-transform duration-300">
|
||||
{{ char }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- Code zum Kopieren -->
|
||||
<div class="text-center mb-8">
|
||||
<div class="inline-flex items-center mb-glass rounded-2xl px-6 py-4">
|
||||
<span class="text-2xl font-mono font-bold text-professional-primary mr-4" id="otpCode">{{ otp_code }}</span>
|
||||
<button onclick="copyCode()" class="text-professional-accent hover:text-professional-primary transition-colors duration-200" title="Code kopieren">
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if otp_code %}
|
||||
<!-- Code-Anzeige -->
|
||||
<div class="bg-white dark:bg-slate-800 rounded-xl p-6 mb-6 border border-green-200 dark:border-green-700">
|
||||
<h4 class="text-lg font-semibold text-slate-900 dark:text-white mb-4 text-center">Ihr Zugangscode</h4>
|
||||
|
||||
<!-- 6-stelliger Code in schönen Boxen -->
|
||||
<div class="flex justify-center space-x-3 mb-4">
|
||||
{% for char in otp_code %}
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-blue-500 to-indigo-600 text-white rounded-xl flex items-center justify-center text-2xl font-bold shadow-lg">
|
||||
{{ char }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- Code zum Kopieren -->
|
||||
<div class="text-center mb-4">
|
||||
<div class="inline-flex items-center bg-slate-100 dark:bg-slate-700 rounded-lg px-4 py-2">
|
||||
<span class="text-lg font-mono font-bold text-slate-900 dark:text-white mr-3" id="otpCode">{{ otp_code }}</span>
|
||||
<button onclick="copyCode()" class="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300" title="Code kopieren">
|
||||
<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="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Wichtige Hinweise -->
|
||||
<div class="bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg p-4 mb-4">
|
||||
<div class="flex items-start">
|
||||
<div class="w-6 h-6 bg-amber-500 rounded-full flex items-center justify-center mr-3 mt-0.5">
|
||||
<svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.5 0L3.734 16.5c-.77.833.192 2.5 1.732 2.5z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="font-semibold text-amber-800 dark:text-amber-200 mb-2">Wichtige Hinweise:</h5>
|
||||
<ul class="text-sm text-amber-700 dark:text-amber-300 space-y-1">
|
||||
<li>• Dieser Code ist nur <strong>einmalig verwendbar</strong></li>
|
||||
<li>• Notieren Sie sich den Code oder speichern Sie diese Seite</li>
|
||||
<li>• Bei Verlust des Codes kontaktieren Sie den Administrator</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Start-Button -->
|
||||
<div class="text-center">
|
||||
<a href="{{ url_for('guest.guest_start_job_form') }}"
|
||||
class="inline-flex items-center px-8 py-4 bg-gradient-to-r from-green-600 to-emerald-600 text-white font-semibold rounded-2xl hover:from-green-700 hover:to-emerald-700 transform transition-all duration-300 hover:scale-105 shadow-lg">
|
||||
<svg class="w-6 h-6 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.828 14.828a4 4 0 01-5.656 0M9 10h1m4 0h1m-6 4h.01M12 5v.01M12 19v.01M12 12h.01M12 9a3 3 0 100-6 3 3 0 000 6zm0 0a3 3 0 100 6 3 3 0 000-6z"/>
|
||||
<!-- Wichtige Hinweise -->
|
||||
<div class="alert-professional alert-warning" style="border-radius: 1.5rem; padding: 2rem; margin-bottom: 2rem;">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-12 h-12 bg-gradient-to-br from-amber-500 to-orange-600 rounded-2xl flex items-center justify-center">
|
||||
<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 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.5 0L3.734 16.5c-.77.833.192 2.5 1.732 2.5z"/>
|
||||
</svg>
|
||||
Job jetzt starten
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 ml-6">
|
||||
<h5 class="text-xl font-bold text-professional-primary mb-4">Wichtige Hinweise:</h5>
|
||||
<ul class="text-base text-professional-secondary space-y-2">
|
||||
<li>• Dieser Code ist nur <strong>einmalig verwendbar</strong></li>
|
||||
<li>• Notieren Sie sich den Code oder speichern Sie diese Seite</li>
|
||||
<li>• Bei Verlust des Codes kontaktieren Sie den Administrator</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% elif show_start_link %}
|
||||
<!-- Code bereits vorhanden, aber noch nicht verwendet -->
|
||||
<div class="bg-white dark:bg-slate-800 rounded-xl p-6 border border-green-200 dark:border-green-700">
|
||||
<div class="text-center">
|
||||
<div class="w-16 h-16 bg-gradient-to-r from-blue-500 to-indigo-500 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-3a1 1 0 011-1h2.586l6.243-6.243A6 6 0 0121 9z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h4 class="text-lg font-semibold text-slate-900 dark:text-white mb-2">Zugangscode bereits generiert</h4>
|
||||
<p class="text-slate-600 dark:text-slate-400 mb-6">Ihr persönlicher Code wurde bereits erstellt und ist bereit zur Verwendung.</p>
|
||||
|
||||
<a href="{{ url_for('guest.guest_start_job_form') }}"
|
||||
class="inline-flex items-center px-8 py-4 bg-gradient-to-r from-blue-600 to-indigo-600 text-white font-semibold rounded-2xl hover:from-blue-700 hover:to-indigo-700 transform transition-all duration-300 hover:scale-105 shadow-lg">
|
||||
<svg class="w-6 h-6 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-3a1 1 0 011-1h2.586l6.243-6.243A6 6 0 0121 9z"/>
|
||||
</svg>
|
||||
Code eingeben und starten
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Start-Button -->
|
||||
<div class="text-center">
|
||||
<a href="{{ url_for('guest.guest_start_job_form') }}"
|
||||
class="btn-success-professional group px-10 py-5 text-lg">
|
||||
<svg class="w-6 h-6 mr-4 group-hover:scale-110 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.828 14.828a4 4 0 01-5.656 0M9 10h1m4 0h1m-6 4h.01M12 5v.01M12 19v.01M12 12h.01M12 9a3 3 0 100-6 3 3 0 000 6zm0 0a3 3 0 100 6 3 3 0 000-6z"/>
|
||||
</svg>
|
||||
Job jetzt starten
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elif show_start_link %}
|
||||
<!-- Code bereits vorhanden, aber noch nicht verwendet -->
|
||||
<div class="professional-container" style="padding: 2.5rem; border-radius: 2rem;">
|
||||
<div class="text-center">
|
||||
<div class="w-20 h-20 bg-gradient-to-r from-blue-500 to-indigo-500 rounded-full flex items-center justify-center mx-auto mb-6">
|
||||
<svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-3a1 1 0 011-1h2.586l6.243-6.243A6 6 0 0121 9z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h4 class="text-2xl font-bold text-professional-primary mb-4">Zugangscode bereits generiert</h4>
|
||||
<p class="text-lg text-professional-secondary mb-8">Ihr persönlicher Code wurde bereits erstellt und ist bereit zur Verwendung.</p>
|
||||
|
||||
<a href="{{ url_for('guest.guest_start_job_form') }}"
|
||||
class="btn-professional group px-10 py-5 text-lg">
|
||||
<svg class="w-6 h-6 mr-4 group-hover:scale-110 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-3a1 1 0 011-1h2.586l6.243-6.243A6 6 0 0121 9z"/>
|
||||
</svg>
|
||||
Code eingeben und starten
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% elif request.status == 'denied' %}
|
||||
<div class="bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-700 rounded-xl p-4">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
<svg class="h-5 w-5 text-red-400" fill="currentColor" viewBox="0 0 20 20">
|
||||
<div class="alert-professional alert-danger" style="border-radius: 2rem; padding: 2.5rem;">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-red-500 to-red-600 rounded-3xl flex items-center justify-center">
|
||||
<svg class="h-8 w-8 text-white" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-red-800 dark:text-red-200">Anfrage abgelehnt</h3>
|
||||
<p class="text-sm text-red-700 dark:text-red-300 mt-1">
|
||||
Ihre Anfrage wurde leider abgelehnt. Bei Fragen wenden Sie sich bitte an unser Team.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 ml-8">
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-4">Anfrage abgelehnt</h3>
|
||||
<p class="text-lg text-professional-secondary leading-relaxed">
|
||||
Ihre Anfrage wurde leider abgelehnt. Bei Fragen wenden Sie sich bitte an unser Team.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Aktionen -->
|
||||
<div class="flex items-center justify-center space-x-4">
|
||||
<div class="flex items-center justify-center space-x-6">
|
||||
<a href="{{ url_for('guest.guest_request_form') }}"
|
||||
class="px-6 py-3 border border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-700 transition-all duration-300">
|
||||
class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:scale-110 transition-transform duration-300" 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"/>
|
||||
</svg>
|
||||
Neue Anfrage stellen
|
||||
</a>
|
||||
<button onclick="location.reload()"
|
||||
class="px-6 py-3 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-all duration-300">
|
||||
class="btn-professional group px-8 py-4">
|
||||
<svg class="w-6 h-6 mr-3 group-hover:rotate-180 transition-transform duration-500" 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>
|
||||
Aktualisieren
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if request.status == 'approved' and otp_code and job %}
|
||||
<script>
|
||||
async function startJob() {
|
||||
const btn = document.getElementById('startJobBtn');
|
||||
const originalText = btn.textContent;
|
||||
|
||||
btn.disabled = true;
|
||||
btn.textContent = 'Wird gestartet...';
|
||||
|
||||
try {
|
||||
const response = await fetch(`/api/jobs/start/{{ otp_code }}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
});
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
if (result.success) {
|
||||
alert('3D-Druck erfolgreich gestartet!');
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Fehler beim Starten: ' + (result.error || 'Unbekannter Fehler'));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Starten des Jobs:', error);
|
||||
alert('Fehler beim Starten des 3D-Drucks. Bitte versuchen Sie es später erneut.');
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
btn.textContent = originalText;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
updateDateTime();
|
||||
setInterval(updateDateTime, 1000);
|
||||
});
|
||||
|
||||
function updateDateTime() {
|
||||
// Live Time Update
|
||||
function updateLiveTime() {
|
||||
const now = new Date();
|
||||
document.getElementById('current-time').textContent = now.toLocaleTimeString('de-DE');
|
||||
document.getElementById('live-time').textContent = now.toLocaleTimeString('de-DE');
|
||||
}
|
||||
updateLiveTime();
|
||||
setInterval(updateLiveTime, 1000);
|
||||
|
||||
// Code-Kopier-Funktion für genehmigte Anfragen
|
||||
// Code-Kopier-Funktion
|
||||
function copyCode() {
|
||||
const codeElement = document.getElementById('otpCode');
|
||||
if (codeElement) {
|
||||
@@ -326,7 +355,7 @@ function showCopySuccess() {
|
||||
const originalHTML = button.innerHTML;
|
||||
|
||||
button.innerHTML = `
|
||||
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
|
||||
</svg>
|
||||
`;
|
||||
|
Reference in New Issue
Block a user