289 lines
11 KiB
Twig
289 lines
11 KiB
Twig
{% form_theme form 'forms_admin.html.twig' %}
|
|
|
|
{{ form_start(form) }}
|
|
<div class="grid lg:grid-cols-2 lg:gap-x-8 items-start">
|
|
<div class="grid lg:grid-cols-2 gap-y-4 lg:gap-x-4">
|
|
<div class="lg:col-span-2">
|
|
{{ form_row(form.name) }}
|
|
</div>
|
|
{{ form_row(form.code) }}
|
|
{{ form_row(form.minPaxSummer) }}
|
|
{{ form_row(form.maxAdolescentAge) }}
|
|
{{ form_row(form.currency) }}
|
|
</div>
|
|
{% if cmsData is defined and cmsData.name is defined %}
|
|
<div class="space-y-4">
|
|
{% if cmsData.images.resized.m | length > 0 %}
|
|
{% set image = cmsData.images.resized.m[0] %}
|
|
<div class="max-w-64">
|
|
<img src="{{ image.url }}" alt="{{ image.alt }}" class="block w-full h-auto">
|
|
</div>
|
|
{% endif %}
|
|
<div>
|
|
<strong>{{ cmsData.name }}</strong>
|
|
<br>
|
|
{{ cmsData.address | default('-') | nl2br }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="flex justify-between pt-8">
|
|
<a href="{{ path('app_admin_accommodation') }}" class="button button--secondary button--small">
|
|
zurück
|
|
</a>
|
|
<button type="submit" class="button button--primary button--small">
|
|
speichern
|
|
</button>
|
|
</div>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|
|
|
|
<hr class="my-8">
|
|
|
|
<twig:calendar :accommodation="accommodation"/>
|
|
|
|
<hr class="my-8">
|
|
|
|
<h2 class="text-xl font-bold">
|
|
Preise
|
|
</h2>
|
|
<div class="data-table-wrapper mb-4">
|
|
<div class="data-table-wrapper__inner text-sm">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>
|
|
von
|
|
</th>
|
|
<th>
|
|
bis
|
|
</th>
|
|
<th>
|
|
Saison
|
|
</th>
|
|
<th>
|
|
Pax bis
|
|
</th>
|
|
<th>
|
|
Mindestmiete pro Nacht
|
|
</th>
|
|
<th>
|
|
weitere Personen pro Nacht
|
|
</th>
|
|
<th>
|
|
Unterbelegung
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for price in accommodation.accommodationPrices %}
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
{{ price.dateFrom | date('d.m.Y') }}
|
|
</td>
|
|
<td>
|
|
{{ price.dateTo | date('d.m.Y') }}
|
|
</td>
|
|
<td>
|
|
{{ price.season.token | trans }}
|
|
</td>
|
|
<td>
|
|
{{ price.includedPax }}
|
|
</td>
|
|
<td>
|
|
{{ (price.effectivePricePerNight / 100) | format_currency(accommodation.currency) }}
|
|
{% if price.pricePerNightOverride is not null %}
|
|
<span class="line-through text-xs">{{ (price.pricePerNight / 100) | format_currency(accommodation.currency) }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ (price.effectivePriceAdditionalPerson / 100) | format_currency(accommodation.currency) }}
|
|
{% if price.priceAdditionalPersonOverride is not null %}
|
|
<span class="line-through text-xs">{{ (price.priceAdditionalPerson / 100) | format_currency(accommodation.currency) }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if price.acceptUndersubscription %}
|
|
{{ icon('check', 'w-4 h-4') }}
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-right">
|
|
<twig:dropdown>
|
|
<twig:dropdown:link url="{{ path('app_admin_accommodationprice_edit', { 'id': price.id }) }}">
|
|
bearbeiten
|
|
</twig:dropdown:link>
|
|
<twig:dropdown:link url="{{ path('app_admin_accommodationprice_duplicate', { 'id': price.id }) }}">
|
|
duplizieren
|
|
</twig:dropdown:link>
|
|
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationprice_delete', { 'id': price.id }) }}" warning>
|
|
löschen
|
|
</twig:dropdown:hxbutton>
|
|
</twig:dropdown>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="7" class="text-center">
|
|
Keine Daten
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-end">
|
|
<a href="{{ path('app_admin_accommodationprice_create', { 'id': accommodation.id }) }}" class="button button--primary button--small">
|
|
neu
|
|
</a>
|
|
</div>
|
|
|
|
<hr class="my-8">
|
|
|
|
<h2 class="text-xl font-bold">
|
|
Verpflegungsleistungen
|
|
</h2>
|
|
<div class="data-table-wrapper mb-4">
|
|
<div class="data-table-wrapper__inner text-sm">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>
|
|
Datums-Bereich
|
|
</th>
|
|
<th>
|
|
Bezeichnung
|
|
</th>
|
|
<th>
|
|
Preis pro Person/Nacht
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody data-controller="sortable" data-sortable-url-value="{{ path('app_admin_boardservice_sort', { 'id': accommodation.id }) }}">
|
|
{% for service in accommodation.boardServices %}
|
|
<tr data-sortable-target="item">
|
|
<td class="cursor-grab w-6" data-sortable-target="handle">
|
|
{{ icon('draggable', 'w-4 h-4') }}
|
|
</td>
|
|
<td>
|
|
{{ service.dateFrom | date('d.m.Y') }} - {{ service.dateTo | date('d.m.Y') }}
|
|
</td>
|
|
<td>
|
|
{{ service.label }}
|
|
<input type="hidden" name="sorting[{{ service.id }}]" value="{{ loop.index }}" data-sortable-target="positionField" data-id="{{ service.id }}">
|
|
</td>
|
|
<td>
|
|
{{ (service.price / 100) | format_currency(accommodation.currency) }}
|
|
</td>
|
|
<td class="text-right">
|
|
<twig:dropdown>
|
|
<twig:dropdown:link url="{{ path('app_admin_boardservice_edit', { 'id': service.id }) }}">
|
|
bearbeiten
|
|
</twig:dropdown:link>
|
|
<twig:dropdown:link url="{{ path('app_admin_boardservice_duplicate', { 'id': service.id }) }}">
|
|
duplizieren
|
|
</twig:dropdown:link>
|
|
<twig:dropdown:hxbutton url="{{ path('app_admin_boardservice_delete', { 'id': service.id }) }}" warning>
|
|
löschen
|
|
</twig:dropdown:hxbutton>
|
|
</twig:dropdown>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="5" class="text-center">
|
|
Keine Daten
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-end">
|
|
<a href="{{ path('app_admin_boardservice_create', { 'id': accommodation.id }) }}" class="button button--primary button--small">
|
|
neu
|
|
</a>
|
|
</div>
|
|
|
|
<hr class="my-8">
|
|
|
|
<h2 class="text-xl font-bold">
|
|
Optionale Zusatzleistungen
|
|
</h2>
|
|
<div class="data-table-wrapper mb-4">
|
|
<div class="data-table-wrapper__inner text-sm">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>
|
|
Datums-Bereich
|
|
</th>
|
|
<th>
|
|
Bezeichnung
|
|
</th>
|
|
<th>
|
|
Preistyp
|
|
</th>
|
|
<th>
|
|
Preis
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody data-controller="sortable" data-sortable-url-value="{{ path('app_admin_additionalservice_sort', { 'id': accommodation.id }) }}">
|
|
{% for service in accommodation.additionalServices %}
|
|
<tr data-sortable-target="item">
|
|
<td class="cursor-grab w-6" data-sortable-target="handle">
|
|
{{ icon('draggable', 'w-4 h-4') }}
|
|
</td>
|
|
<td>
|
|
{{ service.dateFrom | date('d.m.Y') }} - {{ service.dateTo | date('d.m.Y') }}
|
|
</td>
|
|
<td>
|
|
{{ service.label }}
|
|
<input type="hidden" name="sorting[{{ service.id }}]" value="{{ loop.index }}" data-sortable-target="positionField" data-id="{{ service.id }}">
|
|
</td>
|
|
<td>
|
|
{{ service.type.label | trans }}
|
|
</td>
|
|
<td>
|
|
{{ (service.price / 100) | format_currency(accommodation.currency) }}
|
|
</td>
|
|
<td class="text-right">
|
|
<twig:dropdown>
|
|
<twig:dropdown:link url="{{ path('app_admin_additionalservice_edit', { 'id': service.id }) }}">
|
|
bearbeiten
|
|
</twig:dropdown:link>
|
|
<twig:dropdown:link url="{{ path('app_admin_additionalservice_duplicate', { 'id': service.id }) }}">
|
|
duplizieren
|
|
</twig:dropdown:link>
|
|
<twig:dropdown:hxbutton url="{{ path('app_admin_additionalservice_delete', { 'id': service.id }) }}" warning>
|
|
löschen
|
|
</twig:dropdown:hxbutton>
|
|
</twig:dropdown>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="6" class="text-center">
|
|
Keine Daten
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-end">
|
|
<a href="{{ path('app_admin_additionalservice_create', { 'id': accommodation.id }) }}" class="button button--primary button--small">
|
|
neu
|
|
</a>
|
|
</div>
|