Feat: Extend application info popup

This commit is contained in:
Björn Fromme
2023-10-20 11:12:11 +02:00
parent 2d657611fa
commit 544e2f1c12
2 changed files with 42 additions and 29 deletions
+1 -1
View File
@@ -70,7 +70,7 @@
aria-label="Bewerber:innen-Info anzeigen" aria-label="Bewerber:innen-Info anzeigen"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }} {{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', 'click', { {{ stimulus_action('modal-button', 'ajax', 'click', {
'title': 'Bewerber:innen-Info', 'title': 'Teeamer-Info ' ~ application.teamer,
'url': path('app_admin_application_info', { 'uuid': application.uuid }) 'url': path('app_admin_application_info', { 'uuid': application.uuid })
}) }}> }) }}>
{% if assignment.pickup %} {% if assignment.pickup %}
+41 -28
View File
@@ -1,31 +1,44 @@
<h3 class="text-xl font-bold pb-4"> <div class="flex items-start">
{{ application.teamer }} <div class="flex-1 pr-8">
</h3> {% include '_partials/_assignment_requirements_info.html.twig' with {
{% include '_partials/_assignment_requirements_info.html.twig' with { 'assignment': application.assignment,
'assignment': application.assignment, 'teamer': application.teamer
'teamer': application.teamer } %}
} %} <ul class="pb-8 divide-y divide-gray-200">
<ul class="pb-8 divide-y divide-gray-200"> {% for type in ['ski', 'snowboard'] %}
{% for type in ['ski', 'snowboard'] %} <li class="py-2">
<li class="py-2"> <div class="flex items-center justify-between">
<div class="flex items-center justify-between"> <span class="flex-1">{{ type|license_label }}</span>
<span class="flex-1">{{ type|license_label }}</span> {% set license = application.teamer.licenseOfType(type) %}
{% set license = application.teamer.licenseOfType(type) %} {% if license %}
{% if license %} <div class="flex items-center space-x-2">
<div class="flex items-center space-x-2"> <span>{{ license.date|date('m/Y') }}</span>
<span>{{ license.date|date('m/Y') }}</span> {% if is_granted('DOWNLOAD', license.certificate) %}
{% if is_granted('DOWNLOAD', license.certificate) %} <a href="{{ path('app_common_download', { 'uuid': license.certificate.uuid, 'inline': true }) }}"
<a href="{{ path('app_common_download', { 'uuid': license.certificate.uuid, 'inline': true }) }}" target="_blank"
target="_blank" title="Download Nachweis">
title="Download Nachweis"> {{ icon('download', 'w-4 h-4') }}
{{ icon('download', 'w-4 h-4') }} </a>
</a> {% endif %}
</div>
{% else %}
{{ icon('minus', 'w-4 h-4') }}
{% endif %} {% endif %}
</div> </div>
{% else %} </li>
{{ icon('minus', 'w-4 h-4') }} {% endfor %}
{% endif %} </ul>
</div>
<div>
{% set teamer = application.teamer %}
{% if teamer.photo %}
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
class="w-32 h-auto border-2 border-primary"
alt="{{ teamer.firstName }}">
{% else %}
<div class="border-2 border-primary">
{{ icon('user', 'w-32 h-32 text-gray-200') }}
</div> </div>
</li> {% endif %}
{% endfor %} </div>
</ul> </div>