feat: call off single disposition as admin with optional notification
This commit is contained in:
@@ -170,7 +170,11 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.remarks|default('-')|nl2br }}
|
||||
{% if disposition.calledOffReason %}
|
||||
{{ disposition.calledOffReason|default('-')|nl2br }}
|
||||
{% else %}
|
||||
{{ disposition.remarks|default('-')|nl2br }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-start space-x-2">
|
||||
@@ -197,6 +201,16 @@
|
||||
{{ icon('upload') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('CALL_OFF', disposition) %}
|
||||
<button type="button"
|
||||
title="Absage"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_administrative_disposition_call_off', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('cancel') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('DELETE', disposition) %}
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
@@ -225,4 +239,4 @@
|
||||
zurück
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -139,9 +139,9 @@
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<span>{{ assignment.dispositions|length }}/{{ assignment.availableDispositions }}</span>
|
||||
<span>{{ assignment.activeDispositions|length }}/{{ assignment.availableDispositions }}</span>
|
||||
<ul>
|
||||
{% for disposition in assignment.dispositions %}
|
||||
{% for disposition in assignment.activeDispositions %}
|
||||
<li>
|
||||
<div role="button"
|
||||
title="Teamer:innen-Info anzeigen"
|
||||
@@ -251,4 +251,4 @@
|
||||
<a href="{{ path('app_administrative_assignment_create') }}" class="btn">
|
||||
Neu
|
||||
</a>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz absagen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form) }}
|
||||
<h2 class="font-bold text-lg pb-4">
|
||||
Teamer {{ disposition.teamer }}
|
||||
</h2>
|
||||
<div class="flex flex-col space-y-4 pb-4">
|
||||
{{ form_row(form.calledOffBy) }}
|
||||
{{ form_row(form.calledOffReason) }}
|
||||
{{ form_row(form.sendNotification) }}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
Absagen
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user