Refactoring - Fix2

Dieser Commit ist enthalten in:
2025-06-18 00:07:34 +02:00
Ursprung 0ec0d2c267
Commit a9cfecc699
18 geänderte Dateien mit 1412 neuen und 337 gelöschten Zeilen

Datei anzeigen

@@ -33,12 +33,21 @@
<div class="card mb-3">
<div class="card-body">
<form method="get" action="/customers" id="customerSearchForm" class="row g-3 align-items-end">
<div class="col-md-10">
<div class="col-md-8">
<label for="search" class="form-label">🔍 Suchen</label>
<input type="text" class="form-control" id="search" name="search"
placeholder="Kundenname oder E-Mail..."
value="{{ search }}" autofocus>
</div>
<div class="col-md-2">
<div class="form-check mt-4">
<input class="form-check-input" type="checkbox" id="show_test" name="show_test" value="true"
{% if show_test %}checked{% endif %} onchange="this.form.submit()">
<label class="form-check-label" for="show_test">
🧪 Testdaten anzeigen
</label>
</div>
</div>
<div class="col-md-2">
<a href="/customers" class="btn btn-outline-secondary w-100">Zurücksetzen</a>
</div>
@@ -69,23 +78,23 @@
<tbody>
{% for customer in customers %}
<tr>
<td>{{ customer[0] }}</td>
<td>{{ customer.id }}</td>
<td>
{{ customer[1] }}
{% if customer[4] %}
{{ customer.name }}
{% if customer.is_test %}
<span class="badge bg-secondary ms-1" title="Testdaten">🧪</span>
{% endif %}
</td>
<td>{{ customer[2] or '-' }}</td>
<td>{{ customer[3].strftime('%d.%m.%Y %H:%M') }}</td>
<td>{{ customer.email or '-' }}</td>
<td>{{ customer.created_at.strftime('%d.%m.%Y %H:%M') }}</td>
<td>
<span class="badge bg-info">{{ customer[6] }}/{{ customer[5] }}</span>
<span class="badge bg-info">{{ customer.active_licenses }}/{{ customer.license_count }}</span>
</td>
<td>
<div class="btn-group btn-group-sm" role="group">
<a href="/customer/edit/{{ customer[0] }}" class="btn btn-outline-primary">✏️ Bearbeiten</a>
{% if customer[5] == 0 %}
<form method="post" action="/customer/delete/{{ customer[0] }}" style="display: inline;" onsubmit="return confirm('Kunde wirklich löschen?');">
<a href="/customer/edit/{{ customer.id }}" class="btn btn-outline-primary">✏️ Bearbeiten</a>
{% if customer.license_count == 0 %}
<form method="post" action="/customer/delete/{{ customer.id }}" style="display: inline;" onsubmit="return confirm('Kunde wirklich löschen?');">
<button type="submit" class="btn btn-outline-danger">🗑️ Löschen</button>
</form>
{% else %}