feat: soft-delete for teamer accounts
addresses #869dv9br3
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<span>{{ application.teamer }}</span>
|
||||
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': application.teamer } %}
|
||||
{{ icon('info', 'w-4 h-4') }}
|
||||
</button>
|
||||
<twig:RatingStars rating="{{ application.teamer.averageRating }}" />
|
||||
@@ -155,6 +156,7 @@
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<span>{{ disposition.teamer }}</span>
|
||||
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
{{ icon('info', 'w-4 h-4') }}
|
||||
</button>
|
||||
<twig:RatingStars rating="{{ disposition.teamer.averageRating }}" />
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.teamer }}
|
||||
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
</td>
|
||||
<td>
|
||||
{{ upload.status|upload_status_badge }}
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{{ feedback.teamer.firstName }}
|
||||
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': feedback.teamer } %}
|
||||
</td>
|
||||
<td>
|
||||
{% if feedback.assignmentDateFrom and feedback.assignmentDateTo %}
|
||||
|
||||
@@ -104,7 +104,19 @@
|
||||
{{ icon('check') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if teamer.user is not null and teamer.user.disabled %}
|
||||
{% if teamer.deleted %}
|
||||
{% if is_granted('ROLE_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_ADMIN') %}
|
||||
<button type="button"
|
||||
role="menuitem"
|
||||
@@ -132,11 +144,28 @@
|
||||
{{ icon('mask') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if is_granted('ROLE_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') }}
|
||||
|
||||
Reference in New Issue
Block a user