Feat: Make dispositions deletable by admins

This commit is contained in:
Björn Fromme
2023-10-21 10:50:47 +02:00
parent 0fce77fbb7
commit cc93a0be0c
6 changed files with 143 additions and 4 deletions
+13 -2
View File
@@ -91,7 +91,7 @@
</tr>
{% else %}
<tr>
<td colspan="3">
<td colspan="4">
Es liegen keine Bewerbungen vor...
</td>
</tr>
@@ -143,12 +143,23 @@
</td>
<td>
<div class="flex items-center justify-end space-x-2">
{% if is_granted('DELETE', disposition) %}
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Einteilung löschen',
'url': path('app_admin_disposition_delete', { 'uuid': disposition.uuid })
}) }}>
{{ icon('delete') }}
</button>
{% endif %}
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
<td colspan="4">
Es gibt noch keine Einteilungen...
</td>
</tr>
@@ -0,0 +1,9 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-4">
{{ form_row(form.remarks) }}
</div>
<button type="submit" class="btn">
Löschen
</button>
{{ form_rest(form) }}
{{ form_end(form) }}