"Update database configuration for improved performance (#123)"
This commit is contained in:
parent
b6c6a9d688
commit
a1f9e70fd2
Binary file not shown.
@ -490,10 +490,15 @@ systemctl stop myp-druckerverwaltung
|
||||
# Erstelle Backup
|
||||
tar -czf "$BACKUP_DIR/myp_backup_$DATE.tar.gz" \
|
||||
-C "$APP_DIR" \
|
||||
--exclude='node_modules' \
|
||||
--exclude='__pycache__' \
|
||||
--exclude='venv' \
|
||||
database.db \
|
||||
.env \
|
||||
uploads/ \
|
||||
logs/ 2>/dev/null || true
|
||||
logs/ \
|
||||
config/ \
|
||||
2>/dev/null || true
|
||||
|
||||
# Starte Anwendung
|
||||
systemctl start myp-druckerverwaltung
|
||||
@ -565,17 +570,12 @@ info " • Nur Kiosk neustarten: myp-maintenance kiosk-restart"
|
||||
info " • Update: myp-maintenance update"
|
||||
info " • Backup erstellen: myp-backup"
|
||||
echo
|
||||
info "🖥️ Kiosk-Modus (nach offizieller Raspberry Pi Anleitung):"
|
||||
info " • Automatischer Login als '$KIOSK_USER' Benutzer"
|
||||
info " • Chromium-Browser im Vollbild-Kiosk-Modus"
|
||||
info " • Automatische Anzeige von $KIOSK_URL"
|
||||
info " • Versteckter Mauszeiger"
|
||||
info " • Deaktivierte Bildschirmschoner"
|
||||
echo
|
||||
info "🔍 Zusätzliche Konfiguration:"
|
||||
info " • Kiosk-Skript: /home/$KIOSK_USER/kiosk.sh"
|
||||
info " • LightDM-Konfiguration: /etc/lightdm/lightdm.conf"
|
||||
info " • Openbox-Autostart: /home/$KIOSK_USER/.config/openbox/autostart"
|
||||
info " • Anwendungslogs: journalctl -u myp-druckerverwaltung -f"
|
||||
info " • Kiosk-Logs: journalctl -u myp-kiosk -f"
|
||||
echo
|
||||
warning "⚠️ Wichtiger Hinweis:"
|
||||
warning " Starte das System neu, um den Kiosk-Modus zu aktivieren:"
|
||||
|
2
backend/app/static/css/tailwind.min.css
vendored
2
backend/app/static/css/tailwind.min.css
vendored
File diff suppressed because one or more lines are too long
@ -8,334 +8,210 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="bg-professional">
|
||||
<!-- 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;
|
||||
}
|
||||
.dark .card-professional {
|
||||
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>
|
||||
|
||||
<!-- 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">Online</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"/>
|
||||
<div class="space-y-8">
|
||||
<!-- 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">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-slate-900 dark:text-white tracking-tight">Gastanfrage</h1>
|
||||
<p class="text-slate-500 dark:text-slate-400 mt-1">Antrag für 3D-Druckauftrag einreichen</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<a href="{{ url_for('guest.guest_requests_overview') }}"
|
||||
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="M9 12h6m-6 4h6m2 5H7a2 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>Anträge Übersicht</span>
|
||||
</a>
|
||||
<a href="{{ url_for('index') }}"
|
||||
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="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
|
||||
</svg>
|
||||
<span>Startseite</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 class="title-professional text-6xl md:text-7xl font-bold mb-8 tracking-tight">
|
||||
Premium Gastanfrage
|
||||
</h1>
|
||||
<p class="subtitle-professional text-2xl md:text-3xl max-w-5xl mx-auto leading-relaxed mb-12">
|
||||
Exklusiver Zugang zu unseren hochmodernen 3D-Produktionsanlagen mit Mercedes-Benz Qualitätsstandard
|
||||
</p>
|
||||
|
||||
<!-- Key Features -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mt-16">
|
||||
<div class="card-professional text-center" style="padding: 2rem;">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-blue-400 to-blue-600 rounded-2xl mx-auto mb-6 flex items-center justify-center">
|
||||
<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="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-professional-primary mb-4">Automatisierte Prüfverfahren für maximale Effizienz</h3>
|
||||
<p class="text-professional-muted">Schnelle Bearbeitung Ihrer Anfrage</p>
|
||||
</div>
|
||||
<div class="card-professional text-center" style="padding: 2rem;">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-green-400 to-green-600 rounded-2xl mx-auto mb-6 flex items-center justify-center">
|
||||
<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="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-professional-primary mb-4">Professionelle 3D-Drucker nach Industriestandard</h3>
|
||||
<p class="text-professional-muted">Höchste Qualität für Ihre Projekte</p>
|
||||
</div>
|
||||
<div class="card-professional text-center" style="padding: 2rem;">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-purple-400 to-purple-600 rounded-2xl mx-auto mb-6 flex items-center justify-center">
|
||||
<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="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-professional-primary mb-4">24/7 verfügbar nach Terminvereinbarung</h3>
|
||||
<p class="text-professional-muted">Flexible Zeiten für Ihre Bedürfnisse</p>
|
||||
</div>
|
||||
<!-- Info Banner -->
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="flex items-start gap-4">
|
||||
<div class="w-12 h-12 bg-blue-100 dark:bg-blue-900/30 rounded-xl flex items-center justify-center flex-shrink-0">
|
||||
<svg class="h-6 w-6 text-blue-600 dark:text-blue-400" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-semibold text-slate-900 dark:text-white mb-2">
|
||||
Wichtige Hinweise
|
||||
</h3>
|
||||
<div class="text-slate-600 dark:text-slate-400 space-y-2">
|
||||
<p>• Alle Anträge werden sorgfältig geprüft und genehmigt</p>
|
||||
<p>• Die Bearbeitungszeit beträgt in der Regel 24-48 Stunden</p>
|
||||
<p>• Sie erhalten eine E-Mail-Benachrichtigung über den Status</p>
|
||||
<p>• Nach Genehmigung können Sie den Druckauftrag starten</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="max-w-5xl mx-auto px-6 lg:px-8 -mt-12 relative z-10" style="margin-bottom: 4rem;">
|
||||
<!-- Antragsformular -->
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-bold text-slate-900 dark:text-white mb-2">
|
||||
Druckantrag einreichen
|
||||
</h2>
|
||||
<p class="text-slate-500 dark:text-slate-400">
|
||||
Füllen Sie alle erforderlichen Felder aus, um Ihren Druckantrag zu stellen
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Form Container -->
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem; margin-bottom: 3rem;">
|
||||
<div class="text-center mb-16">
|
||||
<h2 class="title-professional text-4xl font-bold mb-6">
|
||||
Starten Sie Ihre Anfrage
|
||||
</h2>
|
||||
<p class="subtitle-professional text-xl">
|
||||
Füllen Sie das folgende Formular aus und erhalten Sie innerhalb weniger Minuten Ihren persönlichen Zugangscode.
|
||||
</p>
|
||||
</div>
|
||||
<form method="POST" enctype="multipart/form-data" class="space-y-6">
|
||||
{{ form.hidden_tag() }}
|
||||
|
||||
<form id="guestRequestForm" class="space-y-12">
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-10">
|
||||
|
||||
<!-- Name (Pflichtfeld) -->
|
||||
<div class="group">
|
||||
<label for="name" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Vollständiger Name <span class="text-red-500 text-lg">*</span>
|
||||
</label>
|
||||
<input type="text" name="name" id="name" required
|
||||
class="input-professional w-full text-base py-4 px-5"
|
||||
placeholder="Max Mustermann" style="border-radius: 1rem;">
|
||||
<div class="mt-3 text-sm text-professional-muted">
|
||||
Geben Sie Ihren vollständigen Namen für die Registrierung ein
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Name -->
|
||||
<div>
|
||||
{{ form.name.label(class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2") }}
|
||||
{{ form.name(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", placeholder="Ihr vollständiger Name") }}
|
||||
{% if form.name.errors %}
|
||||
<div class="mt-1 text-sm text-red-600">
|
||||
{% for error in form.name.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- E-Mail -->
|
||||
<div class="group">
|
||||
<label for="email" class="block text-base font-bold text-professional-primary mb-4">
|
||||
E-Mail-Adresse
|
||||
</label>
|
||||
<input type="email" name="email" id="email"
|
||||
class="input-professional w-full text-base py-4 px-5"
|
||||
placeholder="max.mustermann@mercedes-benz.com" style="border-radius: 1rem;">
|
||||
<div class="mt-3 text-sm text-professional-muted">
|
||||
Optional: Für Updates und Benachrichtigungen
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Projektzweck -->
|
||||
<div class="group">
|
||||
<label for="reason" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Projektbeschreibung & Verwendungszweck
|
||||
</label>
|
||||
<textarea name="reason" id="reason" rows="6"
|
||||
class="input-professional resize-none w-full text-base py-4 px-5"
|
||||
placeholder="Beschreiben Sie ausführlich Ihr Projekt, den geplanten Druckauftrag und den Verwendungszweck. Je detaillierter, desto schneller die Genehmigung..." style="border-radius: 1rem;"></textarea>
|
||||
<div class="mt-3 text-sm text-professional-muted">
|
||||
Tipp: Eine detaillierte Beschreibung beschleunigt die Genehmigung erheblich
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-10">
|
||||
|
||||
<!-- Druckdauer -->
|
||||
<div class="group">
|
||||
<label for="duration_min" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Geschätzte Produktionszeit
|
||||
</label>
|
||||
<div class="relative">
|
||||
<input type="number" name="duration_min" id="duration_min" value="60" min="15" max="480"
|
||||
class="input-professional w-full text-base py-4 px-5"
|
||||
placeholder="60" style="border-radius: 1rem;">
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-6 pointer-events-none">
|
||||
<span class="text-professional-muted font-medium text-base">min</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 flex items-center justify-between text-sm text-professional-muted">
|
||||
<span>Minimum: 15 Minuten</span>
|
||||
<span>Maximum: 8 Stunden</span>
|
||||
</div>
|
||||
<div class="mt-3 w-full bg-slate-200 dark:bg-slate-600 rounded-full h-2">
|
||||
<div id="duration-progress" class="bg-gradient-to-r from-blue-500 to-purple-500 h-2 rounded-full transition-all duration-300" style="width: 12.5%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Drucker-Auswahl -->
|
||||
{% if printers %}
|
||||
<div class="group">
|
||||
<label for="printer_id" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Bevorzugte Produktionseinheit
|
||||
</label>
|
||||
<div class="relative">
|
||||
<select name="printer_id" id="printer_id"
|
||||
class="input-professional appearance-none pr-12 cursor-pointer w-full text-base py-4 px-5" style="border-radius: 1rem;">
|
||||
<option value="">Automatische Zuweisung</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-6 pointer-events-none">
|
||||
<svg class="h-6 w-6 text-professional-muted" 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>
|
||||
</div>
|
||||
<div class="mt-3 text-sm text-professional-muted">
|
||||
Tipp: Lassen Sie das System den optimalen Drucker für Sie auswählen
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Professional Info-Box -->
|
||||
<div class="alert-professional alert-info" style="border-radius: 2rem; padding: 2.5rem;">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-2xl flex items-center justify-center">
|
||||
<svg class="h-6 w-6 text-white" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
<!-- E-Mail -->
|
||||
<div>
|
||||
{{ form.email.label(class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2") }}
|
||||
{{ form.email(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", placeholder="ihre.email@example.com") }}
|
||||
{% if form.email.errors %}
|
||||
<div class="mt-1 text-sm text-red-600">
|
||||
{% for error in form.email.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-semibold text-professional-primary mb-4">
|
||||
Mercedes-Benz Professional Service
|
||||
</h3>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-green-400 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">Express-Bearbeitung in unter 5 Minuten</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-blue-400 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">6-stelliger Sicherheitscode per E-Mail</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-purple-400 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">Einmalige Verwendung für maximale Sicherheit</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-2 h-2 bg-orange-400 rounded-full"></div>
|
||||
<span class="text-sm text-professional-secondary">5 Minuten Toleranz nach geplanter Startzeit</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Drucker -->
|
||||
<div>
|
||||
{{ form.printer_id.label(class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2") }}
|
||||
{{ form.printer_id(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") }}
|
||||
{% if form.printer_id.errors %}
|
||||
<div class="mt-1 text-sm text-red-600">
|
||||
{% for error in form.printer_id.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Professional Action Buttons -->
|
||||
<div class="flex flex-col sm:flex-row items-center justify-end space-y-4 sm:space-y-0 sm:space-x-6 pt-8 border-t border-slate-200 dark:border-slate-600">
|
||||
<a href="{{ url_for('index') }}"
|
||||
class="btn-secondary-professional w-full sm:w-auto text-center">
|
||||
← Zurück zur Übersicht
|
||||
</a>
|
||||
<button type="submit" id="submitBtn"
|
||||
class="btn-professional w-full sm:w-auto group">
|
||||
<span class="flex items-center justify-center">
|
||||
<svg class="w-5 h-5 mr-3 group-hover:rotate-12 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 19l9 2-9-18-9 18 9-2zm0 0v-8"/>
|
||||
</svg>
|
||||
Anfrage übermitteln
|
||||
</span>
|
||||
</button>
|
||||
<!-- Geschätzte Dauer -->
|
||||
<div>
|
||||
{{ form.duration_min.label(class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2") }}
|
||||
<div class="relative">
|
||||
{{ form.duration_min(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", placeholder="z.B. 120") }}
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
|
||||
<span class="text-slate-500 dark:text-slate-400 text-sm">Minuten</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if form.duration_min.errors %}
|
||||
<div class="mt-1 text-sm text-red-600">
|
||||
{% for error in form.duration_min.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Additional Info Section -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mt-8 animate-slide-up">
|
||||
<div class="card-professional text-center">
|
||||
<div class="w-12 h-12 bg-gradient-to-br from-emerald-400 to-emerald-600 rounded-xl mx-auto mb-4 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="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-professional-primary mb-2">Qualitätsgarantie</h3>
|
||||
<p class="text-sm text-professional-muted">Mercedes-Benz Qualitätsstandards bei jedem Druckauftrag</p>
|
||||
<!-- Projektbeschreibung -->
|
||||
<div>
|
||||
{{ form.reason.label(class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2") }}
|
||||
{{ form.reason(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 resize-none", rows="4", placeholder="Beschreiben Sie Ihr Projekt und den geplanten Verwendungszweck...") }}
|
||||
{% if form.reason.errors %}
|
||||
<div class="mt-1 text-sm text-red-600">
|
||||
{% for error in form.reason.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-professional text-center">
|
||||
<div class="w-12 h-12 bg-gradient-to-br from-blue-400 to-blue-600 rounded-xl mx-auto mb-4 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="M18.364 5.636l-3.536 3.536m0 5.656l3.536 3.536M9.172 9.172L5.636 5.636m3.536 9.192L5.636 18.364M12 12h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
|
||||
<!-- Datei-Upload -->
|
||||
<div>
|
||||
{{ form.file.label(class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2") }}
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<label for="{{ form.file.id }}" class="flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 dark:border-slate-600 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:bg-slate-700/30 hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-colors">
|
||||
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
||||
<svg class="w-8 h-8 mb-3 text-gray-400 dark:text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/>
|
||||
</svg>
|
||||
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400"><span class="font-semibold">Klicken Sie zum Hochladen</span> oder ziehen Sie die Datei hierher</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">STL, OBJ oder andere 3D-Dateien (max. 50MB)</p>
|
||||
</div>
|
||||
{{ form.file(class="hidden") }}
|
||||
</label>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-professional-primary mb-2">24/7 Support</h3>
|
||||
<p class="text-sm text-professional-muted">Rund-um-die-Uhr technische Unterstützung</p>
|
||||
{% if form.file.errors %}
|
||||
<div class="mt-2 text-sm text-red-600">
|
||||
{% for error in form.file.errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-professional text-center">
|
||||
<div class="w-12 h-12 bg-gradient-to-br from-purple-400 to-purple-600 rounded-xl mx-auto mb-4 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 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="flex items-center justify-end pt-6 border-t border-gray-200 dark:border-slate-600">
|
||||
<button type="submit" 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 19l9 2-9-18-9 18 9-2zm0 0v-8"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-professional-primary mb-2">Datenschutz</h3>
|
||||
<p class="text-sm text-professional-muted">Höchste Sicherheitsstandards für Ihre Daten</p>
|
||||
<span>Antrag einreichen</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Professional Success Modal -->
|
||||
<div id="successModal" class="fixed inset-0 bg-black/60 backdrop-blur-sm hidden z-50">
|
||||
<div class="flex items-center justify-center min-h-screen p-4">
|
||||
<div class="professional-container max-w-lg w-full p-8 transform transition-all duration-500 scale-95 opacity-0" id="successModalContent">
|
||||
<div class="text-center">
|
||||
<div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-gradient-to-br from-green-400 to-emerald-500 mb-6">
|
||||
<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"></path>
|
||||
<!-- Status Check Section -->
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="text-center">
|
||||
<h3 class="text-lg font-semibold text-slate-900 dark:text-white mb-2">
|
||||
Status Ihres Antrags prüfen
|
||||
</h3>
|
||||
<p class="text-slate-500 dark:text-slate-400 mb-6">
|
||||
Haben Sie bereits einen Antrag gestellt? Prüfen Sie hier den aktuellen Status.
|
||||
</p>
|
||||
<div class="flex flex-col sm:flex-row items-center justify-center gap-4">
|
||||
<a href="{{ url_for('guest.guest_requests_overview') }}"
|
||||
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="M9 12h6m-6 4h6m2 5H7a2 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>
|
||||
</div>
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-4">
|
||||
Anfrage erfolgreich übermittelt!
|
||||
</h3>
|
||||
<p class="text-professional-muted mb-6">
|
||||
Ihre Gastanfrage wurde eingereicht und wird mit höchster Priorität bearbeitet. Sie können den Bearbeitungsstatus jederzeit unter folgendem Link verfolgen:
|
||||
</p>
|
||||
<div class="professional-container p-4 mb-6">
|
||||
<code id="statusUrl" class="text-sm text-professional-primary break-all font-mono"></code>
|
||||
</div>
|
||||
<div class="flex items-center justify-center space-x-4">
|
||||
<button onclick="closeSuccessModal()"
|
||||
class="btn-professional">
|
||||
Verstanden
|
||||
</button>
|
||||
<button onclick="copyStatusUrl()"
|
||||
class="btn-secondary-professional">
|
||||
Link kopieren
|
||||
</button>
|
||||
</div>
|
||||
<span>Alle Anträge ansehen</span>
|
||||
</a>
|
||||
<a href="{{ url_for('guest.guest_status') }}"
|
||||
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="M8 16l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m3-6l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M7 20l4-16m2 16l4-16"/>
|
||||
</svg>
|
||||
<span>Status mit Code prüfen</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -343,124 +219,18 @@
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const form = document.getElementById('guestRequestForm');
|
||||
const submitBtn = document.getElementById('submitBtn');
|
||||
const successModal = document.getElementById('successModal');
|
||||
const successModalContent = document.getElementById('successModalContent');
|
||||
const statusUrl = document.getElementById('statusUrl');
|
||||
const durationInput = document.getElementById('duration_min');
|
||||
const durationProgress = document.getElementById('duration-progress');
|
||||
|
||||
// Live Time Update
|
||||
function updateLiveTime() {
|
||||
const now = new Date();
|
||||
document.getElementById('live-time').textContent = now.toLocaleTimeString('de-DE');
|
||||
}
|
||||
updateLiveTime();
|
||||
setInterval(updateLiveTime, 1000);
|
||||
|
||||
// Duration Progress Bar
|
||||
durationInput.addEventListener('input', function() {
|
||||
const value = parseInt(this.value) || 0;
|
||||
const percentage = Math.min((value / 480) * 100, 100);
|
||||
durationProgress.style.width = percentage + '%';
|
||||
|
||||
// Color changes based on duration
|
||||
if (value <= 60) {
|
||||
durationProgress.className = 'bg-gradient-to-r from-green-500 to-emerald-500 h-2 rounded-full transition-all duration-300';
|
||||
} else if (value <= 240) {
|
||||
durationProgress.className = 'bg-gradient-to-r from-blue-500 to-cyan-500 h-2 rounded-full transition-all duration-300';
|
||||
} else {
|
||||
durationProgress.className = 'bg-gradient-to-r from-orange-500 to-red-500 h-2 rounded-full transition-all duration-300';
|
||||
}
|
||||
});
|
||||
|
||||
// Form Submit Handler
|
||||
form.addEventListener('submit', async function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Button Animation
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.innerHTML = '<span class="flex items-center justify-center"><svg class="animate-spin w-5 h-5 mr-3" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>Wird übertragen...</span>';
|
||||
|
||||
try {
|
||||
const formData = new FormData(form);
|
||||
const data = {
|
||||
name: formData.get('name'),
|
||||
email: formData.get('email'),
|
||||
reason: formData.get('reason'),
|
||||
duration_min: parseInt(formData.get('duration_min')) || 60,
|
||||
printer_id: formData.get('printer_id') ? parseInt(formData.get('printer_id')) : null
|
||||
};
|
||||
|
||||
// CSRF-Token aus Meta-Tag auslesen
|
||||
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.content;
|
||||
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
};
|
||||
|
||||
// CSRF-Token hinzufügen, wenn vorhanden
|
||||
if (csrfToken) {
|
||||
headers['X-CSRFToken'] = csrfToken;
|
||||
// File upload preview
|
||||
const fileInput = document.getElementById('{{ form.file.id }}');
|
||||
if (fileInput) {
|
||||
fileInput.addEventListener('change', function(e) {
|
||||
const file = e.target.files[0];
|
||||
if (file) {
|
||||
const label = fileInput.closest('label');
|
||||
const textElement = label.querySelector('p');
|
||||
textElement.innerHTML = `<span class="font-semibold">Datei ausgewählt:</span> ${file.name}`;
|
||||
}
|
||||
|
||||
const response = await fetch('/api/guest/requests', {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: JSON.stringify(data)
|
||||
});
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
if (result.success) {
|
||||
// Status-URL anzeigen
|
||||
const url = window.location.origin + `/request/${result.request_id}`;
|
||||
statusUrl.textContent = url;
|
||||
|
||||
// Success Modal mit Animation anzeigen
|
||||
successModal.classList.remove('hidden');
|
||||
setTimeout(() => {
|
||||
successModalContent.classList.remove('scale-95', 'opacity-0');
|
||||
successModalContent.classList.add('scale-100', 'opacity-100');
|
||||
}, 10);
|
||||
|
||||
// Formular zurücksetzen
|
||||
form.reset();
|
||||
durationProgress.style.width = '12.5%';
|
||||
} else {
|
||||
alert('Fehler: ' + (result.error || 'Unbekannter Fehler'));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Senden der Anfrage:', error);
|
||||
alert('Fehler beim Senden der Anfrage. Bitte versuchen Sie es später erneut.');
|
||||
} finally {
|
||||
// Button zurücksetzen
|
||||
submitBtn.disabled = false;
|
||||
submitBtn.innerHTML = '<span class="flex items-center justify-center"><svg class="w-5 h-5 mr-3 group-hover:rotate-12 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 19l9 2-9-18-9 18 9-2zm0 0v-8"/></svg>Anfrage übermitteln</span>';
|
||||
}
|
||||
});
|
||||
|
||||
// Modal functions
|
||||
window.closeSuccessModal = function() {
|
||||
successModalContent.classList.remove('scale-100', 'opacity-100');
|
||||
successModalContent.classList.add('scale-95', 'opacity-0');
|
||||
setTimeout(() => {
|
||||
successModal.classList.add('hidden');
|
||||
}, 200);
|
||||
};
|
||||
|
||||
window.copyStatusUrl = function() {
|
||||
navigator.clipboard.writeText(statusUrl.textContent).then(() => {
|
||||
// Temporary feedback
|
||||
const originalText = statusUrl.textContent;
|
||||
statusUrl.textContent = 'Link kopiert!';
|
||||
setTimeout(() => {
|
||||
statusUrl.textContent = originalText;
|
||||
}, 2000);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -3,246 +3,184 @@
|
||||
{% block title %}Druckaufträge - Mercedes-Benz MYP Platform{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="bg-professional">
|
||||
<!-- 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;
|
||||
}
|
||||
</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>
|
||||
|
||||
<!-- 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 System</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-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-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"/>
|
||||
<div class="space-y-8">
|
||||
<!-- 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">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h1 class="title-professional text-6xl md:text-7xl font-bold mb-8 tracking-tight">
|
||||
Druckaufträge Management
|
||||
</h1>
|
||||
<p class="subtitle-professional text-2xl md:text-3xl max-w-5xl mx-auto leading-relaxed mb-12">
|
||||
Verwalten Sie Ihre 3D-Druckjobs mit höchster Präzision und Mercedes-Benz Qualitätsstandard
|
||||
</p>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="flex flex-wrap justify-center gap-6">
|
||||
<button onclick="refreshJobs()" 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>Jobs aktualisieren</span>
|
||||
</button>
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-slate-900 dark:text-white tracking-tight">Druckaufträge</h1>
|
||||
<p class="text-slate-500 dark:text-slate-400 mt-1">Verwalten Sie Ihre 3D-Druckjobs mit höchster Präzision</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<button onclick="refreshJobs()"
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-6 lg:px-8 -mt-12 relative z-10" style="margin-bottom: 4rem;">
|
||||
|
||||
<!-- Neue Reservierung anlegen -->
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem; margin-bottom: 3rem;">
|
||||
<div class="text-center mb-16">
|
||||
<h2 class="title-professional text-4xl font-bold mb-6">
|
||||
Neue Reservierung anlegen
|
||||
</h2>
|
||||
<p class="subtitle-professional text-xl max-w-3xl mx-auto">
|
||||
Erstellen Sie einen neuen Druckauftrag mit professionellen Einstellungen und intelligenter Druckerauswahl
|
||||
</p>
|
||||
</div>
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-bold text-slate-900 dark:text-white mb-2">
|
||||
Neue Reservierung anlegen
|
||||
</h2>
|
||||
<p class="text-slate-500 dark:text-slate-400">
|
||||
Erstellen Sie einen neuen Druckauftrag mit professionellen Einstellungen
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Queue-Status-Anzeige -->
|
||||
<div id="queue-status-info" class="mb-12"></div>
|
||||
<div id="queue-status-info" class="mb-6"></div>
|
||||
|
||||
<form id="newJobForm" class="space-y-12">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-10">
|
||||
<form id="newJobForm" class="space-y-6">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
||||
<!-- Drucker auswählen -->
|
||||
<div class="group">
|
||||
<label for="printer_id" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Drucker auswählen <span class="text-red-500 text-lg">*</span>
|
||||
</label>
|
||||
<div class="relative">
|
||||
<select id="printer_id" name="printer_id" required
|
||||
class="input-professional appearance-none pr-12 cursor-pointer w-full text-base py-4 px-5" style="border-radius: 1rem;">
|
||||
<div>
|
||||
<label for="printer_id" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Drucker auswählen <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<select id="printer_id" name="printer_id" required
|
||||
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="">Drucker auswählen...</option>
|
||||
<!-- Wird durch JavaScript gefüllt -->
|
||||
</select>
|
||||
<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>
|
||||
</div>
|
||||
<div id="printer-status-info" class="mt-4 text-center">
|
||||
<div id="printer-status-info" class="mt-2 text-center">
|
||||
<!-- Status-Info wird dynamisch gefüllt -->
|
||||
</div>
|
||||
<div id="printer-status-warning" class="mt-6 hidden">
|
||||
<div class="alert-professional alert-warning" style="border-radius: 1.5rem; padding: 2rem;">
|
||||
<div id="printer-status-warning" class="mt-4 hidden">
|
||||
<div class="bg-orange-50 dark:bg-orange-900/30 border border-orange-200 dark:border-orange-800 rounded-lg p-4">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-16 h-16 bg-gradient-to-br from-orange-500 to-red-600 rounded-3xl flex items-center justify-center">
|
||||
<svg class="h-8 w-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<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-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<svg class="h-5 w-5 text-orange-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<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-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex-1 ml-6">
|
||||
<h3 class="text-xl font-bold text-professional-primary mb-6">
|
||||
🔄 WARTESCHLANGEN-MODUS: Offline-Drucker ausgewählt!
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-orange-800 dark:text-orange-400 mb-2">
|
||||
Warteschlangen-Modus: Offline-Drucker ausgewählt
|
||||
</h3>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-3 h-3 bg-red-500 rounded-full"></div>
|
||||
<span class="text-base text-professional-secondary">Drucker ist derzeit <strong>OFFLINE</strong></span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-3 h-3 bg-yellow-500 rounded-full"></div>
|
||||
<span class="text-base text-professional-secondary">Job wird in <strong>WARTESCHLANGE</strong> eingereiht</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-3 h-3 bg-blue-500 rounded-full"></div>
|
||||
<span class="text-base text-professional-secondary">System überwacht alle <strong>2 Minuten</strong></span>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-2 text-sm text-orange-700 dark:text-orange-300">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-2 h-2 bg-red-500 rounded-full"></div>
|
||||
<span>Drucker ist derzeit OFFLINE</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-3 h-3 bg-green-500 rounded-full"></div>
|
||||
<span class="text-base text-professional-secondary">Start <strong>AUTOMATISCH</strong> bei Verfügbarkeit</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-2 h-2 bg-yellow-500 rounded-full"></div>
|
||||
<span>Job wird in WARTESCHLANGE eingereiht</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-2 h-2 bg-blue-500 rounded-full"></div>
|
||||
<span>System überwacht alle 2 Minuten</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-2 h-2 bg-green-500 rounded-full"></div>
|
||||
<span>Start AUTOMATISCH bei Verfügbarkeit</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gewünschte Startzeit -->
|
||||
<div class="group">
|
||||
<label for="start_time" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Gewünschte Startzeit <span class="text-red-500 text-lg">*</span>
|
||||
</label>
|
||||
<div>
|
||||
<label for="start_time" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Gewünschte Startzeit <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="datetime-local" id="start_time" name="start_time" required
|
||||
class="input-professional w-full text-base py-4 px-5" style="border-radius: 1rem;">
|
||||
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">
|
||||
</div>
|
||||
|
||||
<!-- Geschätzte Druckdauer -->
|
||||
<div class="group">
|
||||
<label for="duration" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Geschätzte Druckdauer (Minuten) <span class="text-red-500 text-lg">*</span>
|
||||
</label>
|
||||
<input type="number" id="duration" name="duration" required min="1" max="7200"
|
||||
class="input-professional w-full text-base py-4 px-5" placeholder="60" style="border-radius: 1rem;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 gap-10">
|
||||
<!-- Job-Titel -->
|
||||
<div class="group">
|
||||
<label for="job_title" class="block text-base font-bold text-professional-primary mb-4">
|
||||
Job-Titel <span class="text-red-500 text-lg">*</span>
|
||||
</label>
|
||||
<input type="text" id="job_title" name="job_title" required
|
||||
class="input-professional w-full text-base py-4 px-5"
|
||||
placeholder="Geben Sie einen beschreibenden Titel ein" style="border-radius: 1rem;">
|
||||
</div>
|
||||
|
||||
<!-- STL-Datei hochladen -->
|
||||
<div class="group">
|
||||
<label for="stl_file" class="block text-base font-bold text-professional-primary mb-4">
|
||||
STL-Datei hochladen (optional)
|
||||
</label>
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<label for="stl_file" class="flex flex-col items-center justify-center w-full h-40 border-3 border-slate-300 dark:border-slate-600 border-dashed rounded-3xl cursor-pointer bg-slate-50/50 dark:bg-slate-700/30 hover:bg-slate-100/70 dark:hover:bg-slate-700/50 transition-all duration-300 backdrop-blur-sm">
|
||||
<div class="flex flex-col items-center justify-center pt-8 pb-8">
|
||||
<svg class="w-16 h-16 mb-6 text-professional-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"></path>
|
||||
</svg>
|
||||
<p class="mb-3 text-base text-professional-primary"><span class="font-bold">Klicken Sie zum Hochladen</span> oder ziehen Sie die Datei hierher</p>
|
||||
<p class="text-sm text-professional-muted">STL-Dateien bis zu 50MB</p>
|
||||
</div>
|
||||
<input id="stl_file" name="stl_file" type="file" accept=".stl" class="hidden" />
|
||||
<div>
|
||||
<label for="duration" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Geschätzte Druckdauer (Minuten) <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="number" id="duration" name="duration" required min="1" max="7200"
|
||||
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"
|
||||
placeholder="60">
|
||||
</div>
|
||||
<div id="file-name" class="mt-4 text-base text-professional-muted hidden"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="flex items-center justify-end pt-12 border-t-2 border-slate-200 dark:border-slate-600">
|
||||
<button type="submit" 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="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
||||
</svg>
|
||||
<span>Reservierung erstellen</span>
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<!-- Job-Titel -->
|
||||
<div>
|
||||
<label for="job_title" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Job-Titel <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input type="text" id="job_title" name="job_title" required
|
||||
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"
|
||||
placeholder="Geben Sie einen beschreibenden Titel ein">
|
||||
</div>
|
||||
|
||||
<!-- STL-Datei hochladen -->
|
||||
<div>
|
||||
<label for="stl_file" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
STL-Datei hochladen (optional)
|
||||
</label>
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<label for="stl_file" class="flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 dark:border-slate-600 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:bg-slate-700/30 hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-colors">
|
||||
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
||||
<svg class="w-8 h-8 mb-3 text-gray-400 dark:text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/>
|
||||
</svg>
|
||||
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400"><span class="font-semibold">Klicken Sie zum Hochladen</span> oder ziehen Sie die Datei hierher</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">STL-Dateien bis zu 50MB</p>
|
||||
</div>
|
||||
<input id="stl_file" name="stl_file" type="file" accept=".stl" class="hidden" />
|
||||
</label>
|
||||
</div>
|
||||
<div id="file-name" class="mt-2 text-sm text-slate-500 dark:text-slate-400 hidden"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="flex items-center justify-end pt-6 border-t border-gray-200 dark:border-slate-600">
|
||||
<button type="submit" 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"/>
|
||||
</svg>
|
||||
<span>Reservierung erstellen</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Aktive und geplante Jobs -->
|
||||
<div class="professional-container animate-slide-up" style="padding: 3rem; border-radius: 2rem;">
|
||||
<div class="text-center mb-16">
|
||||
<h2 class="title-professional text-4xl font-bold mb-6">
|
||||
Aktive und geplante Jobs
|
||||
</h2>
|
||||
<p class="subtitle-professional text-xl max-w-3xl mx-auto">
|
||||
Übersicht Ihrer laufenden und geplanten Druckaufträge mit Echtzeit-Status
|
||||
</p>
|
||||
</div>
|
||||
<div class="dashboard-card p-6">
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-bold text-slate-900 dark:text-white mb-2">
|
||||
Aktive und geplante Jobs
|
||||
</h2>
|
||||
<p class="text-slate-500 dark:text-slate-400">
|
||||
Übersicht Ihrer laufenden und geplanten Druckaufträge mit Echtzeit-Status
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="active-jobs-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
<div id="active-jobs-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<!-- Jobs werden dynamisch mit JavaScript geladen -->
|
||||
<div class="col-span-full py-16 text-center" id="no-jobs-message">
|
||||
<div class="mb-glass rounded-3xl p-12 max-w-md mx-auto">
|
||||
<div class="text-professional-muted mb-8">
|
||||
<svg class="w-20 h-20 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-4">Keine aktiven Jobs</h3>
|
||||
<p class="text-lg text-professional-muted">Sie haben derzeit keine aktiven oder geplanten Druckjobs.</p>
|
||||
<div class="col-span-full py-12 text-center" id="no-jobs-message">
|
||||
<div class="max-w-sm mx-auto">
|
||||
<div class="text-slate-400 dark:text-slate-500 mb-4">
|
||||
<svg class="w-12 h-12 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-slate-900 dark:text-white mb-2">Keine aktiven Jobs</h3>
|
||||
<p class="text-slate-500 dark:text-slate-400">Sie haben derzeit keine aktiven oder geplanten Druckjobs.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -252,21 +190,21 @@
|
||||
<!-- Job Details Modal -->
|
||||
<div id="jobDetailsModal" class="fixed inset-0 bg-black/60 backdrop-blur-sm hidden z-50">
|
||||
<div class="flex items-center justify-center min-h-screen p-4">
|
||||
<div class="professional-container max-w-2xl w-full p-8 transform transition-all duration-500 scale-95 opacity-0" id="jobModalContent">
|
||||
<div class="flex justify-between items-center mb-8">
|
||||
<div class="dashboard-card max-w-2xl w-full p-8 transform transition-all duration-300 scale-95 opacity-0" id="jobModalContent">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<div>
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-2">Job Details</h3>
|
||||
<p class="text-professional-muted">Detaillierte Informationen zu Ihrem Druckauftrag</p>
|
||||
<h3 class="text-xl font-bold text-slate-900 dark:text-white mb-2">Job Details</h3>
|
||||
<p class="text-slate-500 dark:text-slate-400">Detaillierte Informationen zu Ihrem Druckauftrag</p>
|
||||
</div>
|
||||
<button onclick="closeJobModal()" class="p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-xl transition-colors duration-200">
|
||||
<svg class="w-6 h-6 text-professional-muted hover:text-professional-primary" 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>
|
||||
</button>
|
||||
<button onclick="closeJobModal()" class="p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors">
|
||||
<svg class="w-6 h-6 text-slate-500 dark:text-slate-400" 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>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="jobDetailsContent">
|
||||
<!-- Inhalt wird dynamisch geladen -->
|
||||
<!-- Inhalt wird dynamisch geladen -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -275,36 +213,35 @@
|
||||
<!-- Job verlängern Modal -->
|
||||
<div id="extendJobModal" class="fixed inset-0 bg-black/60 backdrop-blur-sm hidden z-50">
|
||||
<div class="flex items-center justify-center min-h-screen p-4">
|
||||
<div class="professional-container max-w-md w-full p-8 transform transition-all duration-500 scale-95 opacity-0" id="extendModalContent">
|
||||
<div class="flex justify-between items-center mb-8">
|
||||
<div class="dashboard-card max-w-md w-full p-8 transform transition-all duration-300 scale-95 opacity-0" id="extendModalContent">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<div>
|
||||
<h3 class="text-2xl font-bold text-professional-primary mb-2">Druckzeit verlängern</h3>
|
||||
<p class="text-professional-muted">Geben Sie die zusätzlichen Minuten an</p>
|
||||
<h3 class="text-xl font-bold text-slate-900 dark:text-white mb-2">Druckzeit verlängern</h3>
|
||||
<p class="text-slate-500 dark:text-slate-400">Geben Sie die zusätzlichen Minuten an</p>
|
||||
</div>
|
||||
<button onclick="closeExtendModal()" class="p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-xl transition-colors duration-200">
|
||||
<svg class="w-6 h-6 text-professional-muted hover:text-professional-primary" 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>
|
||||
</button>
|
||||
<button onclick="closeExtendModal()" class="p-2 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg transition-colors">
|
||||
<svg class="w-6 h-6 text-slate-500 dark:text-slate-400" 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>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form id="extendJobForm" class="space-y-6">
|
||||
<input type="hidden" id="extend_job_id" name="job_id">
|
||||
<div>
|
||||
<label for="extra_minutes" class="block text-sm font-semibold text-professional-primary mb-3">
|
||||
<label for="extra_minutes" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
Zusätzliche Minuten
|
||||
</label>
|
||||
<input type="number" id="extra_minutes" name="extra_minutes" required min="1" max="720" value="30"
|
||||
class="input-professional" placeholder="30">
|
||||
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"
|
||||
placeholder="30">
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end space-x-4 pt-6 border-t border-slate-200 dark:border-slate-600">
|
||||
<button type="button" onclick="closeExtendModal()"
|
||||
class="btn-secondary-professional">
|
||||
<div class="flex items-center justify-end gap-3 pt-6 border-t border-gray-200 dark:border-slate-600">
|
||||
<button type="button" onclick="closeExtendModal()" class="btn-secondary">
|
||||
Abbrechen
|
||||
</button>
|
||||
<button type="submit"
|
||||
class="btn-professional">
|
||||
<button type="submit" class="btn-primary">
|
||||
Verlängern
|
||||
</button>
|
||||
</div>
|
||||
@ -319,21 +256,10 @@
|
||||
// Globale Variable für Admin-Status
|
||||
window.isAdmin = {% if current_user.is_admin %}true{% else %}false{% endif %};
|
||||
|
||||
// Live Time Update
|
||||
function updateLiveTime() {
|
||||
const now = new Date();
|
||||
const timeElement = document.getElementById('live-time');
|
||||
if (timeElement) {
|
||||
timeElement.textContent = now.toLocaleTimeString('de-DE');
|
||||
}
|
||||
}
|
||||
updateLiveTime();
|
||||
setInterval(updateLiveTime, 1000);
|
||||
|
||||
// Modal Animations
|
||||
function showModal(modalId) {
|
||||
const modal = document.getElementById(modalId);
|
||||
const content = modal.querySelector('.professional-container');
|
||||
const content = modal.querySelector('.dashboard-card');
|
||||
|
||||
modal.classList.remove('hidden');
|
||||
setTimeout(() => {
|
||||
@ -344,7 +270,7 @@ function showModal(modalId) {
|
||||
|
||||
function hideModal(modalId) {
|
||||
const modal = document.getElementById(modalId);
|
||||
const content = modal.querySelector('.professional-container');
|
||||
const content = modal.querySelector('.dashboard-card');
|
||||
|
||||
content.classList.remove('scale-100', 'opacity-100');
|
||||
content.classList.add('scale-95', 'opacity-0');
|
||||
|
Loading…
x
Reference in New Issue
Block a user