feat: additional functionality and layout adjustments for season teamers

This commit is contained in:
fromme committed 2026-09-26 12:13:16 +02:00
1 parent 80c6016da3
commit 4cab57d136
30 files changed
+916 -192

No files matched your search

@@ -7,7 +7,9 @@
Saisonteam-Dokumente
</h1>
<p class="pb-8 text-gray-500">
Auswahl der Standarddokumente für das Saisonteam.
Auswahl der Standarddokumente für das Saisonteam. Ein hier hinterlegtes Dokument gilt für
Saisoneinsätze, die ab dann angelegt werden; bestehende Einsätze behalten ihre Datei und
können es über {{ icon('refresh', 'w-4 h-4 inline-block') }} nachträglich erhalten.
</p>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
@@ -35,6 +37,13 @@
<td>
<div class="flex items-center space-x-2 justify-end">
{% if row.document is not null %}
<button type="button"
title="auf offene Einsätze übertragen"
hx-get="{{ path('app_administrative_system_season_task_document_propagate', { 'uuid': row.document.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('refresh') }}
</button>
<button type="button"
class="text-red-500"
hx-get="{{ path('app_administrative_system_season_task_document_delete', { 'uuid': row.document.uuid }) }}"
@@ -3,11 +3,32 @@
{% block title %}Dokument für {{ task.label }}{% endblock %}
{% block content %}
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
<div class="flex flex-col space-y-4 pb-8">
{% set formAttr = stimulus_controller('form-upload-guard')|stimulus_action('form-upload-guard', 'guard', 'submit') %}
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' }|merge(formAttr.toArray()) }) }}
{{ form_errors(form) }}
<div class="pb-4 text-gray-500">
Das Dokument gilt für Saisoneinsätze, die ab jetzt angelegt werden. Bestehende Einsätze
behalten ihre Datei - sie lässt sich von der Übersicht aus auf offene Einsätze übertragen.
</div>
<div class="flex flex-col space-y-4 pb-4">
{{ form_row(form.document) }}
</div>
<button type="submit" class="btn">
<div class="pb-4">
<div class="font-bold">oder neue Datei hochladen</div>
<div class="pb-2 text-sm text-gray-500">
Eine hochgeladene Datei ersetzt die Auswahl oben.
</div>
{% include '_partials/_upload_collection_form.html.twig' with {
'endpoint_upload': path('_uploader_upload_document'),
'max_filesize': 5,
'max_files': 1,
'accepted_files': 'application/pdf',
} %}
</div>
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.displayName) }}
</div>
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
Speichern
</button>
{{ form_rest(form) }}
@@ -0,0 +1,35 @@
{% extends 'htmx_modal.html.twig' %}
{% block title %}Dokument übertragen{% endblock %}
{% block content %}
<div class="pb-4">
Soll <em>{{ seasonTaskDocument.document.displayName ?? seasonTaskDocument.document.originalFilename }}</em>
auf bestehende Saisoneinsätze übertragen werden?
</div>
{% if tasks | length > 0 %}
<div class="pb-4">
Betroffen sind <strong>{{ tasks | length }}</strong> offene Einsätze bei
<em>{{ seasonTaskDocument.task.label }}</em>. Bereits erledigte Punkte und beendete
Einsätze behalten ihr bisheriges Dokument.
</div>
<ul class="pb-8 divide-y divide-gray-200">
{% for task in tasks %}
<li class="py-2">
{{ task.seasonAssignment | season_assignment_label }}
</li>
{% endfor %}
</ul>
<form hx-post="{{ path('app_administrative_system_season_task_document_propagate', { 'uuid': seasonTaskDocument.uuid }) }}"
hx-target="#htmx-modal"
hx-swap="outerHTML">
<button type="submit" class="btn">
übertragen
</button>
</form>
{% else %}
<div class="pb-4 text-gray-500">
Es gibt keinen offenen Einsatz, auf den das Dokument übertragen werden könnte.
</div>
{% endif %}
{% endblock %}