feat: admin view listing a travel's mailing recipients from bpn-connect
This commit is contained in:
1 parent
63ffe0b0b4
commit
e796dd01ee
10 files changed
+347
No files matched your search
@@ -0,0 +1,71 @@
|
||||
{% extends 'layout_admin.html.twig' %}
|
||||
|
||||
{% form_theme form 'forms_admin.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<twig:page:heading>Reise-Mailingliste</twig:page:heading>
|
||||
{{ form_start(form) }}
|
||||
<div class="flex flex-wrap items-end gap-4 pb-8">
|
||||
<div class="w-64">
|
||||
{{ form_row(form.travelCode) }}
|
||||
</div>
|
||||
<button type="submit"
|
||||
class="button button--primary button--small">
|
||||
abrufen
|
||||
</button>
|
||||
</div>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% if failed %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
level: 'warning',
|
||||
messages: ['Die Teilnehmerliste konnte nicht von BusPro abgerufen werden. Bitte später erneut versuchen.'],
|
||||
} %}
|
||||
{% elseif result is not null %}
|
||||
{% if result.data is empty %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
level: 'warning',
|
||||
messages: ['Keine Empfänger für <code>%s</code> gefunden: Reisecode unbekannt oder keine bestätigten Teilnehmer.'|format(result.travelCode|e)],
|
||||
} %}
|
||||
{% else %}
|
||||
<p class="pb-4 text-sm text-gray-700">
|
||||
{{ result.data|length }} Empfänger für <code>{{ result.travelCode }}</code>
|
||||
</p>
|
||||
<div class="data-table-wrapper">
|
||||
<div class="data-table-wrapper__inner text-sm">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Vorname
|
||||
</th>
|
||||
<th>
|
||||
Nachname
|
||||
</th>
|
||||
<th>
|
||||
E-Mail
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for recipient in result.data %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ recipient.firstName }}
|
||||
</td>
|
||||
<td>
|
||||
{{ recipient.lastName }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:{{ recipient.email }}">{{ recipient.email }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user