feat: duplicate an accommodation booking into a new draft
addresses #869f6z44f
This commit is contained in:
1 parent
2aa98b81fe
commit
29f295abf6
9 files changed
+470
No files matched your search
@@ -97,6 +97,11 @@
|
||||
<twig:dropdown:link url="{{ edit_url }}">
|
||||
bearbeiten
|
||||
</twig:dropdown:link>
|
||||
{# Copying leaves the original alone, so it is offered in every
|
||||
status — see DuplicateController. #}
|
||||
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_duplicate', { 'id': booking.id, 'r': return_url() }) }}">
|
||||
duplizieren
|
||||
</twig:dropdown:hxbutton>
|
||||
{% if booking.confirmed %}
|
||||
<twig:dropdown:link url="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}">
|
||||
PDF herunterladen
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block title %}{{ booking.recordLabel }} kopieren{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du {{ booking.acceptedAt is not null ? 'die Buchung' : 'das Angebot' }} für
|
||||
<em>{{ booking.groupName }}</em> kopieren?
|
||||
Die Kopie übernimmt Gruppenhaus, Zeitraum, Personen, Leistungen, Rabatte und den
|
||||
berechneten Preis unverändert und wird als neuer Entwurf angelegt. Das Original bleibt
|
||||
unverändert, und die Kopie bekommt einen eigenen Zugangslink.
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block button_confirm %}kopieren{% endblock %}
|
||||
@@ -291,6 +291,13 @@
|
||||
{% if app.request.query.get('r') %}
|
||||
{% set edit_params = edit_params | merge({ 'r': app.request.query.get('r') }) %}
|
||||
{% endif %}
|
||||
<button type="button"
|
||||
class="button button--secondary button--small"
|
||||
hx-get="{{ path('app_admin_accommodationbooking_duplicate', edit_params) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
duplizieren
|
||||
</button>
|
||||
<a href="{{ path('app_admin_accommodationbooking_edit', edit_params) }}" class="button button--primary button--small">
|
||||
bearbeiten
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user