wip: functionality for new role 'management'

This commit is contained in:
Björn Fromme
2024-02-14 14:59:47 +01:00
parent 7f05cf30b6
commit 7c7addf531
17 changed files with 312 additions and 68 deletions
-113
View File
@@ -1,113 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Teamübersicht{% endblock %}
{% block content %}
<div class="flex items-start justify-between pb-4">
<h1 class="text-2xl font-bold">
Teamübersicht
</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="Team filtern"
hx-get="{{ path('app_common_teamer_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_teamer_filter_reset', { 'r': return_url() }) }}" 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></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.filename | imagine_filter('profile')) }}"
class="w-12 h-auto 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 %}
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
</div>
</td>
<td>
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}">
<span class="whitespace-nowrap">{{ teamer.lastName }}</span>
</a>
</td>
<td>
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}" class="whitespace-nowrap">
{{ teamer.firstName }}
</a>
</td>
<td>
{{ teamer.status|teamer_status_label }}
</td>
<td>
{{ teamer.communication.email }}
</td>
<td>
{% if 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">
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}" title="Teamer:innenprofil {{ teamer }}">
{{ icon('user') }}
</a>
</div>
</td>
</tr>
{% else %}
<td colspan="7">
Keine Daten...
</td>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}
-230
View File
@@ -1,230 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Stammdaten und Foto {{ teamer }}{% endblock %}
{% block content %}
<div class="grid lg:grid-cols-3 gap-y-8 lg:gap-y-0 lg:gap-x-8">
<div>
{{ knp_menu_render(knp_menu_get('admin_teamer')) }}
</div>
<div class="lg:col-span-2">
<h1 class="text-2xl font-bold pb-8">
Stammdaten und Foto {{ teamer }}
</h1>
<div class="grid grid-cols-2 gap-4">
<div>
<h2 class="text-lg font-bold pb-2">
Persönliche Daten
</h2>
<div class="flex flex-col space-y-3">
<div>
<div class="font-bold">
Gender:
</div>
<div>
{{ teamer.gender }}
</div>
</div>
<div>
<div class="font-bold">
Titel:
</div>
<div>
{{ teamer.academicTitle|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
Vorname:
</div>
<div>
{{ teamer.firstName }}
</div>
</div>
<div>
<div class="font-bold">
Nachname:
</div>
<div>
{{ teamer.lastName }}
</div>
</div>
<div>
<div class="font-bold">
Geburtsdatum:
</div>
<div>
{{ teamer.dateOfBirth|date('d.m.Y') }}
</div>
</div>
<div>
<div class="font-bold">
Staatsangehörigkeit:
</div>
<div>
{{ teamer.nationality|bpn_country_label('nationality') }}
</div>
</div>
</div>
</div>
<div>
{% if teamer.photo %}
<div class="pb-8">
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
class="w-48 h-auto border-2 border-primary"
alt="{{ teamer.firstName }}">
</div>
{% endif %}
</div>
<div>
<h2 class="text-lg font-bold pb-2">
Adressdaten
</h2>
<div class="flex flex-col space-y-3">
<div>
<div class="font-bold">
Straße, Hausnummer:
</div>
<div>
{{ teamer.address.street }}
</div>
</div>
<div>
<div class="font-bold">
PLZ:
</div>
<div>
{{ teamer.address.postCode }}
</div>
</div>
<div>
<div class="font-bold">
Ort:
</div>
<div>
{{ teamer.address.city }}
</div>
</div>
<div>
<div class="font-bold">
Land:
</div>
<div>
{{ teamer.address.country|bpn_country_label }}
</div>
</div>
<div>
<div class="font-bold">
E-Mail:
</div>
<div>
{{ teamer.communication.email|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
Mobilnummer:
</div>
<div>
{{ teamer.communication.mobile|default('-') }}
</div>
</div>
</div>
</div>
<div>
<h2 class="text-lg font-bold pb-2">
Buszustiege
</h2>
<ul class="list-disc pl-4">
{% for pickup in teamer.pickups %}
<li>
{{ pickup|bpn_pickup_label }}
</li>
{% else %}
<li>
<span class="text-sm">Keine Daten</span>
</li>
{% endfor %}
</ul>
</div>
<div>
<h2 class="text-lg font-bold pb-2">
Honorardaten
</h2>
<div class="flex flex-col space-y-3">
<div>
<div class="font-bold">
Steuer-ID:
</div>
<div>
{{ teamer.taxId|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
IBAN:
</div>
<div>
{{ teamer.bankAccount.iban|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
BIC:
</div>
<div>
{{ teamer.bankAccount.bic|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
Bank/Kreditinstitut:
</div>
<div>
{{ teamer.bankAccount.bank|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
Krankenversicherung:
</div>
<div>
{{ teamer.healthInsuranceCompany|default('-') }}
</div>
</div>
</div>
</div>
<div>
<h2 class="text-lg font-bold pb-2">
Sonstiges
</h2>
<div class="flex flex-col space-y-3">
<div>
<div class="font-bold">
Sprache(n):
</div>
<div>
{{ teamer.language|default('-') }}
</div>
</div>
<div>
<div class="font-bold">
Klamottengröße:
</div>
<div>
{{ teamer.size|default('-') }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
@@ -1,74 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Vergangene Einsätze &amp; Feeback {{ teamer }}{% endblock %}
{% block content %}
<div class="grid lg:grid-cols-3 gap-y-8 lg:gap-y-0 lg:gap-x-8">
<div>
{{ knp_menu_render(knp_menu_get('admin_teamer')) }}
</div>
<div class="lg:col-span-2">
<h1 class="text-2xl font-bold pb-8">
Vergangene Einsätze &amp; Feeback {{ teamer }}
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
Einsatz
</th>
<th>
Gesamtnote
</th>
<th>
Kommentar öffentlich/intern
</th>
</tr>
</thead>
<tbody>
{% for disposition in pagination %}
<tr>
<td>
{{ disposition.assignment.destination.dateFrom|date('d.m.Y') }}
<br>
{{ disposition.assignment.destination.product }}
<br>
{{ disposition.assignment.destination.hotel }}
</td>
<td>
{% if disposition.feedback %}
{{ disposition.feedback.averageRating|format_rating }}
{% else %}
-
{% endif %}
</td>
<td>
{% if disposition.feedback %}
<div class="divide-y">
<div class="pb-2">
{{ disposition.feedback.comment|default('-') }}
</div>
<div class="pt-2">
{{ disposition.feedback.commentInternal|default('-') }}
</div>
</div>
{% else %}
-
{% endif %}
</td>
</tr>
{% else %}
<td colspan="7">
Keine Daten...
</td>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
</div>
</div>
{% endblock %}