221 lines
11 KiB
Twig
221 lines
11 KiB
Twig
{% extends 'teamer/layout.html.twig' %}
|
|
|
|
{% block title %}Einsatzdetails{% endblock %}
|
|
|
|
{% block content %}
|
|
{% set assignment = disposition.assignment %}
|
|
<h1 class="text-2xl font-bold pb-8">
|
|
{% if workflow_has_marked_place(disposition, 'ended') or workflow_has_marked_place(disposition, 'completed') %}
|
|
Dein Einsatz ist abgeschlossen
|
|
{% else %}
|
|
Dein Einsatz wurde bestätigt!
|
|
{% endif %}
|
|
</h1>
|
|
<div class="grid lg:grid-cols-2 gap-8 items-start">
|
|
<div>
|
|
{% include '_partials/_assignment_info.html.twig' with {
|
|
'additional': [
|
|
{
|
|
'type': 'Ansprechperson',
|
|
'description': 'Für alle reisebezogenen Themen wende dich bitte an ' ~ assignment.contact ~ ' (<a href="mailto:' ~ assignment.contact.email ~'" class="underline">' ~ assignment.contact.email ~ '</a>)'
|
|
},
|
|
{
|
|
'type': 'Kalendereintrag',
|
|
'description': '<a href="' ~ path('app_teamer_disposition_ics', { 'uuid': disposition.uuid }) ~ '" title="In den Kalender eintragen" class="underline">Hier klicken</a>'
|
|
}
|
|
]
|
|
} %}
|
|
</div>
|
|
<div>
|
|
{# Upload contract #}
|
|
{% if workflow_has_marked_place(disposition, 'new') %}
|
|
<h2 class="text-lg font-bold pb-4">
|
|
Honorarvertrag
|
|
</h2>
|
|
|
|
|
|
{# Existing upload has been rejected #}
|
|
{% set contract = disposition.documentByType('contract') %}
|
|
{% if contract and contract.status == constant('App\\Entity\\Upload::STATUS_REJECTED') %}
|
|
<twig:MessageBox message="Dein Honorarvertrag muss überarbeitet werden" type="error"/>
|
|
{% if contract.comment %}
|
|
<div class="py-2">
|
|
<strong>Begründung:</strong> {{ contract.comment|nl2br }}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# New upload #}
|
|
{% if workflow_can(disposition, 'upload_contract') %}
|
|
{% set formAttr = stimulus_controller('form-upload-guard')|stimulus_action('form-upload-guard', 'guard', 'submit') %}
|
|
{{ form_start(form, { 'attr': formAttr.toArray() }) }}
|
|
<div class="flex flex-col space-y-4">
|
|
<a href="{{ path('app_teamer_disposition_contractpdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
|
|
<img src="{{ asset('build/images/contract_thumb.jpg') }}" alt="Honorarvertrag" class="block w-32 h-auto shadow-md">
|
|
</a>
|
|
<div>
|
|
Bitte lade ihn unterschrieben hier wieder hoch:
|
|
</div>
|
|
{% include '_partials/_upload_collection_form.html.twig' with {
|
|
'endpoint_upload': path('_uploader_upload_contract'),
|
|
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
|
|
} %}
|
|
{% if form.pickup is defined %}
|
|
{{ form_row(form.pickup) }}
|
|
{% endif %}
|
|
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
|
Aktualisieren
|
|
</button>
|
|
</div>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|
|
{% else %}
|
|
{% for blocker in workflow_transition_blockers(disposition, 'upload_contract') %}
|
|
<twig:MessageBox message="{{ blocker.message }}"/>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# Upload invoice #}
|
|
{% if workflow_has_marked_place(disposition, 'ended') %}
|
|
<h2 class="text-lg font-bold pb-4">
|
|
Honorarnote
|
|
</h2>
|
|
|
|
{# Existing invoice has been rejected #}
|
|
{% set invoice = disposition.documentByType('invoice') %}
|
|
{% if invoice and invoice.status == constant('App\\Entity\\Upload::STATUS_REJECTED') %}
|
|
<twig:MessageBox message="Deine Honorarnote muss überarbeitet werden" type="error"/>
|
|
{% if invoice.comment %}
|
|
<div class="py-2">
|
|
<strong>Begründung:</strong> {{ invoice.comment|nl2br }}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# New invoice #}
|
|
{% if workflow_can(disposition, 'upload_invoice') %}
|
|
{% set formAttr = stimulus_controller('form-upload-guard')|stimulus_action('form-upload-guard', 'guard', 'submit') %}
|
|
{{ form_start(form, { 'attr': formAttr.toArray() }) }}
|
|
<div class="flex flex-col space-y-4">
|
|
<a href="{{ path('app_teamer_disposition_invoicepdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
|
|
<img src="{{ asset('build/images/invoice_thumb.jpg') }}" alt="Honorarnote" class="block w-32 h-auto shadow-md">
|
|
</a>
|
|
<div>
|
|
Bitte lade sie ausgefüllt und unterschrieben hier wieder hoch:
|
|
</div>
|
|
{% include '_partials/_upload_collection_form.html.twig' with {
|
|
'endpoint_upload': path('_uploader_upload_invoice'),
|
|
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
|
|
} %}
|
|
{% if form.confirmInvoiceData is defined %}
|
|
{{ form_row(form.confirmInvoiceData) }}
|
|
{% endif %}
|
|
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
|
Aktualisieren
|
|
</button>
|
|
</div>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|
|
{% else %}
|
|
{% for blocker in workflow_transition_blockers(disposition, 'upload_invoice') %}
|
|
<twig:MessageBox message="{{ blocker.message }}"/>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# Contract uploaded #}
|
|
{% if workflow_has_marked_place(disposition, 'checking_contract') %}
|
|
<h3 class="text-xl font-bold pb-4">
|
|
Danke für den Upload des Honorarvertrags
|
|
</h3>
|
|
<div class="pb-4">
|
|
Wir prüfen das Dokument schnellstmöglich.
|
|
</div>
|
|
|
|
{# Existing upload is being checked #}
|
|
{% set contract = disposition.documentByType('contract') %}
|
|
{% if contract and contract.status == constant('App\\Entity\\Upload::STATUS_PENDING') %}
|
|
<twig:MessageBox message="Dein Honorarvertrag befindet sich in Bearbeitung"/>
|
|
{% if contract.comment %}
|
|
<div class="py-2">
|
|
<strong>Begründung:</strong> {{ contract.comment|nl2br }}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if workflow_has_marked_place(disposition, 'confirmed') %}
|
|
{% if assignment.skipFormalities %}
|
|
<h3 class="text-xl font-bold pb-4">
|
|
Dein Einsatz ist bestätigt
|
|
</h3>
|
|
<p class="pb-4">
|
|
Es sind keine weiteren Schritte nötig - für diesen Einsatz brauchen wir
|
|
weder einen Honorarvertrag noch eine Honorarnote von dir.
|
|
</p>
|
|
{% else %}
|
|
<h3 class="text-xl font-bold pb-4">
|
|
Danke für den Upload des Honorarvertrags
|
|
</h3>
|
|
{% set contract = disposition.documentByType('contract') %}
|
|
{% if contract %}
|
|
<div class="pb-4">
|
|
<a href="{{ path('app_common_download', { 'uuid': contract.uuid }) }}"
|
|
class="underline">
|
|
Download Vertrag
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# Invoice uploaded #}
|
|
{% if workflow_has_marked_place(disposition, 'checking_invoice') %}
|
|
<h3 class="text-xl font-bold pb-4">
|
|
Danke für den Upload der Honorarnote
|
|
</h3>
|
|
<div class="pb-4">
|
|
Wir prüfen das Dokument schnellstmöglich.
|
|
</div>
|
|
|
|
{# Existing upload is being checked #}
|
|
{% set invoice = disposition.documentByType('invoice') %}
|
|
{% if invoice and invoice.status == constant('App\\Entity\\Upload::STATUS_PENDING') %}
|
|
<twig:MessageBox message="Deine Honorarnote befindet sich in Bearbeitung"/>
|
|
{% if invoice.comment %}
|
|
<div class="py-2">
|
|
<strong>Begründung:</strong> {{ invoice.comment|nl2br }}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{# Invoice paid #}
|
|
{% if workflow_has_marked_place(disposition, 'completed') %}
|
|
{% if assignment.skipFormalities %}
|
|
<h3 class="text-xl font-bold pb-4">
|
|
Dein Einsatz ist abgeschlossen
|
|
</h3>
|
|
<p class="pb-4">
|
|
Danke, dass du dabei warst!
|
|
</p>
|
|
{% else %}
|
|
<h3 class="text-xl font-bold pb-4">
|
|
Danke für die Honorarnote
|
|
</h3>
|
|
<p class="pb-4">
|
|
Wir werden sie schnellstmöglich bearbeiten.
|
|
</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<div class="pt-4">
|
|
<a href="{{ returnUrl }}" class="underline">
|
|
zurück
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|