feat: restyle admin views in corporate design

This commit is contained in:
fromme committed 2026-11-13 11:51:46 +01:00
1 parent c660bd68de
commit 558e45fe5f
19 files changed
+99 -100

No files matched your search

+13 -13
View File
@@ -39,24 +39,24 @@
{% endif %} {% endif %}
</div> </div>
<div class="flex justify-between pt-8"> <div class="flex justify-between pt-8">
<a href="{{ path('app_admin_accommodation') }}" class="button button--secondary button--small"> <a href="{{ path('app_admin_accommodation') }}" class="btn-secondary">
zurück zurück
</a> </a>
<button type="submit" class="button button--primary button--small"> <button type="submit" class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
{{ form_rest(form) }} {{ form_rest(form) }}
{{ form_end(form) }} {{ form_end(form) }}
<hr class="my-8"> <div class="mt-8">
<twig:calendar :accommodation="accommodation"/> <twig:calendar :accommodation="accommodation"/>
</div>
<hr class="my-8"> <hr class="my-8">
<section id="prices"> <section id="prices">
<h2 class="text-xl font-bold"> <h2 class="section-title pb-3">
Preise Preise
</h2> </h2>
<div class="data-table-wrapper mb-4"> <div class="data-table-wrapper mb-4">
@@ -160,7 +160,7 @@
</div> </div>
</div> </div>
<div class="flex justify-end"> <div class="flex justify-end">
<a href="{{ path('app_admin_accommodationprice_create', { 'id': accommodation.id }) }}" class="button button--primary button--small"> <a href="{{ path('app_admin_accommodationprice_create', { 'id': accommodation.id }) }}" class="btn-tool">
neu neu
</a> </a>
</div> </div>
@@ -169,7 +169,7 @@
<hr class="my-8"> <hr class="my-8">
<section id="board-services"> <section id="board-services">
<h2 class="text-xl font-bold"> <h2 class="section-title pb-3">
Verpflegungsleistungen Verpflegungsleistungen
</h2> </h2>
<div class="data-table-wrapper mb-4"> <div class="data-table-wrapper mb-4">
@@ -227,7 +227,7 @@
</div> </div>
</div> </div>
<div class="flex justify-end"> <div class="flex justify-end">
<a href="{{ path('app_admin_boardservice_create', { 'id': accommodation.id }) }}" class="button button--primary button--small"> <a href="{{ path('app_admin_boardservice_create', { 'id': accommodation.id }) }}" class="btn-tool">
neu neu
</a> </a>
</div> </div>
@@ -238,10 +238,10 @@
<section id="additional-services" {{ stimulus_controller('sortable', { <section id="additional-services" {{ stimulus_controller('sortable', {
url: path('app_admin_accommodation_additionalservices_order', { id: accommodation.id }) url: path('app_admin_accommodation_additionalservices_order', { id: accommodation.id })
}) }}> }) }}>
<h2 class="text-xl font-bold"> <h2 class="section-title pb-3">
Optionale Zusatzleistungen Optionale Zusatzleistungen
</h2> </h2>
<p class="text-sm text-gray-500 mb-2"> <p class="text-sm text-muted mb-2">
Die Reihenfolge wird per Drag &amp; Drop festgelegt und gilt auch für das Buchungsformular. Die Reihenfolge wird per Drag &amp; Drop festgelegt und gilt auch für das Buchungsformular.
</p> </p>
<div class="data-table-wrapper mb-4"> <div class="data-table-wrapper mb-4">
@@ -268,7 +268,7 @@
<tbody {{ stimulus_target('sortable', 'list') }}> <tbody {{ stimulus_target('sortable', 'list') }}>
{% for service in additionalServices %} {% for service in additionalServices %}
<tr {{ stimulus_target('sortable', 'item') }} data-sortable-id="{{ service.id }}"> <tr {{ stimulus_target('sortable', 'item') }} data-sortable-id="{{ service.id }}">
<td class="cursor-grab text-gray-400" {{ stimulus_target('sortable', 'handle') }}> <td class="cursor-grab text-muted" {{ stimulus_target('sortable', 'handle') }}>
{{ icon('draggable', 'w-4 h-4') }} {{ icon('draggable', 'w-4 h-4') }}
</td> </td>
<td> <td>
@@ -309,8 +309,8 @@
</div> </div>
</div> </div>
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<span class="text-sm text-gray-500" {{ stimulus_target('sortable', 'status') }}></span> <span class="text-sm text-muted" {{ stimulus_target('sortable', 'status') }}></span>
<a href="{{ path('app_admin_additionalservice_create', { 'id': accommodation.id }) }}" class="button button--primary button--small"> <a href="{{ path('app_admin_additionalservice_create', { 'id': accommodation.id }) }}" class="btn-tool">
neu neu
</a> </a>
</div> </div>
@@ -70,7 +70,7 @@
hx-get="{{ path('app_admin_accommodation_create') }}" hx-get="{{ path('app_admin_accommodation_create') }}"
hx-target="body" hx-target="body"
hx-swap="beforeend" hx-swap="beforeend"
class="button button--primary button--small"> class="btn-primary">
neu neu
</button> </button>
</div> </div>
@@ -15,7 +15,7 @@
{{ form_row(form.maxAdolescentAge) }} {{ form_row(form.maxAdolescentAge) }}
</div> </div>
<div class="flex justify-end pt-8"> <div class="flex justify-end pt-8">
<button type="submit" class="button button--primary button--small"> <button type="submit" class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -3,7 +3,7 @@
{% if app.request.query.get('r') %} {% if app.request.query.get('r') %}
{% set period_params = period_params | merge({ r: app.request.query.get('r') }) %} {% set period_params = period_params | merge({ r: app.request.query.get('r') }) %}
{% endif %} {% endif %}
<tr class="border-t border-gray-200 align-top"> <tr class="border-t border-line align-top">
<td class="py-1 whitespace-nowrap">{{ period.dateFrom | date('d.m.Y') }} – {{ period.dateTo | date('d.m.Y') }}</td> <td class="py-1 whitespace-nowrap">{{ period.dateFrom | date('d.m.Y') }} – {{ period.dateTo | date('d.m.Y') }}</td>
<td class="py-1 whitespace-nowrap">{{ period.nights }} {{ period.nights != 1 ? 'Nächte' : 'Nacht' }}</td> <td class="py-1 whitespace-nowrap">{{ period.nights }} {{ period.nights != 1 ? 'Nächte' : 'Nacht' }}</td>
<td class="py-1"> <td class="py-1">
@@ -13,7 +13,7 @@
{% for line in period.lines %} {% for line in period.lines %}
<div>{{ line.label }}</div> <div>{{ line.label }}</div>
{% else %} {% else %}
<div class="text-gray-500">keine Positionen</div> <div class="text-muted">keine Positionen</div>
{% endfor %} {% endfor %}
</td> </td>
<td class="py-1 text-right whitespace-nowrap"> <td class="py-1 text-right whitespace-nowrap">
@@ -4,7 +4,7 @@
{% include 'admin/accommodation_booking/_price_period.html.twig' %} {% include 'admin/accommodation_booking/_price_period.html.twig' %}
{% endfor %} {% endfor %}
{% if priceBreakdown.periods is not empty %} {% if priceBreakdown.periods is not empty %}
<tr class="border-t border-gray-200 font-medium"> <tr class="border-t border-line font-medium">
<td class="pt-2 pb-1" colspan="2"> <td class="pt-2 pb-1" colspan="2">
Gruppe · {{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }}, Gruppe · {{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }},
{{ priceBreakdown.nights }} {{ priceBreakdown.nights != 1 ? 'Nächte' : 'Nacht' }} {{ priceBreakdown.nights }} {{ priceBreakdown.nights != 1 ? 'Nächte' : 'Nacht' }}
@@ -15,7 +15,7 @@
<tr> <tr>
<td class="py-1"> <td class="py-1">
Basispreis Basispreis
<span class="text-xs text-gray-500">für {{ priceBreakdown.includedPax }} Pers.</span> <span class="text-xs text-muted">für {{ priceBreakdown.includedPax }} Pers.</span>
</td> </td>
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.basePrice / 100) | format_currency(currency) }}</td> <td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.basePrice / 100) | format_currency(currency) }}</td>
</tr> </tr>
@@ -24,7 +24,7 @@
<tr> <tr>
<td class="py-1"> <td class="py-1">
Aufpreis Personenzahl Aufpreis Personenzahl
<span class="text-xs text-gray-500">für {{ priceBreakdown.effectivePax - priceBreakdown.includedPax }} Pers.</span> <span class="text-xs text-muted">für {{ priceBreakdown.effectivePax - priceBreakdown.includedPax }} Pers.</span>
</td> </td>
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.additionalPersonsPrice / 100) | format_currency(currency) }}</td> <td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.additionalPersonsPrice / 100) | format_currency(currency) }}</td>
</tr> </tr>
@@ -64,10 +64,10 @@
{% for period in priceBreakdown.periods | filter(p => p.position == 'trailing') %} {% for period in priceBreakdown.periods | filter(p => p.position == 'trailing') %}
{% include 'admin/accommodation_booking/_price_period.html.twig' %} {% include 'admin/accommodation_booking/_price_period.html.twig' %}
{% endfor %} {% endfor %}
<tr class="border-t border-gray-200 font-semibold"> <tr class="border-t border-line font-semibold">
<td class="pt-2"> <td class="pt-2">
Gesamtpreis Gesamtpreis
<span class="block text-xs font-normal text-gray-500">zzgl. ortsabhängiger Gebühren</span> <span class="block text-xs font-normal text-muted">zzgl. ortsabhängiger Gebühren</span>
</td> </td>
<td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.total / 100) | format_currency(currency) }}</td> <td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.total / 100) | format_currency(currency) }}</td>
</tr> </tr>
@@ -78,7 +78,7 @@
</tr> </tr>
{% endfor %} {% endfor %}
{% if priceBreakdown.discountSubtotal is not null %} {% if priceBreakdown.discountSubtotal is not null %}
<tr class="border-t border-gray-200"> <tr class="border-t border-line">
<td class="pt-2">Zwischensumme</td> <td class="pt-2">Zwischensumme</td>
<td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.discountSubtotal / 100) | format_currency(currency) }}</td> <td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.discountSubtotal / 100) | format_currency(currency) }}</td>
</tr> </tr>
@@ -90,7 +90,7 @@
</tr> </tr>
{% endif %} {% endif %}
{% if priceBreakdown.discounts is not empty or priceBreakdown.totalDiscountDetails is not null %} {% if priceBreakdown.discounts is not empty or priceBreakdown.totalDiscountDetails is not null %}
<tr class="border-t border-gray-200 font-bold text-green-700"> <tr class="border-t border-line font-bold text-green-700">
<td class="pt-2">Gesamtpreis nach Rabatt</td> <td class="pt-2">Gesamtpreis nach Rabatt</td>
<td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}</td> <td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}</td>
</tr> </tr>
@@ -1,5 +1,5 @@
{#- One split-off period of the admin price table. Context: period, currency. -#} {#- One split-off period of the admin price table. Context: period, currency. -#}
<tr class="border-t border-gray-200 font-medium"> <tr class="border-t border-line font-medium">
<td class="pt-2 pb-1" colspan="2"> <td class="pt-2 pb-1" colspan="2">
{% if period.label ?? null %}{{ period.label }} · {% endif %} {% if period.label ?? null %}{{ period.label }} · {% endif %}
{{ period.dateFrom | date('d.m.Y') }} – {{ period.dateTo | date('d.m.Y') }}, {{ period.dateFrom | date('d.m.Y') }} – {{ period.dateTo | date('d.m.Y') }},
@@ -7,7 +7,7 @@
{% endif %} {% endif %}
<twig:page:heading>{{ booking.recordLabel }} {{ booking.groupName }}</twig:page:heading> <twig:page:heading>{{ booking.recordLabel }} {{ booking.groupName }}</twig:page:heading>
<p class="flex items-center gap-3 text-sm text-gray-500 mb-6"> <p class="flex items-center gap-3 text-sm text-muted mb-6">
{{ booking.accommodation.name }} {{ booking.accommodation.name }}
{# Only an Entwurf may still move house — see ChangeAccommodationController. #} {# Only an Entwurf may still move house — see ChangeAccommodationController. #}
{% if booking.draft %} {% if booking.draft %}
@@ -15,7 +15,7 @@
hx-get="{{ path('app_admin_accommodationbooking_change_accommodation', back_params) }}" hx-get="{{ path('app_admin_accommodationbooking_change_accommodation', back_params) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend" hx-swap="beforeend"
class="button button--secondary button--small">ändern</button> class="btn-tool">ändern</button>
{% endif %} {% endif %}
</p> </p>
@@ -39,9 +39,9 @@
</div> </div>
{# Saved by their own modals, which reprice the booking on the spot — see SplitPeriodController. #} {# Saved by their own modals, which reprice the booking on the spot — see SplitPeriodController. #}
<div class="mt-6 border-t border-gray-200 pt-4"> <div class="mt-6 border-t border-line pt-4">
<div class="font-bold pb-1">Zeiträume</div> <div class="font-bold pb-1">Zeiträume</div>
<p class="text-xs text-gray-500 pb-2"> <p class="text-xs text-muted pb-2">
Anreise und Abreise umfassen den ganzen Aufenthalt. Abgeteilte Zeiträume, etwa für ein Anreise und Abreise umfassen den ganzen Aufenthalt. Abgeteilte Zeiträume, etwa für ein
Vorausteam, werden mit eigenen Positionen berechnet; Personen und Leistungen gelten Vorausteam, werden mit eigenen Positionen berechnet; Personen und Leistungen gelten
nur für den Zeitraum der Gruppe. nur für den Zeitraum der Gruppe.
@@ -50,7 +50,7 @@
{% if booking.leadingPeriod %} {% if booking.leadingPeriod %}
{% include 'admin/accommodation_booking/_period_row.html.twig' with { period: booking.leadingPeriod } %} {% include 'admin/accommodation_booking/_period_row.html.twig' with { period: booking.leadingPeriod } %}
{% endif %} {% endif %}
<tr class="border-t border-gray-200"> <tr class="border-t border-line">
<td class="py-1 whitespace-nowrap">{{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }}</td> <td class="py-1 whitespace-nowrap">{{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }}</td>
<td class="py-1 whitespace-nowrap">{{ booking.mainNights }} {{ booking.mainNights != 1 ? 'Nächte' : 'Nacht' }}</td> <td class="py-1 whitespace-nowrap">{{ booking.mainNights }} {{ booking.mainNights != 1 ? 'Nächte' : 'Nacht' }}</td>
<td class="py-1" colspan="2">Gruppe</td> <td class="py-1" colspan="2">Gruppe</td>
@@ -94,7 +94,7 @@
{% for child in form.selectedAdditionalServices %} {% for child in form.selectedAdditionalServices %}
<div class="relative flex items-start py-1"> <div class="relative flex items-start py-1">
<div class="min-w-0 flex-1 text-sm leading-4"> <div class="min-w-0 flex-1 text-sm leading-4">
<label for="{{ child.vars.id }}" class="select-none font-medium text-gray-900"> <label for="{{ child.vars.id }}" class="select-none font-medium text-ink">
{{ child.vars.label }} {{ child.vars.label }}
</label> </label>
</div> </div>
@@ -149,16 +149,16 @@
{# Read-only: the status only ever moves through a named action on the detail page, {# Read-only: the status only ever moves through a named action on the detail page,
so that it cannot be set without the email and timestamp that belong to it. #} so that it cannot be set without the email and timestamp that belong to it. #}
<dl class="grid grid-cols-2 gap-y-1 text-sm"> <dl class="grid grid-cols-2 gap-y-1 text-sm">
<dt class="text-gray-500">Status</dt> <dt class="text-muted">Status</dt>
<dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd> <dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd>
<dt class="text-gray-500">Herkunft</dt> <dt class="text-muted">Herkunft</dt>
<dd>{{ booking.origin.label }}</dd> <dd>{{ booking.origin.label }}</dd>
{% if booking.acceptedAt is not null %} {% if booking.acceptedAt is not null %}
<dt class="text-gray-500">Angenommen</dt> <dt class="text-muted">Angenommen</dt>
<dd>{{ booking.acceptedAt | date('d.m.Y, H:i') }}</dd> <dd>{{ booking.acceptedAt | date('d.m.Y, H:i') }}</dd>
{% endif %} {% endif %}
{% if booking.confirmedAt is not null %} {% if booking.confirmedAt is not null %}
<dt class="text-gray-500">Bestätigt</dt> <dt class="text-muted">Bestätigt</dt>
<dd>{{ booking.confirmedAt | date('d.m.Y, H:i') }}</dd> <dd>{{ booking.confirmedAt | date('d.m.Y, H:i') }}</dd>
{% endif %} {% endif %}
</dl> </dl>
@@ -173,17 +173,17 @@
{% set currency = booking.pricingCurrency ?? priceBreakdown.currency %} {% set currency = booking.pricingCurrency ?? priceBreakdown.currency %}
<twig:form:section title="Preis"> <twig:form:section title="Preis">
{% include 'admin/accommodation_booking/_price_breakdown.html.twig' %} {% include 'admin/accommodation_booking/_price_breakdown.html.twig' %}
<p class="text-xs text-gray-500 pt-2"> <p class="text-xs text-muted pt-2">
Stand der letzten Speicherung. Änderungen oben werden erst beim Speichern neu berechnet. Stand der letzten Speicherung. Änderungen oben werden erst beim Speichern neu berechnet.
</p> </p>
</twig:form:section> </twig:form:section>
{% endif %} {% endif %}
<div class="flex flex-col gap-3"> <div class="flex flex-col gap-3">
<button type="submit" class="button button--primary button--small w-full"> <button type="submit" class="btn-primary w-full">
speichern speichern
</button> </button>
<a href="{{ path('app_admin_accommodationbooking_show', back_params) }}" class="text-sm text-gray-500 hover:text-gray-900 hover:underline"> <a href="{{ path('app_admin_accommodationbooking_show', back_params) }}" class="text-sm text-muted hover:text-ink hover:underline">
← zurück ohne speichern ← zurück ohne speichern
</a> </a>
</div> </div>
@@ -132,7 +132,7 @@
hx-get="{{ path('app_admin_accommodationbooking_create') }}" hx-get="{{ path('app_admin_accommodationbooking_create') }}"
hx-target="body" hx-target="body"
hx-swap="beforeend" hx-swap="beforeend"
class="button button--primary button--small"> class="btn-primary">
neu neu
</button> </button>
</div> </div>
@@ -5,13 +5,13 @@
<div class="text-xl font-bold pb-4"> <div class="text-xl font-bold pb-4">
Gruppenhaus ändern Gruppenhaus ändern
</div> </div>
<p class="text-sm text-gray-500 pb-4"> <p class="text-sm text-muted pb-4">
Achtung: Die gewählte Verpflegung und alle Zusatzleistungen müssen anschließend neu ausgewählt werden. Achtung: Die gewählte Verpflegung und alle Zusatzleistungen müssen anschließend neu ausgewählt werden.
</p> </p>
{{ form_start(form) }} {{ form_start(form) }}
{{ form_row(form.accommodation) }} {{ form_row(form.accommodation) }}
<div class="flex justify-end pt-8"> <div class="flex justify-end pt-8">
<button type="submit" class="button button--primary button--small"> <button type="submit" class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -20,7 +20,7 @@
</div> </div>
</div> </div>
<div class="flex justify-end pt-8"> <div class="flex justify-end pt-8">
<button type="submit" class="button button--primary button--small"> <button type="submit" class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -15,7 +15,7 @@
{{ form_errors(line.amount) }} {{ form_errors(line.amount) }}
</div> </div>
<button type="button" <button type="button"
class="shrink-0 mt-2 text-gray-400 hover:text-red-500" class="shrink-0 mt-2 text-muted hover:text-red-500"
data-action="form-collection#removeItem" data-action="form-collection#removeItem"
title="Position entfernen"> title="Position entfernen">
{{ icon('close', 'w-5 h-5') }} {{ icon('close', 'w-5 h-5') }}
@@ -28,7 +28,7 @@
<div class="text-xl font-bold pb-1"> <div class="text-xl font-bold pb-1">
{{ title }} {{ title }}
</div> </div>
<p class="text-sm text-gray-500 pb-6"> <p class="text-sm text-muted pb-6">
Die Nächte werden vom Zeitraum der Gruppe abgezogen, der neu berechnet wird. Die Positionen Die Nächte werden vom Zeitraum der Gruppe abgezogen, der neu berechnet wird. Die Positionen
kommen zum Gesamtpreis hinzu und fallen nur unter den Rabatt auf den Gesamtpreis. kommen zum Gesamtpreis hinzu und fallen nur unter den Rabatt auf den Gesamtpreis.
</p> </p>
@@ -40,8 +40,8 @@
</div> </div>
{% set prototype %}{{ period.line_row(form.lines.vars.prototype) }}{% endset %} {% set prototype %}{{ period.line_row(form.lines.vars.prototype) }}{% endset %}
<div class="mt-6 border border-gray-200 rounded-md" {{ stimulus_controller('form-collection', { prototype: prototype|json_encode }) }}> <div class="mt-6 border border-line rounded-md" {{ stimulus_controller('form-collection', { prototype: prototype|json_encode }) }}>
<div class="flex gap-2 px-4 py-2 bg-gray-100 border-b border-gray-200 rounded-t-md text-sm font-bold"> <div class="flex gap-2 px-4 py-2 bg-page border-b border-line rounded-t-md text-sm font-bold">
<div class="flex-1">Position</div> <div class="flex-1">Position</div>
{# w-5 matches the remove button's icon, so the heading sits over the amounts. #} {# w-5 matches the remove button's icon, so the heading sits over the amounts. #}
<div class="w-32 shrink-0">Betrag</div> <div class="w-32 shrink-0">Betrag</div>
@@ -55,7 +55,7 @@
{% endfor %} {% endfor %}
</div> </div>
<button type="button" <button type="button"
class="mt-3 text-sm font-medium text-primary hover:underline" class="mt-3 text-sm font-medium text-brand hover:underline"
data-action="form-collection#addItem"> data-action="form-collection#addItem">
+ Position hinzufügen + Position hinzufügen
</button> </button>
@@ -64,7 +64,7 @@
{% do form.lines.setRendered %} {% do form.lines.setRendered %}
<div class="flex justify-end pt-6"> <div class="flex justify-end pt-6">
<button type="submit" class="button button--primary button--small"> <button type="submit" class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -10,7 +10,7 @@
{{ booking.recordLabel }} · {% include 'admin/accommodation_booking/_status_label.html.twig' %} {{ booking.recordLabel }} · {% include 'admin/accommodation_booking/_status_label.html.twig' %}
{{ booking.groupName }} {{ booking.groupName }}
</twig:page:heading> </twig:page:heading>
<p class="text-sm text-gray-500 mb-6">{{ booking.accommodation.name }}</p> <p class="text-sm text-muted mb-6">{{ booking.accommodation.name }}</p>
{# Same arrangement as the edit form: what was booked in the main column, status, the next {# Same arrangement as the edit form: what was booked in the main column, status, the next
step and the actions in a sidebar that stays in view on wide screens. #} step and the actions in a sidebar that stays in view on wide screens. #}
@@ -102,50 +102,50 @@
<aside class="space-y-6 xl:sticky xl:top-8"> <aside class="space-y-6 xl:sticky xl:top-8">
<twig:form:section title="Status"> <twig:form:section title="Status">
<dl class="grid grid-cols-2 gap-y-1 text-sm"> <dl class="grid grid-cols-2 gap-y-1 text-sm">
<dt class="text-gray-500">Status</dt> <dt class="text-muted">Status</dt>
<dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd> <dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd>
<dt class="text-gray-500">Herkunft</dt> <dt class="text-muted">Herkunft</dt>
<dd>{{ booking.origin.label }}</dd> <dd>{{ booking.origin.label }}</dd>
{% if booking.managedBy is not null %} {% if booking.managedBy is not null %}
<dt class="text-gray-500">Bearbeiter:in</dt> <dt class="text-muted">Bearbeiter:in</dt>
<dd>{{ booking.managedBy.displayName }}</dd> <dd>{{ booking.managedBy.displayName }}</dd>
{% endif %} {% endif %}
{% if booking.acceptedAt is not null %} {% if booking.acceptedAt is not null %}
<dt class="text-gray-500">Angenommen</dt> <dt class="text-muted">Angenommen</dt>
<dd>{{ booking.acceptedAt | date('d.m.Y, H:i') }}</dd> <dd>{{ booking.acceptedAt | date('d.m.Y, H:i') }}</dd>
{% endif %} {% endif %}
{% if booking.confirmedAt is not null %} {% if booking.confirmedAt is not null %}
<dt class="text-gray-500">Bestätigt</dt> <dt class="text-muted">Bestätigt</dt>
<dd>{{ booking.confirmedAt | date('d.m.Y, H:i') }}</dd> <dd>{{ booking.confirmedAt | date('d.m.Y, H:i') }}</dd>
{% endif %} {% endif %}
<dt class="text-gray-500">Eingegangen</dt> <dt class="text-muted">Eingegangen</dt>
<dd>{{ booking.createdAt | date('d.m.Y, H:i') }}</dd> <dd>{{ booking.createdAt | date('d.m.Y, H:i') }}</dd>
{% if booking.updatedAt is not null and booking.updatedAt != booking.createdAt %} {% if booking.updatedAt is not null and booking.updatedAt != booking.createdAt %}
<dt class="text-gray-500">Aktualisiert</dt> <dt class="text-muted">Aktualisiert</dt>
<dd>{{ booking.updatedAt | date('d.m.Y, H:i') }}</dd> <dd>{{ booking.updatedAt | date('d.m.Y, H:i') }}</dd>
{% endif %} {% endif %}
</dl> </dl>
</twig:form:section> </twig:form:section>
{# One pink button per page, for the next step; everything else is grey, and the one {# One magenta button per page, for the next step; everything else is secondary, and the one
destructive action is set apart below the others. #} destructive action is set apart below the others. #}
{% set has_next_step = booking.draft or booking.requested or booking.received %} {% set has_next_step = booking.draft or booking.requested or booking.received %}
{% if booking.draft or booking.requested %} {% if booking.draft or booking.requested %}
<twig:form:section title="Nächster Schritt: Angebot"> <twig:form:section title="Nächster Schritt: Angebot">
<p class="text-sm text-gray-500 mb-3"> <p class="text-sm text-muted mb-3">
Das Angebot wurde dem Kunden noch nicht zugestellt. Beim Versand wird der Zugangslink Das Angebot wurde dem Kunden noch nicht zugestellt. Beim Versand wird der Zugangslink
erzeugt und die Buchung wartet anschließend auf die Annahme durch den Kunden. erzeugt und die Buchung wartet anschließend auf die Annahme durch den Kunden.
</p> </p>
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<button type="button" <button type="button"
class="button button--primary button--small w-full" class="btn-primary w-full"
hx-get="{{ path('app_admin_accommodationbooking_send_offer', { id: booking.id }) }}" hx-get="{{ path('app_admin_accommodationbooking_send_offer', { id: booking.id }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
Angebot per E-Mail senden Angebot per E-Mail senden
</button> </button>
<button type="button" <button type="button"
class="button button--neutral button--small w-full" class="btn-secondary w-full"
hx-get="{{ path('app_admin_accommodationbooking_generate_access_link', { id: booking.id }) }}" hx-get="{{ path('app_admin_accommodationbooking_generate_access_link', { id: booking.id }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -155,11 +155,11 @@
</twig:form:section> </twig:form:section>
{% elseif booking.received %} {% elseif booking.received %}
<twig:form:section title="Nächster Schritt: Bestätigung"> <twig:form:section title="Nächster Schritt: Bestätigung">
<p class="text-sm text-gray-500 mb-3"> <p class="text-sm text-muted mb-3">
Die Buchung des Kunden ist eingegangen, aber es wurde noch keine Bestätigung verschickt. Die Buchung des Kunden ist eingegangen, aber es wurde noch keine Bestätigung verschickt.
</p> </p>
<button type="button" <button type="button"
class="button button--primary button--small w-full" class="btn-primary w-full"
hx-get="{{ path('app_admin_accommodationbooking_confirm', { id: booking.id }) }}" hx-get="{{ path('app_admin_accommodationbooking_confirm', { id: booking.id }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -170,13 +170,13 @@
<twig:form:section title="Zugangslink"> <twig:form:section title="Zugangslink">
{% if not booking.customerAccessible %} {% if not booking.customerAccessible %}
<p class="text-sm text-gray-500"> <p class="text-sm text-muted">
Ein Zugangslink wird beim Versand des Angebots erzeugt. Ein Zugangslink wird beim Versand des Angebots erzeugt.
</p> </p>
{% elseif accessLink %} {% elseif accessLink %}
<div class="grid grid-cols-2 gap-2"> <div class="grid grid-cols-2 gap-2">
<button type="button" <button type="button"
class="button button--neutral button--small sm:text-xs w-full" class="btn-secondary w-full"
data-controller="clipboard" data-controller="clipboard"
data-clipboard-content-value="{{ accessLink }}" data-clipboard-content-value="{{ accessLink }}"
data-clipboard-label-value="Kopiert!" data-clipboard-label-value="Kopiert!"
@@ -184,21 +184,21 @@
{{ icon('copy', 'w-4 h-4') }} Link kopieren {{ icon('copy', 'w-4 h-4') }} Link kopieren
</button> </button>
<button type="button" <button type="button"
class="button button--neutral button--small sm:text-xs w-full" class="btn-secondary w-full"
hx-get="{{ path('app_admin_accommodationbooking_send_access_link', { id: booking.id }) }}" hx-get="{{ path('app_admin_accommodationbooking_send_access_link', { id: booking.id }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
Link senden Link senden
</button> </button>
</div> </div>
<p class="text-xs text-gray-500 mt-2"> <p class="text-xs text-muted mt-2">
Gültig bis {{ accessLinkExpiresAt | date('d.m.Y') }} Gültig bis {{ accessLinkExpiresAt | date('d.m.Y') }}
{% if accessLinkExpiresAt < date() %} {% if accessLinkExpiresAt < date() %}
<span class="text-red-600 font-medium">(abgelaufen)</span> <span class="text-red-600 font-medium">(abgelaufen)</span>
{% endif %} {% endif %}
</p> </p>
{% else %} {% else %}
<p class="text-sm text-gray-500"> <p class="text-sm text-muted">
Der Zugangslink wird beim Versand des Angebots erzeugt. Der Zugangslink wird beim Versand des Angebots erzeugt.
</p> </p>
{% endif %} {% endif %}
@@ -207,23 +207,23 @@
<twig:form:section title="Aktionen"> <twig:form:section title="Aktionen">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<a href="{{ path('app_admin_accommodationbooking_edit', edit_params) }}" <a href="{{ path('app_admin_accommodationbooking_edit', edit_params) }}"
class="button {{ has_next_step ? 'button--neutral' : 'button--primary' }} button--small w-full"> class="{{ has_next_step ? 'btn-secondary' : 'btn-primary' }} w-full">
bearbeiten bearbeiten
</a> </a>
<button type="button" <button type="button"
class="button button--neutral button--small w-full" class="btn-secondary w-full"
hx-get="{{ path('app_admin_accommodationbooking_duplicate', edit_params) }}" hx-get="{{ path('app_admin_accommodationbooking_duplicate', edit_params) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
duplizieren duplizieren
</button> </button>
<a href="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}" <a href="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}"
class="button button--neutral button--small w-full"> class="btn-secondary w-full">
PDF herunterladen PDF herunterladen
</a> </a>
</div> </div>
{% if not booking.confirmed and not booking.discarded %} {% if not booking.confirmed and not booking.discarded %}
<div class="mt-4 pt-3 border-t border-gray-200 text-center"> <div class="mt-4 pt-3 border-t border-line text-center">
<button type="button" <button type="button"
class="text-sm font-medium text-red-600 hover:underline" class="text-sm font-medium text-red-600 hover:underline"
hx-get="{{ path('app_admin_accommodationbooking_discard', { id: booking.id }) }}" hx-get="{{ path('app_admin_accommodationbooking_discard', { id: booking.id }) }}"
@@ -235,7 +235,7 @@
{% endif %} {% endif %}
</twig:form:section> </twig:form:section>
<a href="{{ returnUrl }}" class="inline-block text-sm text-gray-500 hover:text-gray-900 hover:underline"> <a href="{{ returnUrl }}" class="inline-block text-sm text-muted hover:text-ink hover:underline">
← zurück ← zurück
</a> </a>
</aside> </aside>
@@ -17,11 +17,11 @@
</div> </div>
<div class="flex justify-between pt-8"> <div class="flex justify-between pt-8">
<a href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id }) }}#prices" <a href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id }) }}#prices"
class="button button--secondary button--small"> class="btn-secondary">
zurück zurück
</a> </a>
<button type="submit" <button type="submit"
class="button button--primary button--small"> class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -18,11 +18,11 @@
</div> </div>
<div class="flex justify-between pt-8"> <div class="flex justify-between pt-8">
<a href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id }) }}#additional-services" <a href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id }) }}#additional-services"
class="button button--secondary button--small"> class="btn-secondary">
zurück zurück
</a> </a>
<button type="submit" <button type="submit"
class="button button--primary button--small"> class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -12,11 +12,11 @@
</div> </div>
<div class="flex justify-between pt-8"> <div class="flex justify-between pt-8">
<a href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id }) }}#board-services" <a href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id }) }}#board-services"
class="button button--secondary button--small"> class="btn-secondary">
zurück zurück
</a> </a>
<button type="submit" <button type="submit"
class="button button--primary button--small"> class="btn-primary">
speichern speichern
</button> </button>
</div> </div>
@@ -2,12 +2,12 @@
{% block content %} {% block content %}
<twig:page:heading>Buchungsentwurf</twig:page:heading> <twig:page:heading>Buchungsentwurf</twig:page:heading>
<h2 class="text-xl font-bold pb-4"> <h2 class="text-xl font-bold text-brand pb-4">
Vorgang {{ draft.bookingNumber }} Vorgang {{ draft.bookingNumber }}
</h2> </h2>
{% include('_partials/_json.html.twig') with { 'value': draft.formData } %} {% include('_partials/_json.html.twig') with { 'value': draft.formData } %}
<div class="flex justify-end pt-8"> <div class="flex justify-end pt-8">
<a href="{{ returnUrl }}" class="button button--secondary button--small"> <a href="{{ returnUrl }}" class="btn-secondary">
zurück zurück
</a> </a>
</div> </div>
+1 -1
View File
@@ -10,7 +10,7 @@
<twig:dashboard:widget title="{{ widget.title }}" emptyText="{{ widget.emptyText }}"> <twig:dashboard:widget title="{{ widget.title }}" emptyText="{{ widget.emptyText }}">
<twig:block name="actions"> <twig:block name="actions">
{% if widget.actionUrl %} {% if widget.actionUrl %}
<a href="{{ widget.actionUrl }}" class="text-sm font-normal text-primary">{{ widget.actionLabel }}</a> <a href="{{ widget.actionUrl }}" class="text-sm font-normal text-brand">{{ widget.actionLabel }}</a>
{% endif %} {% endif %}
</twig:block> </twig:block>
{% for entry in widget.entries %} {% for entry in widget.entries %}
+12 -13
View File
@@ -12,8 +12,9 @@
<div> <div>
{{ form_row(form.busOnly) }} {{ form_row(form.busOnly) }}
</div> </div>
{# the main action until there is a result; then creating the list is #}
<button type="submit" <button type="submit"
class="button button--primary button--small"> class="{{ result is null ? 'btn-primary' : 'btn-secondary' }}">
abrufen abrufen
</button> </button>
</div> </div>
@@ -21,22 +22,20 @@
{{ form_end(form) }} {{ form_end(form) }}
{% if failed %} {% if failed %}
{% include '_partials/_alert.html.twig' with { {% include 'admin/_partials/_alert.html.twig' with {
level: 'warning', type: 'error',
messages: ['Die Teilnehmerliste konnte nicht von BusPro abgerufen werden. Bitte später erneut versuchen.'], message: 'Die Teilnehmerliste konnte nicht von BusPro abgerufen werden. Bitte später erneut versuchen.',
} %} } %}
{% elseif result is not null %} {% elseif result is not null %}
{% if result.data is empty %} {% if result.data is empty %}
{% include '_partials/_alert.html.twig' with { {% set message %}Keine Empfänger für <code>{{ result.travelCode }}</code> gefunden: Reisecode unbekannt oder keine bestätigten Teilnehmer{{ result.busLeg ? ' unter den ' ~ result.busLeg.label }}.{% endset %}
level: 'warning', {% include 'admin/_partials/_alert.html.twig' with {type: 'warning', message: message} %}
messages: ['Keine Empfänger für <code>%s</code> gefunden: Reisecode unbekannt oder keine bestätigten Teilnehmer%s.'|format(result.travelCode|e, result.busLeg ? ' unter den ' ~ result.busLeg.label : '')],
} %}
{% else %} {% else %}
<div class="pb-4"> <div class="pb-4">
<h2 class="text-lg font-semibold"> <h2 class="text-lg font-bold text-brand">
{{ travel_label|default('Reise nicht im lokalen Reisebestand') }} {{ travel_label|default('Reise nicht im lokalen Reisebestand') }}
</h2> </h2>
<p class="text-sm text-gray-700"> <p class="text-sm text-ink">
{{ result.data|length }} Empfänger für <code>{{ result.travelCode }}</code>{% if result.busLeg %}, nur {{ result.busLeg.label }}{% endif %} {{ result.data|length }} Empfänger für <code>{{ result.travelCode }}</code>{% if result.busLeg %}, nur {{ result.busLeg.label }}{% endif %}
</p> </p>
</div> </div>
@@ -52,7 +51,7 @@
{% if mailing_list is not null %} {% if mailing_list is not null %}
{# the list for this filter exists and is listed above #} {# the list for this filter exists and is listed above #}
{% elseif travel_starts_at is null %} {% elseif travel_starts_at is null %}
<p class="text-gray-700"> <p class="text-ink">
Kein Reisebeginn bekannt, daher kann keine Mailjet-Liste angelegt werden. Kein Reisebeginn bekannt, daher kann keine Mailjet-Liste angelegt werden.
</p> </p>
{% else %} {% else %}
@@ -62,10 +61,10 @@
<input type="hidden" name="busOnly" value="1"> <input type="hidden" name="busOnly" value="1">
{% endif %} {% endif %}
<input type="hidden" name="_token" value="{{ csrf_token(constant('App\\Controller\\Admin\\TravelMailing\\CreateListController::CSRF_TOKEN_ID')) }}"> <input type="hidden" name="_token" value="{{ csrf_token(constant('App\\Controller\\Admin\\TravelMailing\\CreateListController::CSRF_TOKEN_ID')) }}">
<button type="submit" class="button button--primary button--small"> <button type="submit" class="btn-primary">
Mailjet-Liste {{ list_name }} anlegen Mailjet-Liste {{ list_name }} anlegen
</button> </button>
<span class="pl-2 text-gray-700"> <span class="pl-2 text-ink">
Alle Empfänger werden ohne Opt-in eingetragen; die Liste wird 30 Tage nach Reisebeginn Alle Empfänger werden ohne Opt-in eingetragen; die Liste wird 30 Tage nach Reisebeginn
({{ travel_starts_at|date('d.m.Y') }}) gelöscht. ({{ travel_starts_at|date('d.m.Y') }}) gelöscht.
</span> </span>
@@ -5,12 +5,12 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="pb-4 text-sm text-gray-500"> <div class="pb-4 text-sm text-muted">
{{ user.email }} {{ user.email }}
</div> </div>
<div class="font-bold pb-2">Aus BusPro</div> <div class="font-bold pb-2">Aus BusPro</div>
<div class="pb-6 text-sm text-gray-500"> <div class="pb-6 text-sm text-muted">
<dl class="grid grid-cols-[8rem_1fr] gap-y-1"> <dl class="grid grid-cols-[8rem_1fr] gap-y-1">
<dt>Rollen</dt> <dt>Rollen</dt>
<dd>{{ user.roles | effective_roles | join(', ') | default('–') }}</dd> <dd>{{ user.roles | effective_roles | join(', ') | default('–') }}</dd>
@@ -26,18 +26,18 @@
<div class="font-bold pb-2">Freischaltung</div> <div class="font-bold pb-2">Freischaltung</div>
{% if approvableRoles is empty and selfRefusedRoles is empty %} {% if approvableRoles is empty and selfRefusedRoles is empty %}
<div class="text-sm text-gray-500"> <div class="text-sm text-muted">
Keine offenen Freischaltungen. Keine offenen Freischaltungen.
</div> </div>
{% else %} {% else %}
<div class="text-sm text-gray-500 pb-4"> <div class="text-sm text-muted pb-4">
BusPro meldet diese Rollen für den Account. Sie sind erst nach der Freischaltung wirksam. BusPro meldet diese Rollen für den Account. Sie sind erst nach der Freischaltung wirksam.
</div> </div>
{% if approvableRoles is not empty %} {% if approvableRoles is not empty %}
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
{% for role, label in approvableRoles %} {% for role, label in approvableRoles %}
<button type="button" <button type="button"
class="button button--primary button--small" class="btn-primary"
hx-get="{{ path('app_admin_user_approve_role', { id: user.id, role: role, r: returnUrl }) }}" hx-get="{{ path('app_admin_user_approve_role', { id: user.id, role: role, r: returnUrl }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -47,7 +47,7 @@
</div> </div>
{% endif %} {% endif %}
{% if selfRefusedRoles is not empty %} {% if selfRefusedRoles is not empty %}
<div class="text-sm text-gray-500 pt-4"> <div class="text-sm text-muted pt-4">
{{ selfRefusedRoles | join(', ') }}: diese Rolle kannst du dir nicht selbst freischalten. {{ selfRefusedRoles | join(', ') }}: diese Rolle kannst du dir nicht selbst freischalten.
Bitte wende dich an eine:n andere:n Administrator:in. Bitte wende dich an eine:n andere:n Administrator:in.
</div> </div>