feat: special agreements for disposition

This commit is contained in:
Björn Fromme
2024-04-04 13:06:35 +02:00
parent 4d1ea7aad7
commit 26239488ba
19 changed files with 310 additions and 31 deletions
@@ -1,7 +1,21 @@
{% extends 'htmx_confirmation_modal.html.twig' %}
{% extends 'htmx_modal.html.twig' %}
{% block title %}Einteilung{% endblock %}
{% block content %}
<div>
Möchtest du {{ application.teamer }} wirklich einteilen?
<div class="pb-4">
Möchtest du <strong>{{ application.teamer }}</strong> wirklich für den Einsatz <strong>{{ application.assignment.destination}}</strong> einteilen?
</div>
{{ form_start(form) }}
{{ form_row(form.specialAgreements) }}
<div class="mt-6 flex items-center justify-between">
<button type="submit" class="btn">
Ja
</button>
<button type="button" class="btn btn--secondary" {{ stimulus_action('modal', 'close') }}>
Abbrechen
</button>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}
+6 -7
View File
@@ -48,17 +48,16 @@
<ul class="divide-y divide-gray-200">
{% for document in documents %}
<li class="py-2 first:pt-0 last:pb-0">
{% if document.disposition %}
{% set url = path('app_administrative_assignment_detail', { 'uuid': document.disposition.assignment.uuid, 'r': return_url() }) %}
{% else %}
{% set url = path('app_administrative_teamer_profile', { 'uuid': document.owner.teamer.uuid, 'r': return_url() }) %}
{% endif %}
<a href="{{ url }}" class="flex items-center space-x-1 truncate">
<button type="button"
class="flex items-center space-x-1 truncate"
hx-get="{{ path('app_administrative_document_check', { 'uuid': document.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span>{{ document.originalFilename }}</span>
</a>
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
@@ -22,14 +22,14 @@
<th class="w-1/4">
Name
</th>
<th class="w-1/4">
Zustieg
<th class="w-1/5">
Status
</th>
<th>
Wünsche
</th>
<th>
Status
Zustieg
</th>
<th></th>
</tr>
@@ -49,15 +49,15 @@
</button>
<twig:RatingStars rating="{{ application.teamer.averageRating }}" />
</td>
<td>
{{ ('label.application.status.' ~ application.status)|trans }}
</td>
<td>
{{ application.pickup|bpn_pickup_label|default('-') }}
</td>
<td>
{{ application.requests|nl2br|default('-') }}
</td>
<td>
{{ ('label.application.status.' ~ application.status)|trans }}
</td>
<td>
<div class="flex items-center justify-end space-x-2">
{% if is_granted('DISPOSE', application) %}
@@ -95,7 +95,7 @@
</tr>
{% else %}
<tr>
<td colspan="4">
<td colspan="5">
Es liegen keine Bewerbungen vor...
</td>
</tr>
@@ -116,11 +116,14 @@
<th class="w-1/4">
Name
</th>
<th class="w-1/4">
<th class="w-1/5">
Status
</th>
<th>
Anmerkungen
</th>
<th>
Status
Absprachen
</th>
<th></th>
</tr>
@@ -140,11 +143,20 @@
</button>
<twig:RatingStars rating="{{ disposition.teamer.averageRating }}" />
</td>
<td>
{{ ('label.disposition.status.' ~ disposition.status)|trans }}
</td>
<td>
{{ disposition.remarks|nl2br|default('-') }}
</td>
<td>
{{ ('label.disposition.status.' ~ disposition.status)|trans }}
<button type="button"
title="zusätzliche Apsprachen {{ disposition.teamer }}"
hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('edit') }}
</button>
</td>
<td>
<div class="flex items-center justify-end space-x-2">
@@ -163,7 +175,7 @@
</tr>
{% else %}
<tr>
<td colspan="4">
<td colspan="5">
Es gibt noch keine Einteilungen...
</td>
</tr>
@@ -0,0 +1,18 @@
{% extends 'htmx_modal.html.twig' %}
{% block title %}Zusätzliche Abspsprachen{% 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.specialAgreements) }}
</div>
<button type="submit" class="btn">
Aktualisieren
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}
@@ -9,6 +9,9 @@
</h2>
<div class="flex flex-col space-y-4 pb-4">
{{ form_row(form.status) }}
{% if form.specialAgreements is defined %}
{{ form_row(form.specialAgreements) }}
{% endif %}
{{ form_row(form.comment) }}
</div>
<button type="submit" class="btn">
+3 -2
View File
@@ -1,4 +1,4 @@
<div id="htmx-modal" class="fixed inset-0 w-full h-full z-50" {{ stimulus_controller('modal') }}>
<div id="htmx-modal" class="fixed inset-0 w-full h-full z-50" {{ stimulus_controller('modal') }} {{ stimulus_action('modal', 'close', 'modal-close@window') }}>
<div class="absolute inset-0 w-full h-full bg-black/80" {{ stimulus_action('modal', 'close', 'click') }}></div>
<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 px-4 w-full max-w-2xl">
<div class="relative bg-white p-8 rounded-md">
@@ -13,7 +13,8 @@
</button>
</div>
{% block content %}{% endblock %}
<div class="htmx-indicator absolute top-0 left-0 inset-0 bg-white/90 flex items-center justify-center">
<div class="htmx-indicator absolute top-0 left-0 inset-0 bg-white/90 flex items-center justify-center"
id="htmx-modal-indicator">
{% include '_partials/_spinner.html.twig' with { 'class': 'w-8 h-8'} %}
</div>
</div>