feat: all-season assignments
This commit is contained in:
1 parent
675cec1b69
commit
cf876ed224
119 files changed
+6194
-294
No files matched your search
@@ -0,0 +1,100 @@
|
||||
{% extends 'teamer/layout.html.twig' %}
|
||||
|
||||
{% block title %}Saison-Teamer:in{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-md mx-auto">
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Saison-Teamer:in
|
||||
</h1>
|
||||
<p class="pb-8 text-gray-700">
|
||||
Für deinen Einsatz im Haus {{ seasonAssignment.hotelCode | house_label }}
|
||||
({{ seasonAssignment.dateFrom | date('d.m.Y') }} -
|
||||
{{ seasonAssignment.dateTo | date('d.m.Y') }})
|
||||
brauchen wir die folgenden Dokumente von dir.
|
||||
</p>
|
||||
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Allgemeine Dokumente
|
||||
</h2>
|
||||
|
||||
<dl class="divide-y divide-gray-100">
|
||||
{% for row in rows %}
|
||||
<div class="py-6 first:pt-0 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="font-bold leading-6 text-gray-900 sm:col-span-2">
|
||||
{{ row.definition.label }}
|
||||
<div class="text-sm font-normal text-gray-500">
|
||||
{% if row.deadline1 is not null %}
|
||||
bis {{ row.deadline1 | date('d.m.Y') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 sm:mt-0">
|
||||
{% if row.task.done %}
|
||||
<span class="text-green-600">erledigt</span>
|
||||
{% else %}
|
||||
<span class="text-gray-500">offen</span>
|
||||
{% endif %}
|
||||
{% if row.document is not null %}
|
||||
<a href="{{ path('app_common_download', { 'uuid': row.document.uuid }) }}" class="flex items-center space-x-1">
|
||||
{{ icon('download') }}
|
||||
<span class="flex-shrink-0">Vorlage herunterladen</span>
|
||||
</a>
|
||||
{% elseif row.definition.provides == constant('App\\Config\\SeasonTaskProvision::STANDARD') %}
|
||||
<div class="text-gray-500">kein Dokument hinterlegt</div>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
|
||||
<div class="py-6">
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Persönliche Dokumente
|
||||
</h2>
|
||||
{% set personalDocuments = documents | filter(document => document.type == constant('App\\Entity\\Upload::TYPE_SEASON_DOCUMENT_OUT')) %}
|
||||
{% if personalDocuments | length > 0 %}
|
||||
<dl class="divide-y divide-gray-100">
|
||||
{% for document in personalDocuments %}
|
||||
<div class="py-2 flex items-center justify-between">
|
||||
<div>{{ document.displayName | default(document.originalFilename) }}</div>
|
||||
<a href="{{ path('app_common_download', { 'uuid': document.uuid }) }}" class="flex items-center space-x-1">
|
||||
{{ icon('download') }}
|
||||
<span class="flex-shrink-0">Download</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% else %}
|
||||
<div class="text-gray-500">Zurzeit liegen keine persönlichen Dokumente für dich bereit.</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="py-6">
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Deine Uploads
|
||||
</h2>
|
||||
{% set returnedDocuments = documents | filter(document => document.type == constant('App\\Entity\\Upload::TYPE_SEASON_DOCUMENT_IN')) %}
|
||||
{% if returnedDocuments | length > 0 %}
|
||||
<dl class="divide-y divide-gray-100">
|
||||
{% for document in returnedDocuments %}
|
||||
<div class="py-2 flex items-center justify-between">
|
||||
<div>{{ document.originalFilename }}</div>
|
||||
<div class="text-sm text-gray-500">{{ document.createdAt | date('d.m.Y') }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% else %}
|
||||
<div class="text-gray-500">Du hast noch nichts hochgeladen.</div>
|
||||
{% endif %}
|
||||
|
||||
<button type="button"
|
||||
class="btn mt-4"
|
||||
hx-get="{{ path('app_teamer_season_upload', { 'uuid': seasonAssignment.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Dokumente hochladen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Dokumente hochladen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% 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()) }) }}
|
||||
<div class="pb-4">
|
||||
Lade hier die von dir unterschriebenen Dokumente hoch. Wir prüfen sie und haken die Punkte anschließend ab.
|
||||
</div>
|
||||
<div class="pb-4">
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_season_document_in'),
|
||||
'max_filesize': 5,
|
||||
'max_files': 10,
|
||||
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
|
||||
} %}
|
||||
</div>
|
||||
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
||||
Dokumente speichern
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user