feat: restyle admin views in corporate design
This commit is contained in:
1 parent
c660bd68de
commit
558e45fe5f
19 files changed
+100
-101
No files matched your search
@@ -3,7 +3,7 @@
|
||||
{% if app.request.query.get('r') %}
|
||||
{% set period_params = period_params | merge({ r: app.request.query.get('r') }) %}
|
||||
{% 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.nights }} {{ period.nights != 1 ? 'Nächte' : 'Nacht' }}</td>
|
||||
<td class="py-1">
|
||||
@@ -13,7 +13,7 @@
|
||||
{% for line in period.lines %}
|
||||
<div>{{ line.label }}</div>
|
||||
{% else %}
|
||||
<div class="text-gray-500">keine Positionen</div>
|
||||
<div class="text-muted">keine Positionen</div>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="py-1 text-right whitespace-nowrap">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% include 'admin/accommodation_booking/_price_period.html.twig' %}
|
||||
{% endfor %}
|
||||
{% 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">
|
||||
Gruppe · {{ booking.mainDateFrom | date('d.m.Y') }} – {{ booking.mainDateTo | date('d.m.Y') }},
|
||||
{{ priceBreakdown.nights }} {{ priceBreakdown.nights != 1 ? 'Nächte' : 'Nacht' }}
|
||||
@@ -15,7 +15,7 @@
|
||||
<tr>
|
||||
<td class="py-1">
|
||||
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 class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.basePrice / 100) | format_currency(currency) }}</td>
|
||||
</tr>
|
||||
@@ -24,7 +24,7 @@
|
||||
<tr>
|
||||
<td class="py-1">
|
||||
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 class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.additionalPersonsPrice / 100) | format_currency(currency) }}</td>
|
||||
</tr>
|
||||
@@ -64,10 +64,10 @@
|
||||
{% for period in priceBreakdown.periods | filter(p => p.position == 'trailing') %}
|
||||
{% include 'admin/accommodation_booking/_price_period.html.twig' %}
|
||||
{% endfor %}
|
||||
<tr class="border-t border-gray-200 font-semibold">
|
||||
<tr class="border-t border-line font-semibold">
|
||||
<td class="pt-2">
|
||||
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 class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.total / 100) | format_currency(currency) }}</td>
|
||||
</tr>
|
||||
@@ -78,7 +78,7 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% 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 text-right whitespace-nowrap">{{ (priceBreakdown.discountSubtotal / 100) | format_currency(currency) }}</td>
|
||||
</tr>
|
||||
@@ -90,7 +90,7 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% 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 text-right whitespace-nowrap">{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{#- 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">
|
||||
{% if period.label ?? null %}{{ period.label }} · {% endif %}
|
||||
{{ period.dateFrom | date('d.m.Y') }} – {{ period.dateTo | date('d.m.Y') }},
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% endif %}
|
||||
|
||||
<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 }}
|
||||
{# Only an Entwurf may still move house — see ChangeAccommodationController. #}
|
||||
{% if booking.draft %}
|
||||
@@ -15,7 +15,7 @@
|
||||
hx-get="{{ path('app_admin_accommodationbooking_change_accommodation', back_params) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend"
|
||||
class="button button--secondary button--small">ändern</button>
|
||||
class="btn-tool">ändern</button>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
</div>
|
||||
|
||||
{# 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>
|
||||
<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
|
||||
Vorausteam, werden mit eigenen Positionen berechnet; Personen und Leistungen gelten
|
||||
nur für den Zeitraum der Gruppe.
|
||||
@@ -50,7 +50,7 @@
|
||||
{% if booking.leadingPeriod %}
|
||||
{% include 'admin/accommodation_booking/_period_row.html.twig' with { period: booking.leadingPeriod } %}
|
||||
{% 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.mainNights }} {{ booking.mainNights != 1 ? 'Nächte' : 'Nacht' }}</td>
|
||||
<td class="py-1" colspan="2">Gruppe</td>
|
||||
@@ -94,7 +94,7 @@
|
||||
{% for child in form.selectedAdditionalServices %}
|
||||
<div class="relative flex items-start py-1">
|
||||
<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 }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -149,16 +149,16 @@
|
||||
{# 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. #}
|
||||
<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>
|
||||
<dt class="text-gray-500">Herkunft</dt>
|
||||
<dt class="text-muted">Herkunft</dt>
|
||||
<dd>{{ booking.origin.label }}</dd>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</dl>
|
||||
@@ -173,17 +173,17 @@
|
||||
{% set currency = booking.pricingCurrency ?? priceBreakdown.currency %}
|
||||
<twig:form:section title="Preis">
|
||||
{% 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.
|
||||
</p>
|
||||
</twig:form:section>
|
||||
{% endif %}
|
||||
|
||||
<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
|
||||
</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
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
hx-get="{{ path('app_admin_accommodationbooking_create') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend"
|
||||
class="button button--primary button--small">
|
||||
class="btn-primary">
|
||||
neu
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<div class="text-xl font-bold pb-4">
|
||||
Gruppenhaus ändern
|
||||
</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.
|
||||
</p>
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.accommodation) }}
|
||||
<div class="flex justify-end pt-8">
|
||||
<button type="submit" class="button button--primary button--small">
|
||||
<button type="submit" class="btn-primary">
|
||||
speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end pt-8">
|
||||
<button type="submit" class="button button--primary button--small">
|
||||
<button type="submit" class="btn-primary">
|
||||
speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{ form_errors(line.amount) }}
|
||||
</div>
|
||||
<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"
|
||||
title="Position entfernen">
|
||||
{{ icon('close', 'w-5 h-5') }}
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="text-xl font-bold pb-1">
|
||||
{{ title }}
|
||||
</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
|
||||
kommen zum Gesamtpreis hinzu und fallen nur unter den Rabatt auf den Gesamtpreis.
|
||||
</p>
|
||||
@@ -40,8 +40,8 @@
|
||||
</div>
|
||||
|
||||
{% 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="flex gap-2 px-4 py-2 bg-gray-100 border-b border-gray-200 rounded-t-md text-sm font-bold">
|
||||
<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-page border-b border-line rounded-t-md text-sm font-bold">
|
||||
<div class="flex-1">Position</div>
|
||||
{# w-5 matches the remove button's icon, so the heading sits over the amounts. #}
|
||||
<div class="w-32 shrink-0">Betrag</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
<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">
|
||||
+ Position hinzufügen
|
||||
</button>
|
||||
@@ -64,7 +64,7 @@
|
||||
{% do form.lines.setRendered %}
|
||||
|
||||
<div class="flex justify-end pt-6">
|
||||
<button type="submit" class="button button--primary button--small">
|
||||
<button type="submit" class="btn-primary">
|
||||
speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ booking.recordLabel }} · {% include 'admin/accommodation_booking/_status_label.html.twig' %}
|
||||
{{ booking.groupName }}
|
||||
</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
|
||||
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">
|
||||
<twig:form:section title="Status">
|
||||
<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>
|
||||
<dt class="text-gray-500">Herkunft</dt>
|
||||
<dt class="text-muted">Herkunft</dt>
|
||||
<dd>{{ booking.origin.label }}</dd>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{% endif %}
|
||||
<dt class="text-gray-500">Eingegangen</dt>
|
||||
<dt class="text-muted">Eingegangen</dt>
|
||||
<dd>{{ booking.createdAt | date('d.m.Y, H:i') }}</dd>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</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. #}
|
||||
{% set has_next_step = booking.draft or booking.requested or booking.received %}
|
||||
{% if booking.draft or booking.requested %}
|
||||
<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
|
||||
erzeugt und die Buchung wartet anschließend auf die Annahme durch den Kunden.
|
||||
</p>
|
||||
<div class="flex flex-col gap-2">
|
||||
<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-target="body"
|
||||
hx-swap="beforeend">
|
||||
Angebot per E-Mail senden
|
||||
</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-target="body"
|
||||
hx-swap="beforeend">
|
||||
@@ -155,11 +155,11 @@
|
||||
</twig:form:section>
|
||||
{% elseif booking.received %}
|
||||
<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.
|
||||
</p>
|
||||
<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-target="body"
|
||||
hx-swap="beforeend">
|
||||
@@ -170,13 +170,13 @@
|
||||
|
||||
<twig:form:section title="Zugangslink">
|
||||
{% 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.
|
||||
</p>
|
||||
{% elseif accessLink %}
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<button type="button"
|
||||
class="button button--neutral button--small sm:text-xs w-full"
|
||||
class="btn-secondary w-full"
|
||||
data-controller="clipboard"
|
||||
data-clipboard-content-value="{{ accessLink }}"
|
||||
data-clipboard-label-value="Kopiert!"
|
||||
@@ -184,21 +184,21 @@
|
||||
{{ icon('copy', 'w-4 h-4') }} Link kopieren
|
||||
</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-target="body"
|
||||
hx-swap="beforeend">
|
||||
Link senden
|
||||
</button>
|
||||
</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') }}
|
||||
{% if accessLinkExpiresAt < date() %}
|
||||
<span class="text-red-600 font-medium">(abgelaufen)</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="text-sm text-gray-500">
|
||||
<p class="text-sm text-muted">
|
||||
Der Zugangslink wird beim Versand des Angebots erzeugt.
|
||||
</p>
|
||||
{% endif %}
|
||||
@@ -207,23 +207,23 @@
|
||||
<twig:form:section title="Aktionen">
|
||||
<div class="flex flex-col gap-2">
|
||||
<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
|
||||
</a>
|
||||
<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-target="body"
|
||||
hx-swap="beforeend">
|
||||
duplizieren
|
||||
</button>
|
||||
<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
|
||||
</a>
|
||||
</div>
|
||||
{% 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"
|
||||
class="text-sm font-medium text-red-600 hover:underline"
|
||||
hx-get="{{ path('app_admin_accommodationbooking_discard', { id: booking.id }) }}"
|
||||
@@ -235,7 +235,7 @@
|
||||
{% endif %}
|
||||
</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
|
||||
</a>
|
||||
</aside>
|
||||
|
||||
Reference in new issue
Block a user