removal of provisioning

This commit is contained in:
2026-08-28 14:40:23 +02:00
parent d81972e788
commit 1841623ff6
3 changed files with 193 additions and 357 deletions
+1 -52
View File
@@ -50,7 +50,7 @@
<a href="{{ url_for('static', filename=item.pdf_path) }}" target="_blank" rel="noopener">Ansehen</a>
</p>
{% endif %}
{% if item.hauptvertrag_data is defined or item.get('hauptvertrag_filename') %}
<p style="margin:0.2rem 0;"><strong>Hauptvertrag (aus MongoDB):</strong>
<a href="{{ url_for('view_hauptvertrag', invoice_id=item.id) }}" target="_blank" rel="noopener">
@@ -81,57 +81,6 @@
{% else %}
<article class="entry"><p>Noch keine Rechnungen vorhanden.</p></article>
{% endfor %}
{% if provision_requests %}
<h2>Instanz-Anfragen</h2>
{% for prov in provision_requests %}
<article class="entry">
<h3>{{ prov.booking_number or prov.booking_number }}</h3>
<p><strong>Nutzer:</strong> {{ prov.username }} | <strong>Subdomain:</strong> {{ prov.subdomain }}</p>
<p><strong>Paket:</strong> {{ prov.package_label or prov.package }} | <strong>Betrag:</strong> {{ '%.2f'|format(prov.amount_eur or 0) }} EUR</p>
<p><strong>Status:</strong> {{ prov.provision_status or 'not_started' }}{% if prov.provision_error %} | <strong>Fehler:</strong> {{ prov.provision_error }}{% endif %}</p>
<p><strong>Kontaktdaten:</strong> {{ prov.booking_data.get('contact_person', '-') }} | {{ prov.booking_data.get('contact_email', '-') }} | {{ prov.booking_data.get('billing_city', '-') }}</p>
<form method="post" style="display:inline-block; margin-right:0.6rem;">
<input type="hidden" name="action" value="create_from_provision">
<input type="hidden" name="prov_id" value="{{ prov.id }}">
<input type="file" name="contract_file" accept=".pdf,.png,.jpg,.jpeg,.webp">
<input type="text" name="period" placeholder="Zeitraum (optional)">
<input type="text" name="due_date" placeholder="Fälligkeit (YYYY-MM-DD)">
<button type="submit">Rechnung erzeugen</button>
</form>
<form method="post" style="display:inline-block; margin-right:0.6rem;">
<input type="hidden" name="action" value="update_provision">
<input type="hidden" name="prov_id" value="{{ prov.id }}">
<select name="prov_status">
<option value="accepted">accepted</option>
<option value="rejected">rejected</option>
<option value="completed">completed</option>
</select>
<button type="submit">Status setzen</button>
</form>
<form method="post" style="display:inline-block; margin-right:0.6rem;">
<input type="hidden" name="action" value="run_provision">
<input type="hidden" name="prov_id" value="{{ prov.id }}">
<button type="submit">Provision starten</button>
</form>
<form method="post" style="display:inline-block; margin-right:0.6rem;">
<input type="hidden" name="action" value="retry_provision">
<input type="hidden" name="prov_id" value="{{ prov.id }}">
<button type="submit">Provision wiederholen</button>
</form>
<form method="post" style="display:inline-block; margin-right:0.6rem;">
<input type="hidden" name="action" value="configure_provision">
<input type="hidden" name="prov_id" value="{{ prov.id }}">
<button type="submit">Konfiguration ausführen</button>
</form>
<form method="post" style="display:inline-block; margin-right:0.6rem;">
<input type="hidden" name="action" value="delete_instance_request">
<input type="hidden" name="prov_id" value="{{ prov.id }}">
<button type="submit" class="danger">Löschen</button>
</form>
</article>
{% endfor %}
{% endif %}
</div>
</section>