feat: notify configured recipients when something is booked
This commit is contained in:
1 parent
be37fc81f6
commit
d287cb2600
23 files changed
+1014
-1
No files matched your search
@@ -0,0 +1,31 @@
|
||||
{# Who is notified about new bookings of one kind. See admin/_modal_resource.html.twig for how it closes. #}
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Benachrichtigungen · {{ type.plural }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form, { attr: {
|
||||
'hx-post': form.vars.action,
|
||||
'hx-target': '#htmx-modal',
|
||||
'hx-swap': 'outerHTML',
|
||||
} }) }}
|
||||
{{ form_errors(form) }}
|
||||
|
||||
<p class="pb-4 text-sm text-gray-500">
|
||||
Diese Adressen erhalten eine E-Mail, sobald {{ type.plural }} gebucht werden.
|
||||
</p>
|
||||
|
||||
<div class="space-y-4">
|
||||
{{ form_row(form.notificationRecipients) }}
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-2 pt-6">
|
||||
<button type="button" class="button button--neutral" {{ stimulus_action('modal', 'close') }}>
|
||||
Abbrechen
|
||||
</button>
|
||||
<button type="submit" class="button button--primary">
|
||||
Speichern
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -53,6 +53,10 @@
|
||||
<div class="flex flex-wrap items-baseline justify-between gap-2">
|
||||
<h2>{{ type.plural }}</h2>
|
||||
<div class="flex gap-2">
|
||||
{{ _self.opener(
|
||||
path('app_admin_resource_type_notifications', { type: type.value }),
|
||||
section.recipients > 0 ? 'Benachrichtigungen (' ~ section.recipients ~ ')' : 'Benachrichtigungen'
|
||||
) }}
|
||||
{{ _self.opener(path('app_admin_resource_group_new', { type: type.value }), type.groupLabel ~ ' hinzufügen') }}
|
||||
{{ _self.opener(path('app_admin_resource_new', { type: type.value }), type.label ~ ' hinzufügen', 'primary') }}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user