feat: assignment call off

This commit is contained in:
Björn Fromme
2024-11-06 21:04:33 +01:00
parent ca0c965058
commit ef7871f1d4
12 changed files with 181 additions and 23 deletions
@@ -71,26 +71,26 @@
</td>
<td>
<div class="flex flex-col items-center space-y-2">
{% if assignment.status == 'draft' %}
{% if assignment.status == constant('App\\Entity\\Assignment::STATUS_DRAFT') %}
{{ icon('edit', 'w-4 h-4') }}
{% elseif assignment.status == constant('App\\Entity\\Assignment::STATUS_CALLED_OFF') %}
{{ icon('no-symbol', 'w-4 h-4') }}
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_STAFFED') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-green-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_PARTLY_STAFFED') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-yellow-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_STAFFING') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-blue-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% else %}
{% if assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_STAFFED') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-green-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_PARTLY_STAFFED') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-yellow-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_STAFFING') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-blue-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% else %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-gray-100">
<circle cx="3" cy="3" r="2" />
</svg>
{% endif %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-gray-100">
<circle cx="3" cy="3" r="2" />
</svg>
{% endif %}
</div>
</td>
@@ -167,6 +167,17 @@
hx-swap="beforeend">
löschen
</button>
{% if is_granted('CALL_OFF', assignment) %}
<button type="button"
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_assignment_call_off', { 'uuid': assignment.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
absagen
</button>
{% endif %}
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
role="menuitem"
@@ -207,6 +218,10 @@
</div>
<div class="flex items-center space-x-2 pb-8 -mt-4">
<div class="flex items-center">
{{ icon('no-symbol', 'w-4 h-4 mr-1') }}
<span>= abgesagt</span>
</div>
<div class="flex items-center">
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-gray-100 mr-1">
<circle cx="3" cy="3" r="2" />
@@ -0,0 +1,8 @@
{% extends 'htmx_confirmation_modal.html.twig' %}
{% block content %}
<div>
Möchtest du den Einsatz/die Reise <em>{{ assignment.destination.product }}</em> wirklich absagen und die
eingeteilten Teamer:innen benachrichtigen?
</div>
{% endblock %}
@@ -0,0 +1,22 @@
{% extends 'email/layout.html.twig' %}
{% block body %}
<h1>
Hallo aus Köln,
</h1>
<p>
leider mussten wir die Reise zu deinem Einsatz '{{ assignment.destination }}' absagen, sodass dein Einsatz
nicht stattfinden kann.
</p>
<p>
Bitte entschuldige die Umstände!
</p>
<p>
Bei Fragen melde dich gerne unter <a href="mailto:[email protected]">[email protected]</a>
</p>
<p>
<a href="{{ url('app_teamer_index') }}" class="button">
Zum Portal
</a>
</p>
{% endblock %}