Feat: Add popup window to display teamer info per application

This commit is contained in:
Björn Fromme
2023-10-19 15:49:26 +02:00
parent 585f86e45f
commit 67cc7bf4ed
8 changed files with 107 additions and 20 deletions
+11 -3
View File
@@ -64,7 +64,15 @@
</a>
</td>
<td>
<div class="flex items-center justify-end space-x-1">
<div class="flex items-center justify-end space-x-1"
role="button"
title="Bewerber:innen-Info anzeigen"
aria-label="Bewerber:innen-Info anzeigen"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', 'click', {
'title': 'Bewerber:innen-Info',
'url': path('app_admin_application_info', { 'uuid': application.uuid })
}) }}>
{% if assignment.pickup %}
{% if application.matchesPickup %}
{{ icon('bus', 'w-5 h-5 text-green-500 shrink-0') }}
@@ -73,8 +81,8 @@
{% endif %}
{% endif %}
{% set requiredTrainingsCount = assignment.jobProfile.requiredTrainings|length %}
{% if requiredTrainingsCount > 0 %}
<span>{{ application.completedTrainingsCount }}/{{ requiredTrainingsCount }}</span>
{% if not application.matchesRequiredTrainings %}
{{ icon('alert', 'w-5 h-5 text-red-500 shrink-0') }}
{% endif %}
</div>
</td>
@@ -0,0 +1,31 @@
<h3 class="text-xl font-bold pb-4">
{{ application.teamer }}
</h3>
{% include '_partials/_assignment_requirements_info.html.twig' with {
'assignment': application.assignment,
'teamer': application.teamer
} %}
<ul class="pb-8 divide-y divide-gray-200">
{% for type in ['ski', 'snowboard'] %}
<li class="py-2">
<div class="flex items-center justify-between">
<span class="flex-1">{{ type|license_label }}</span>
{% set license = application.teamer.licenseOfType(type) %}
{% if license %}
<div class="flex items-center space-x-2">
<span>{{ license.date|date('m/Y') }}</span>
{% if is_granted('DOWNLOAD', license.certificate) %}
<a href="{{ path('app_common_download', { 'uuid': license.certificate.uuid, 'inline': true }) }}"
target="_blank"
title="Download Nachweis">
{{ icon('download', 'w-4 h-4') }}
</a>
{% endif %}
</div>
{% else %}
{{ icon('minus', 'w-4 h-4') }}
{% endif %}
</div>
</li>
{% endfor %}
</ul>