WIP: Implement CRUD, improve menu configuration

This commit is contained in:
Björn Fromme
2023-09-27 17:50:42 +02:00
parent c55fd85314
commit c528156959
43 changed files with 2187 additions and 3475 deletions
@@ -0,0 +1,21 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Bewerbungsübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Bewerbungsübersicht
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
{% endblock %}
@@ -0,0 +1,21 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
{% endblock %}
+21
View File
@@ -0,0 +1,21 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Dokumentenübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Dokumentenübersicht
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
{% endblock %}
@@ -0,0 +1,15 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.question) }}
{{ form_row(form.answer) }}
</div>
<div class="flex items-center space-x-2">
<button type="submit" class="btn">
Speichern
</button>
<a href="{{ path('app_admin_system_faq_index') }}" class="btn btn--secondary">
Abbrechen
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
@@ -0,0 +1,12 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - FAQ anlegen{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
FAQ anlegen
</h1>
{% include 'admin/system/faq/_form.html.twig' %}
</div>
{% endblock %}
+12
View File
@@ -0,0 +1,12 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - FAQ bearbeiten{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
FAQ bearbeiten
</h1>
{% include 'admin/system/faq/_form.html.twig' %}
</div>
{% endblock %}
@@ -0,0 +1,67 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - FAQ{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
FAQ
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th class="w-2/5">
Frage
</th>
<th class="w-2/5">
Antwort
</th>
<th></th>
</tr>
</thead>
<tbody {{ stimulus_controller('sortable', { 'endpoint': path('app_admin_system_faq_sort') }) }}>
{% for faq in faqs %}
<tr {{ stimulus_target('sortable', 'item') }} data-item-id="{{ faq.id }}">
<td>
{{ faq.question }}
</td>
<td>
{{ faq.answer|u.truncate(64, '...') }}
</td>
<td>
<div class="flex items-center space-x-2 justify-end">
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du das Honorar wirklich löschen?',
'target-url': path('app_admin_system_faq_delete', { 'id': faq.id })
}) }}>
{{ icon('delete') }}
</button>
<a href="{{ path('app_admin_system_faq_edit', { 'id': faq.id }) }}">
{{ icon('edit') }}
</a>
<button type="button" class="cursor-move" {{ stimulus_target('sortable', 'handle') }}>
{{ icon('sort') }}
</button>
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<a href="{{ path('app_admin_system_faq_create') }}" class="btn">
Neu
</a>
{% endblock %}
@@ -0,0 +1,12 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Job-Profil bearbeiten{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Job-Profil bearbeiten
</h1>
{% include 'admin/system/job_profile/_form.html.twig' %}
</div>
{% endblock %}
@@ -30,13 +30,30 @@
{{ jobProfile.name }}
</td>
<td>
{{ jobProfile.requiredTraining|default('-') }}
{{ jobProfile.requiredTraining.name|default('-') }}
</td>
<td>
{{ jobProfile.requiredLicenses|join(', ') }}
<div class="flex items-center space-x-2">
{% for license in jobProfile.requiredLicenses %}
{{ icon(license, 'w-5 h-5') }}
{% endfor %}
</div>
</td>
<td>
<div class="flex items-center space-x-2 justify-end">
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du das Job-Profil wirklich löschen?',
'target-url': path('app_admin_system_job_profile_delete', { 'id': jobProfile.id })
}) }}>
{{ icon('delete') }}
</button>
<a href="{{ path('app_admin_system_job_profile_edit', { 'id': jobProfile.id }) }}">
{{ icon('edit') }}
</a>
</div>
</td>
</tr>
@@ -31,6 +31,19 @@
</td>
<td>
<div class="flex items-center space-x-2 justify-end">
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du die Fortbildung wirklich löschen?',
'target-url': path('app_admin_system_training_delete', { 'id': training.id })
}) }}>
{{ icon('delete') }}
</button>
<a href="{{ path('app_admin_system_training_edit', { 'id': training.id }) }}">
{{ icon('edit') }}
</a>
</div>
</td>
</tr>
+3 -1
View File
@@ -3,7 +3,9 @@
{% block body %}
<div class="container grid lg:grid-cols-4 gap-8 py-8">
<div class="lg:col-span-4 flex items-center justify-between">
<img class="h-8 w-auto" src="{{ asset('build/images/logo.svg') }}" alt="My E&amp;P Team">
<a href="{{ path(app.user.defaultRoute) }}">
<img class="h-8 w-auto" src="{{ asset('build/images/logo.svg') }}" alt="My E&amp;P Team">
</a>
<a href="{{ path('app_security_logout') }}" class="hidden lg:block">
{{ icon('logout', 'w-8 h-8 text-gray-700') }}
</a>
+6 -1
View File
@@ -4,7 +4,7 @@
<div class="w-full h-screen flex flex-col items-center justify-center px-4">
<div class="w-full max-w-sm">
<h1 class="text-4xl font-bold text-gray-900 mb-6">
MyE&amp;P Teams
MyE&amp;P Team
</h1>
{% if error %}
<div class="flex items-center space-x-1 bg-red-500 text-white p-2 rounded-md mb-6">
@@ -32,6 +32,11 @@
</button>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
</form>
<div class="pt-4">
<a href="{{ path('app_security_password_reset') }}" class="text-sm underline">
Passwort vergessen?
</a>
</div>
</div>
</div>
+6 -1
View File
@@ -4,7 +4,7 @@
<div class="w-full h-screen flex flex-col items-center justify-center px-4">
<div class="w-full max-w-sm">
<h1 class="text-4xl font-bold text-gray-900 mb-6">
MyE&amp;P Teams
MyE&amp;P Team
</h1>
{{ form_start(form) }}
<div class="mb-6">
@@ -19,6 +19,11 @@
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
<div class="pt-4">
<a href="{{ path('app_security_login') }}" class="text-sm underline">
zurück zum Login
</a>
</div>
</div>
</div>
+26
View File
@@ -0,0 +1,26 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}FAQ{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
FAQ
</h1>
<div class="flex flex-col space-y-4">
{% for faq in faqs %}
<div {{ stimulus_controller('toggle', [], {'closed': 'hidden'}) }}>
<div {{ stimulus_action('toggle', 'toggle', 'click') }} role="button" class="flex items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-8 h-8" {{ stimulus_target('toggle', 'icon') }}>
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
<span class="flex-1 text-xl">{{ faq.question }}</span>
</div>
<div class="hidden" {{ stimulus_target('toggle', 'toggle') }}>
<div class="pl-10 pr-4 py-2">
{{ faq.answer|nl2br }}
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}