Feat: Implement availabilities

This commit is contained in:
Björn Fromme
2023-10-03 17:42:10 +02:00
parent cc9700a558
commit 25a016a02b
35 changed files with 827 additions and 422 deletions
@@ -0,0 +1,10 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.dateFrom) }}
{{ form_row(form.dateTo) }}
</div>
<button type="submit" class="btn">
Speichern
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
@@ -0,0 +1,68 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Verfügbarkeiten/Zeiträume{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Verfügbarkeiten/Zeiträume
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th class="w-1/3">
{{ knp_pagination_sortable(pagination, 'Datum von', 'availability.dateFrom') }}
</th>
<th class="w-1/3">
{{ knp_pagination_sortable(pagination, 'Datum bis', 'availability.dateTo') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for availability in pagination %}
<tr>
<td>
{{ availability.dateFrom|date('d.m.Y') }}
</td>
<td>
{{ availability.dateTo|date('d.m.Y') }}
</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 den Zeitraum wirklich löschen?',
'target-url': path('app_admin_system_availability_delete', { 'id': availability.id })
}) }}>
{{ icon('delete') }}
</button>
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Zeitraum hinzufügen',
'url': path('app_admin_system_availability_create')
}) }}>
Zeitraum hinzufügen
</button>
{% endblock %}
@@ -1,15 +0,0 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.name) }}
{{ form_row(form.value) }}
</div>
<div class="flex items-center space-x-2">
<button type="submit" class="btn">
Speichern
</button>
<a href="{{ path('app_admin_system_fee_index') }}" class="btn btn--secondary">
Abbrechen
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
+10 -12
View File
@@ -1,12 +1,10 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Honorar anlegen{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Honorar anlegen
</h1>
{% include 'admin/system/fee/_form.html.twig' %}
</div>
{% endblock %}
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.name) }}
{{ form_row(form.value) }}
</div>
<button type="submit" class="btn">
Speichern
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
-12
View File
@@ -1,12 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Honorar bearbeiten{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Honorar bearbeiten
</h1>
{% include 'admin/system/fee/_form.html.twig' %}
</div>
{% endblock %}
+58 -55
View File
@@ -3,62 +3,65 @@
{% block title %}Einstellungen - Honorare{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Honorare
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<h1 class="text-2xl font-bold pb-8">
Honorare
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
Bezeichnung
</th>
<th>
Wert
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for fee in fees %}
<tr>
<th>
Bezeichnung
</th>
<th>
Wert
</th>
<th></th>
<td>
{{ fee.name }}
</td>
<td>
{{ fee.value|format_money }}
</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_fee_delete', { 'id': fee.id })
}) }}>
{{ icon('delete') }}
</button>
</div>
</td>
</tr>
</thead>
<tbody>
{% for fee in fees %}
<tr>
<td>
{{ fee.name }}
</td>
<td>
{{ fee.value|format_money }}
</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_fee_delete', { 'id': fee.id })
}) }}>
{{ icon('delete') }}
</button>
<a href="{{ path('app_admin_system_fee_edit', { 'id': fee.id }) }}">
{{ icon('edit') }}
</a>
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<a href="{{ path('app_admin_system_fee_create') }}" class="btn">
Neu
</a>
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Honorar hinzufügen',
'url': path('app_admin_system_fee_create')
}) }}>
Honorar hinzufügen
</button>
{% endblock %}
@@ -1,14 +0,0 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.name) }}
</div>
<div class="flex items-center space-x-2">
<button type="submit" class="btn">
Speichern
</button>
<a href="{{ path('app_admin_system_training_index') }}" class="btn btn--secondary">
Abbrechen
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
@@ -1,12 +1,9 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Fortbildung anlegen{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Fortbildung anlegen
</h1>
{% include 'admin/system/training/_form.html.twig' %}
</div>
{% endblock %}
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.name) }}
</div>
<button type="submit" class="btn">
Speichern
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
@@ -1,12 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Fortbildung bearbeiten{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Fortbildung bearbeiten
</h1>
{% include 'admin/system/training/_form.html.twig' %}
</div>
{% endblock %}
+58 -55
View File
@@ -3,62 +3,65 @@
{% block title %}Einstellungen - Fortbildungen{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Fortbildungen
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<h1 class="text-2xl font-bold pb-8">
Fortbildungen
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
Bezeichnung
</th>
<th>
Teilnahmen
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for training in trainings %}
<tr>
<th>
Bezeichnung
</th>
<th>
Teilnahmen
</th>
<th></th>
<td>
{{ training.name }}
</td>
<td>
{{ training.trainingAttendances|length|default('-') }}
</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>
</div>
</td>
</tr>
</thead>
<tbody>
{% for training in trainings %}
<tr>
<td>
{{ training.name }}
</td>
<td>
{{ training.trainingAttendances|length|default('-') }}
</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>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<a href="{{ path('app_admin_system_training_create') }}" class="btn">
Neu
</a>
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Fortbildung hinzufügen',
'url': path('app_admin_system_training_create')
}) }}>
Fortbildung hinzufügen
</button>
{% endblock %}