feat: Implement booking email notifications and consent handling in booking flow

This commit is contained in:
2026-05-23 10:16:25 +02:00
parent 0a11d366a5
commit 2a96e8bbb4
5 changed files with 175 additions and 2 deletions
+7 -1
View File
@@ -5,7 +5,7 @@
{% block content %}
<section class="panel">
<h1>Rechnungsverwaltung</h1>
<p>Rechnungen für Nutzer erstellen, aktualisieren und löschen.</p>
<p>Rechnungen für Nutzer erstellen, aktualisieren und löschen. Direktbuchungen werden hier automatisch mit zugewiesenem Admin und Buchungsunterlagen angezeigt.</p>
</section>
<section class="layout">
@@ -33,6 +33,12 @@
<h3>{{ item.invoice_number }}</h3>
<p><strong>Nutzer:</strong> {{ item.username }} | <strong>Zeitraum:</strong> {{ item.period }}</p>
<p><strong>Betrag:</strong> {{ '%.2f'|format(item.amount_eur) }} EUR | <strong>Status:</strong> {{ item.status }} | <strong>Fälligkeit:</strong> {{ item.due_date }}</p>
{% if item.source == 'booking_payment' %}
<p><strong>Buchung:</strong> {{ item.booking_package_label or item.booking_package }} | <strong>Flow:</strong> {{ item.booking_flow }}</p>
<p><strong>Zugewiesener Admin:</strong> {{ item.assigned_admin_display_name or item.assigned_admin_username or 'Nicht gesetzt' }}{% if item.assigned_admin_email %} | <strong>E-Mail:</strong> {{ item.assigned_admin_email }}{% endif %}</p>
<p><strong>Unterlagen:</strong> {{ item.paperwork_status or 'Offen' }}{% if item.consent_accepted %} | Einwilligung bestätigt{% endif %}</p>
<p><strong>Kontaktdaten:</strong> {{ item.booking_data.contact_person }} | {{ item.booking_data.contact_email }} | {{ item.booking_data.billing_city }}</p>
{% endif %}
{% if item.pdf_path %}
<p><strong>PDF:</strong> <a href="{{ url_for('static', filename=item.pdf_path) }}" target="_blank" rel="noopener">Ansehen</a></p>
{% endif %}
+1 -1
View File
@@ -521,7 +521,7 @@
<div class="custom-modal-content">
<h3>Buchung bestätigen</h3>
<p>Möchten Sie dieses Paket jetzt direkt buchen oder zuerst einen Gesprächstermin vereinbaren?</p>
<p style="font-size: 0.95rem;">In beiden Fällen werden Ihre Angaben noch einmal geprüft, bevor die Buchung per POST an /booking/payment gesendet wird.</p>
<p style="font-size: 0.95rem;">Bitte wählen sie eine der Beiden Optionen aus um mit dem Verfahren weiter fortzufahren.</p>
<div class="custom-modal-actions">
<button class="btn secondary" type="button" onclick="closeBookingModal()">Abbrechen</button>
<button class="btn" type="button" onclick="goToBookingReview('consultation')">Gesprächstermin vereinbaren</button>
+33
View File
@@ -112,6 +112,33 @@
resize: vertical;
}
.booking-review__consent {
padding: 0.95rem 1rem;
border-radius: 16px;
background: #eef6f6;
border: 1px solid #d2e2e2;
}
.booking-review__consent label {
display: flex;
gap: 0.7rem;
align-items: flex-start;
font-weight: 600;
color: #21414a;
line-height: 1.5;
}
.booking-review__consent input {
margin-top: 0.2rem;
width: auto;
flex: 0 0 auto;
}
.booking-review__consent a {
color: #0a4c74;
text-decoration: underline;
}
.booking-review__actions {
display: flex;
flex-wrap: wrap;
@@ -202,6 +229,12 @@
<label for="notes">Zusatzinformationen</label>
<textarea id="notes" name="notes" maxlength="600" placeholder="Optional: gewünschter Starttermin, besondere Anforderungen, Rückrufzeiten">{{ form_data.notes }}</textarea>
</div>
<div class="booking-review__field booking-review__field--full booking-review__consent">
<label for="agreements_accepted">
<input id="agreements_accepted" name="agreements_accepted" type="checkbox" value="yes" required {% if form_data.agreements_accepted %}checked{% endif %}>
<span>Ich habe die <a href="{{ url_for('nutzungsbedingungen') }}" target="_blank" rel="noopener">Lizenzvereinbarung</a>, die <a href="{{ url_for('datenschutz') }}" target="_blank" rel="noopener">Datenschutzerklärung</a> und die DSGVO-Hinweise gelesen und akzeptiere sie.</span>
</label>
</div>
</div>
<div class="booking-review__actions">