feat: remove easy admin bundle, adopt admin theme

This commit is contained in:
Björn Fromme
2026-06-22 08:59:47 +02:00
parent 52ee6b26b1
commit 2fc7ffe458
52 changed files with 1947 additions and 690 deletions
@@ -0,0 +1,87 @@
{% extends 'layout_admin.html.twig' %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Buchungsentwürfe
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'erstellt am', 'booking_edit_draft.createdAt') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Vorgang', 'booking_edit_draft.bookingNumber') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Kundenaccount', 'user.email') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'aktualisiert am', 'booking_edit_draft.updatedAt') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for draft in pagination %}
<tr>
<td>
{{ draft.createdAt | date('d.m.Y, H:i') }}
</td>
<td>
{{ draft.bookingNumber | default('-') }}
</td>
<td>
{{ draft.user.email | default('-') }}
</td>
<td>
{% if draft.updatedAt is not null and draft.updatedAt != draft.createdAt %}
{{ draft.updatedAt | date('d.m.Y, H:i') }}
{% else %}
-
{% endif %}
</td>
<td>
{% embed '_partials/_dropdown.html.twig' %}
{% block content %}
<a href="{{ path('app_admin_bookingeditdraft_show', { 'id': draft.id, 'r': return_url() }) }}"
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
Details
</a>
<a href="{{ path('app_admin_bookingeditdraft_export', { 'id': draft.id }) }}"
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
XLS-Export
</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_bookingeditdraft_delete', { 'id': draft.id, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
löschen
</button>
{% endblock %}
{% endembed %}
</td>
</tr>
{% else %}
<tr>
<td colspan="5">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}
@@ -0,0 +1,7 @@
{% extends 'htmx_confirmation_modal.html.twig' %}
{% block content %}
<div>
Möchtest du den Buchungsentwurf zum Vorgang <em>{{ draft.bookingNumber }}</em> wirklich löschen?
</div>
{% endblock %}
@@ -0,0 +1,16 @@
{% extends 'layout_admin.html.twig' %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Buchungsentwurf
</h1>
<h2 class="text-xl font-bold pb-4">
Vorgang {{ draft.bookingNumber }}
</h2>
{% include('_partials/_json.html.twig') with { 'value': draft.formData } %}
<div class="flex justify-end pt-8">
<a href="{{ returnUrl }}" class="button button--secondary button--small">
zurück
</a>
</div>
{% endblock %}
+10
View File
@@ -0,0 +1,10 @@
{% extends 'layout_admin.html.twig' %}
{% block content %}
<h1>
MyE&amp;P Admin
</h1>
<p>
Noch nicht wirklich was zu sehen hier...
</p>
{% endblock %}
@@ -1,5 +0,0 @@
{% extends '@EasyAdmin/layout.html.twig' %}
{% block main %}
{% endblock main %}
-22
View File
@@ -1,22 +0,0 @@
{% macro render_value(value) %}
{% import _self as self %}
{% if value is iterable %}
<ul class="list-disc list-inside ml-4">
{% for key, item in value %}
<li>
{% if item is iterable %}
<strong>{{ key }}:</strong>
{{ self.render_value(item) }}
{% else %}
<strong>{{ key }}:</strong> {{ item }}
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
{{ value }}
{% endif %}
{% endmacro %}
{% import _self as self %}
{{ self.render_value(field.value) }}
+81
View File
@@ -0,0 +1,81 @@
{% extends 'layout_admin.html.twig' %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Logs
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Datum', 'log.timestamp') }}
</th>
<th>
Fehlercode
</th>
<th>
Benutzer
</th>
<th>
Aktion
</th>
<th>
<span class="whitespace-nowrap">Request ID</span>
</th>
<th>
URI
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for entry in pagination %}
<tr>
<td>
{{ entry.createdAt | date('d.m.Y H:i') }}
</td>
<td>
{{ entry.errorCode | default('-') }}
</td>
<td>
{{ entry.userName }}
</td>
<td>
{{ entry.message }}
</td>
<td>
{{ entry.requestId | default('-') }}
</td>
<td>
<span class="text-xs">{{ entry.uri | default('-') | u.truncate(48, '...') }}</span>
</td>
<td>
{% if entry.channel == 'bpn' %}
{% embed '_partials/_dropdown.html.twig' %}
{% block content %}
<a href="{{ path('app_admin_log_xmldumps', { 'id': entry.id }) }}"
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
XML-Dumps
</a>
{% endblock %}
{% endembed %}
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="7">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}
+61
View File
@@ -0,0 +1,61 @@
{% extends 'layout_admin.html.twig' %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
XML-Dumps für Request ID {{ logEntry.requestId }}
</h1>
{% if dumps is empty %}
<div class="alert alert-warning">
<i class="fa fa-exclamation-triangle"></i>
Keine XML-Dumps gefunden. Die Dateien wurden vermutlich bereits bereinigt.
</div>
{% else %}
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm">
<table class="data-table">
<thead>
<tr>
<th>
Dateiname
</th>
<th>
Typ
</th>
<th>
Dateigröße
</th>
<th>
Aktion
</th>
</tr>
</thead>
<tbody>
{% for dump in dumps %}
<tr>
<td>
<code>{{ dump.filename }}</code>
</td>
<td>
{% if dump.type == 'request' %}
<span class="badge bg-primary">Request</span>
{% else %}
<span class="badge bg-success">Response</span>
{% endif %}
</td>
<td>
{{ (dump.size / 1024)|number_format(1) }} KB
</td>
<td>
<a href="{{ path('app_admin_log_xmldump_download', { filename: dump.filename }) }}"
class="">
{{ icon('download', 'w-4 h-4')}} Download
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% endblock %}
+54
View File
@@ -0,0 +1,54 @@
{% extends 'layout_admin.html.twig' %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Benutzeraccounts
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'E-Mail', 'user.email') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'BusPro Adress Id', 'user.addressId') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'BusPro Personen Id', 'user.personId') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Letzter Login', 'user.lastLoginAt') }}
</th>
</tr>
</thead>
<tbody>
{% for user in pagination %}
<tr>
<td>
{{ user.email }}
</td>
<td>
{{ user.addressId | default('-') }}
</td>
<td>
{{ user.personId | default('-') }}
</td>
<td>
{{ user.lastLoginAt | date('d.m.Y, H:i') }}
</td>
</tr>
{% else %}
<tr>
<td colspan="2">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}
-62
View File
@@ -1,62 +0,0 @@
{% extends '@EasyAdmin/layout.html.twig' %}
{% block content_title %}
XML Dumps
{% endblock %}
{% block main %}
<div class="content-panel">
<div class="content-panel-header">
<h2>XML Dumps for Request ID</h2>
<code>{{ requestId }}</code>
</div>
<div class="content-panel-body">
{% if dumps is empty %}
<div class="alert alert-warning">
<i class="fa fa-exclamation-triangle"></i>
Keine XML-Dumps gefunden. Die Dateien wurden vermutlich bereits bereinigt.
</div>
{% else %}
<table class="table table-striped">
<thead>
<tr>
<th>Dateiname</th>
<th>Typ</th>
<th class="text-end">Dateigröße</th>
<th class="text-end">Aktion</th>
</tr>
</thead>
<tbody>
{% for dump in dumps %}
<tr>
<td><code>{{ dump.filename }}</code></td>
<td>
{% if dump.type == 'request' %}
<span class="badge bg-primary">Request</span>
{% else %}
<span class="badge bg-success">Response</span>
{% endif %}
</td>
<td class="text-end">{{ (dump.size / 1024)|number_format(1) }} KB</td>
<td class="text-end">
<a href="{{ path('admin_xml_dump_download', {filename: dump.filename}) }}"
class="btn btn-sm btn-outline-primary">
<i class="fa fa-download"></i> Download
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<div class="content-panel-footer">
<a href="{{ ea_url().setController('App\\Controller\\Admin\\LogEntryCrudController').setAction('index') }}"
class="btn btn-secondary">
<i class="fa fa-arrow-left"></i> Zurück zur Liste
</a>
</div>
</div>
{% endblock %}