further itegration of the new view of the User
This commit is contained in:
@@ -134,20 +134,39 @@
|
||||
</thead>
|
||||
<tbody id="booking-table-body">
|
||||
{% for booking in available.slots_booked %}
|
||||
{% if booking is not mapping %}
|
||||
<tr>
|
||||
<td class="fw-semibold text-primary py-3 text-nowrap">
|
||||
{{ booking[0] }}
|
||||
{% if booking is mapping %}
|
||||
{{ booking.start }}
|
||||
{% else %}
|
||||
{{ booking[0] }}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="fw-bold text-dark">{{ booking[1] }}</span>
|
||||
<span class="fw-bold text-dark">
|
||||
{% if booking is mapping %}
|
||||
{{ booking.name }}
|
||||
{% else %}
|
||||
{{ booking[1] }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
{% if booking|length > 2 and booking[2] %}
|
||||
{% for answer in booking[2] %}
|
||||
{% set answers = none %}
|
||||
{% if booking is mapping %}
|
||||
{# Versucht alle gängigen Bezeichnungen für das Antwort-Array zu treffen #}
|
||||
{% set answers = booking.custom or booking.custom_fields or booking.custom_answers %}
|
||||
{% elif booking|length > 2 %}
|
||||
{% set answers = booking[2] %}
|
||||
{% endif %}
|
||||
|
||||
{% if answers %}
|
||||
{% for answer in answers %}
|
||||
<td>{{ answer if answer else '<span class="text-muted small">-</span>'|safe }}</td>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{# Fallback: Zeige Striche, wenn keine Antworten da sind #}
|
||||
{% for field in custom_fields %}
|
||||
<td><span class="text-muted small">-</span></td>
|
||||
{% endfor %}
|
||||
@@ -156,15 +175,16 @@
|
||||
<td class="text-end">
|
||||
<form method="post" action="{{ url_for('terminplaner.client', appointment_id=appointment_id, tenant=tenant_id) }}" onsubmit="return confirm('Möchten Sie diesen Termin wirklich löschen?');" class="d-inline">
|
||||
<input type="hidden" name="action" value="delete">
|
||||
<input type="hidden" name="slot_time" value="{{ booking[0] }}">
|
||||
<input type="hidden" name="target_client_name" value="{{ booking[1] }}">
|
||||
|
||||
<input type="hidden" name="slot_time" value="{% if booking is mapping %}{{ booking.start }}{% else %}{{ booking[0] }}{% endif %}">
|
||||
<input type="hidden" name="target_client_name" value="{% if booking is mapping %}{{ booking.name }}{% else %}{{ booking[1] }}{% endif %}">
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger px-3 rounded-3">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user