156 lines
8.2 KiB
Twig
156 lines
8.2 KiB
Twig
<div class="data-table-wrapper">
|
|
<div class="data-table-wrapper__inner">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Name', 'teamer.lastName') }}
|
|
</th>
|
|
<th>
|
|
Vorname
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Status', 'teamer.status') }}
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'E-Mail', 'teamer.communication.email') }}
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Letzter Login', 'user.lastLoginAt') }}
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for teamer in pagination %}
|
|
<tr>
|
|
<td>
|
|
<div class="flex flex-col items-center space-y-2">
|
|
{% if teamer.photo %}
|
|
<img src="{{ asset(teamer.photo | upload_filename_full | imagine_filter('thumbnail')) }}"
|
|
class="object-cover w-12 h-12 rounded-full"
|
|
alt="{{ teamer.firstName }}">
|
|
{% else %}
|
|
<div class="flex flex-col items-center justify-center w-12 h-12 border-2 border-gray-200 rounded-full">
|
|
{{ icon('user', 'w-10 h-10 text-gray-200') }}
|
|
</div>
|
|
{% endif %}
|
|
<twig:RatingStars rating="{{ teamer.averageRating }}" :teamer="teamer" />
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_teamer_profile', { 'uuid': teamer.uuid, 'r': return_url() }) }}">
|
|
<span class="whitespace-nowrap">{{ teamer.lastName }}</span>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_teamer_profile', { 'uuid': teamer.uuid, 'r': return_url() }) }}" class="whitespace-nowrap">
|
|
{{ teamer.firstName }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{ teamer|teamer_status_label(showAllSeason|default(true)) }}
|
|
</td>
|
|
<td>
|
|
{{ teamer.communication.email }}
|
|
</td>
|
|
<td>
|
|
{% if teamer.user is not null and teamer.user.lastLoginAt is not null %}
|
|
{{ teamer.user.lastLoginAt | date('d.m.Y') }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center space-x-1 justify-end">
|
|
{% if teamer.driverLicenseVerified %}
|
|
{{ icon('car', 'w-5 h-5 text-green-500') }}
|
|
{% endif %}
|
|
{% if not teamer.viewed %}
|
|
<button type="button"
|
|
hx-post="{{ path('app_administrative_teamer_viewed', { 'uuid': teamer.uuid }) }}"
|
|
title="Teamer als gesichtet markieren">
|
|
{{ icon('check') }}
|
|
</button>
|
|
{% endif %}
|
|
{% if teamer.deleted %}
|
|
{% if is_granted('ROLE_TEAM_ADMIN') %}
|
|
<button type="button"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_admin_teamer_restore_account', { 'uuid': teamer.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend"
|
|
title="Account wiederherstellen">
|
|
{{ icon('refresh') }}
|
|
</button>
|
|
{% endif %}
|
|
{% elseif teamer.user is not null and teamer.user.disabled %}
|
|
{% if is_granted('ROLE_TEAM_ADMIN') %}
|
|
<button type="button"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_admin_teamer_enable_user', { 'uuid': teamer.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('unlocked') }}
|
|
</button>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if is_granted('ROLE_TEAM_ADMIN') %}
|
|
<button type="button"
|
|
class="text-red-500"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_admin_teamer_disable_user', { 'uuid': teamer.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('locked') }}
|
|
</button>
|
|
{% endif %}
|
|
{% if is_granted('CAN_IMPERSONATE', teamer.user) %}
|
|
<a href="{{ path('app_teamer_index', { '_switch_user': teamer.user.email }) }}" title="Als Teamer:in maskieren">
|
|
{{ icon('mask') }}
|
|
</a>
|
|
{% endif %}
|
|
{% if is_granted('ROLE_TEAM_ADMIN') %}
|
|
<button type="button"
|
|
class="text-red-500"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_admin_teamer_delete_account', { 'uuid': teamer.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend"
|
|
title="Account löschen">
|
|
{{ icon('delete') }}
|
|
</button>
|
|
{% endif %}
|
|
{% endif %}
|
|
<a href="{{ path('app_administrative_teamer_profile', { 'uuid': teamer.uuid, 'r': return_url() }) }}" title="Teamer:innenprofil {{ teamer }}">
|
|
{{ icon('user') }}
|
|
</a>
|
|
</div>
|
|
{% if teamer.deleted %}
|
|
<div class="py-1 px-2 mt-2 text-xs bg-gray-500 text-white">
|
|
gel. am {{ teamer.deletedAt | date('d.m.Y') }}
|
|
</div>
|
|
{% endif %}
|
|
{% if teamer.user is not null and teamer.user.disabled %}
|
|
<div class="py-1 px-2 mt-2 text-xs bg-red-500 text-white">
|
|
gesp. am {{ teamer.user.disabledAt | date('d.m.Y') }}
|
|
</div>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<td colspan="7">
|
|
Keine Daten...
|
|
</td>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ knp_pagination_render(pagination) }}
|
|
</div>
|
|
</div>
|