feat: review received form submissions in the admin ui
This commit is contained in:
1 parent
f073a2014d
commit
cb2d64f2cd
19 files changed
+999
-7
No files matched your search
@@ -0,0 +1,133 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
|
||||
{% block title %}Eingegangene Formulare{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-start justify-between pb-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
Eingegangene Formulare
|
||||
</h1>
|
||||
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
|
||||
<button type="button"
|
||||
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
|
||||
title="Filter"
|
||||
hx-get="{{ path('app_common_application_form_submission_filter', { 'r': return_url() }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('filter', 'w-4 h-4 shrink-0') }}
|
||||
{% if filterDto.active %}
|
||||
<span class="whitespace-nowrap">{{ filterDto.activeFiltersCount }} Filter aktiv</span>
|
||||
{% else %}
|
||||
<span>Filter</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% if filterDto.active %}
|
||||
<a href="{{ path('app_common_application_form_submission_filter_reset') }}"
|
||||
class="btn btn--small btn--secondary">
|
||||
Reset
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-table-wrapper">
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Name', 'submission.lastName') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'E-Mail', 'submission.email') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Formular', 'submission.formLabel') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'eingegangen', 'submission.submittedAt') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, '1. Mail', 'submission.firstMailSentAt') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, '2. Mail', 'submission.secondMailSentAt') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, '1. Call', 'submission.firstCallHeldAt') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, '2. Call', 'submission.secondCallHeldAt') }}
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for submission in pagination %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_application_form_submission_detail', { 'uuid': submission.uuid, 'r': return_url() }) }}">
|
||||
{% if submission.lastName or submission.firstName %}
|
||||
{{ [submission.lastName, submission.firstName]|filter(part => part is not empty)|join(', ') }}
|
||||
{% else %}
|
||||
ohne Namen
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if submission.email %}
|
||||
<a href="mailto:{{ submission.email }}">{{ submission.email }}</a>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ submission.formLabel }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap">
|
||||
{{ submission.submittedAt|date('d.m.Y, H:i') }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap">
|
||||
{{ submission.firstMailSentAt ? submission.firstMailSentAt|date('d.m.Y, H:i') : '-' }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap">
|
||||
{{ submission.secondMailSentAt ? submission.secondMailSentAt|date('d.m.Y, H:i') : '-' }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap">
|
||||
{{ submission.firstCallHeldAt ? submission.firstCallHeldAt|date('d.m.Y') : '-' }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap">
|
||||
{{ submission.secondCallHeldAt ? submission.secondCallHeldAt|date('d.m.Y') : '-' }}
|
||||
</td>
|
||||
<td>
|
||||
<twig:DropDown>
|
||||
<a href="{{ path('app_admin_application_form_submission_detail', { 'uuid': submission.uuid, 'r': return_url() }) }}"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
||||
role="menuitem"
|
||||
tabindex="-1">
|
||||
Details
|
||||
</a>
|
||||
<button type="button"
|
||||
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_admin_application_form_submission_delete', { 'uuid': submission.uuid, 'r': return_url() }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
löschen
|
||||
</button>
|
||||
</twig:DropDown>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
Keine Daten...
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ knp_pagination_render(pagination) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user