Feat: Implement availabilities
This commit is contained in:
@@ -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) }}
|
||||
@@ -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) }}
|
||||
|
||||
@@ -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 %}
|
||||
@@ -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 %}
|
||||
@@ -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 %}
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="bg-gray-100 border border-gray-300 border-t-0 px-4 py-3 flex items-center justify-between sm:px-4">
|
||||
<div class="flex-1 flex items-center justify-between">
|
||||
<div>
|
||||
<p class="text-sm leading-5 text-gray-700">{{ 'label.paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}</p>
|
||||
<p class="text-sm leading-5 text-gray-700">{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<nav class="relative z-0 inline-flex">
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
{% extends 'teamer/layout.html.twig' %}
|
||||
|
||||
{% block title %}Meine Verfügbarkeit{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-4">
|
||||
Meine Vergfügbarkeit
|
||||
</h1>
|
||||
<p class="pb-8">
|
||||
Hier kannst du angeben, wann du allgemein Zeit und Lust hättest, Einsätze zu absolvieren. Wenn wir in diesem
|
||||
Zeitraum einen Einsatz zu vergeben haben, dann nehmen wir telefonisch oder per E-Mail Kontakt zu dir auf.
|
||||
</p>
|
||||
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Ich bin verfügbar
|
||||
</h2>
|
||||
<ul class="list-disc pl-4 pb-8">
|
||||
{% for availability in availabilities %}
|
||||
<li>
|
||||
{{ availability.dateFrom|date('d.m.Y') }} - {{ availability.dateTo|date('d.m.Y') }}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="text-sm">
|
||||
Du hast bisher keine Verfügbarkeiten hinterlegt.
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Weitere Verfügbarkeiten
|
||||
</h2>
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.availabilities) }}
|
||||
<button type="submit" class="btn">
|
||||
Aktualisieren
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -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,99 @@
|
||||
{% extends 'teamer/layout.html.twig' %}
|
||||
|
||||
{% block title %}Meine Verfügbarkeit{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-4">
|
||||
Meine Vergfügbarkeit
|
||||
</h1>
|
||||
<p class="pb-8">
|
||||
Hier kannst du angeben, wann du allgemein Zeit und Lust hättest, Einsätze zu absolvieren. Wenn wir in diesem
|
||||
Zeitraum einen Einsatz zu vergeben haben, dann nehmen wir telefonisch oder per E-Mail Kontakt zu dir auf.
|
||||
</p>
|
||||
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Ich bin verfügbar
|
||||
</h2>
|
||||
<div class="grid md:grid-cols-2 gap-8 pb-8">
|
||||
{% for year, months in selectedAvailabilities %}
|
||||
<div>
|
||||
<h3 class="text-lg font-bold">
|
||||
{{ year }}
|
||||
</h3>
|
||||
<div class="flex flex-col space-y-3">
|
||||
{% for month, availabilities in months %}
|
||||
<div>
|
||||
<h4 class="font-bold">
|
||||
{{ month }}
|
||||
</h4>
|
||||
{% for availability in availabilities %}
|
||||
<div class="flex items-center space-x-2">
|
||||
<span>{{ availability }}</span>
|
||||
{% if is_granted('DELETE', availability) %}
|
||||
<button type="button"
|
||||
title="Zeitraum entfernen/löschen"
|
||||
{{ 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_teamer_profile_availability_delete', { 'id': availability.id })
|
||||
}) }}>
|
||||
{{ icon('delete', 'w-5 h-5') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="md:col-span-2 text-sm">
|
||||
Du hast bisher keine Verfügbarkeiten hinterlegt.
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Weitere Verfügbarkeiten
|
||||
</h2>
|
||||
<div class="grid md:grid-cols-2 gap-8 pb-8">
|
||||
{% for year, months in selectableAvailabilities %}
|
||||
<div>
|
||||
<h3 class="text-lg font-bold">
|
||||
{{ year }}
|
||||
</h3>
|
||||
<div class="flex flex-col space-y-3">
|
||||
{% for month, availabilities in months %}
|
||||
<div>
|
||||
<h4 class="font-bold">
|
||||
{{ month }}
|
||||
</h4>
|
||||
{% for availability in availabilities %}
|
||||
<div class="flex items-center space-x-2">
|
||||
<span>{{ availability }}</span>
|
||||
<a href="{{ path('app_teamer_profile_availability_add', { 'id': availability.id }) }}"
|
||||
title="Zeitraum hinzufügen">
|
||||
{{ icon('plus', 'w-5 h-5') }}
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="md:col-span-2 text-sm">
|
||||
Es sind keine weiteren Zeiträume verfügbar.
|
||||
</div>
|
||||
{% endfor %}
|
||||
</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_teamer_profile_availability_create')
|
||||
}) }}>
|
||||
Eigenen Zeitraum hinzufügen
|
||||
</button>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user