Files
fewo-stommer/resources/views/filament/document-composition.blade.php
T
LarsandClaude Opus 5.5 cf11c8a474
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
Dokumentenzusammenstellung und Vorlagensteuerung (Paket 3, Prozessarchitektur v0.10)
Eine Zusammenstellung vor jedem Dokument (Angebot, Bestaetigung, Buchungsunterlagen
extern), Dokumentart je Vorgangsart, Freigaben fuer Vorlagen und Dokumentarten,
Schutz vor unvereinbarten Bedingungen bei Portalbuchungen (E-004), kein doppelter
Versand, Absicherung Hold 0 bis Paket 7, A6-Aufenthaltsbestaetigung vorbereitet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 19:44:52 +01:00

76 lines
5.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{-- The one composition shown before every document (UMSETZUNGSPLAN_v0.10 §4.5). --}}
@php
/** @var \App\Documents\DocumentComposition $composition */
$c = $composition;
$money = fn (?int $cents): string => $cents === null ? 'noch nicht bekannt' : \App\Support\Money::format($cents);
$row = 'display:grid;grid-template-columns:11rem 1fr;gap:.75rem;padding:.55rem 0;border-bottom:1px solid rgba(128,128,128,.18)';
$label = 'color:#6b7280';
$box = fn (string $color): string => "border-left:4px solid {$color};background:rgba(128,128,128,.06);padding:.6rem .8rem;border-radius:.375rem;margin-bottom:.5rem";
@endphp
<div style="font-size:.95rem">
@if ($c->blockers() !== [])
<div style="{{ $box('#dc2626') }}">
<strong>Fehlt noch – so kann nichts gesendet werden</strong>
<ul style="margin:.3rem 0 0 1.1rem;list-style:disc">@foreach ($c->blockers() as $message)<li>{{ $message }}</li>@endforeach</ul>
</div>
@endif
@if ($c->toConfirm() !== [])
<div style="{{ $box('#d97706') }}">
<strong>Bitte prüfen</strong> – automatisch wird so nichts versendet; von Hand erst nach Ihrer Bestätigung unten.
<ul style="margin:.3rem 0 0 1.1rem;list-style:disc">@foreach ($c->toConfirm() as $message)<li>{{ $message }}</li>@endforeach</ul>
</div>
@endif
@if ($c->information() !== [])
<div style="{{ $box('#2563eb') }}">
<ul style="margin:0 0 0 1.1rem;list-style:disc">@foreach ($c->information() as $message)<li>{{ $message }}</li>@endforeach</ul>
</div>
@endif
<div style="{{ $row }}"><div style="{{ $label }}">Dokument</div><div><strong>{{ $c->kind->getLabel() }}</strong></div></div>
<div style="{{ $row }}"><div style="{{ $label }}">An</div><div>{{ $c->recipientName() ?? 'Gast noch nicht bekannt' }} · {{ $c->recipientEmail() ?? 'keine E-Mail-Adresse' }}</div></div>
<div style="{{ $row }}"><div style="{{ $label }}">Eingang</div><div>{{ $c->intakeLabel }}@if ($c->draft->portal_reference) · Buchungsnummer {{ $c->draft->portal_reference }}@endif</div></div>
<div style="{{ $row }}">
<div style="{{ $label }}">Wohnung und Zeitraum</div>
<div>{{ $c->draft->property->name }} · {{ $c->draft->arrival->format('d.m.Y') }} – {{ $c->draft->departure->format('d.m.Y') }} ({{ $c->draft->nights() }} Nächte) · {{ $c->draft->guests ? $c->draft->guests.' Personen' : 'Personen noch nicht bekannt' }}</div>
</div>
<div style="{{ $row }}">
<div style="{{ $label }}">Preis</div>
<div>
@foreach ($c->priceLines as $line)
<div style="display:flex;justify-content:space-between;gap:1rem"><span>{{ $line['label'] }}</span><span>{{ $money($line['amount']) }}</span></div>
@endforeach
<div style="display:flex;justify-content:space-between;gap:1rem;font-weight:700;margin-top:.2rem"><span>Gesamtpreis</span><span>{{ $money($c->draft->total) }}</span></div>
<div style="{{ $label }};font-size:.85rem">Herkunft: {{ $c->priceSource }}</div>
</div>
</div>
<div style="{{ $row }}"><div style="{{ $label }}">Leistungen</div><div>{{ $c->services === [] ? 'keine Zusatzleistungen' : implode(', ', $c->services) }}</div></div>
@if ($c->kind->isForGuests())
<div style="{{ $row }}"><div style="{{ $label }}">Stornoregel</div><div>@foreach ($c->cancellation as $line)<div>{{ $line }}</div>@endforeach</div></div>
<div style="{{ $row }}">
<div style="{{ $label }}">Vorlage</div>
<div>{{ $c->templateLabel() }} <span style="{{ $label }}">– {{ $c->templateSource }}</span>
@if ($expert && $c->template)
<div style="{{ $label }};font-size:.85rem">Freigegeben: {{ $c->template->isReleased() ? 'ja, '.$c->template->released_at->format('d.m.Y').' ('.$c->template->released_by.')' : 'nein' }} · Portalbedingungen bestätigt: {{ $c->template->confirmsPortalTerms() ? 'ja' : 'nein' }}</div>
@endif
</div>
</div>
<div style="{{ $row }}"><div style="{{ $label }}">Anlagen</div><div>{{ $c->annexes === [] ? 'keine' : implode(', ', array_column($c->annexes, 'label')) }}</div></div>
<div style="{{ $row }}">
<div style="{{ $label }}">Annahme</div>
<div>{{ $c->kind->hasAcceptanceLink() ? 'Mit Link zum Annehmen, gültig bis '.$c->draft->hold_expires_at?->format('d.m.Y, H:i').' Uhr' : 'Kein Annahmelink' }}</div>
</div>
@endif
@if ($c->kind->isAvailable() && $c->kind->isForGuests())
<details style="margin-top:.8rem">
<summary style="cursor:pointer;font-weight:600">Vorschau der E-Mail</summary>
<iframe title="Vorschau der E-Mail" srcdoc="{{ $mailPreview }}" style="width:100%;height:28rem;border:1px solid rgba(128,128,128,.3);border-radius:.375rem;margin-top:.4rem;background:#fff"></iframe>
</details>
<details style="margin-top:.5rem">
<summary style="cursor:pointer;font-weight:600">Vorschau des Dokuments</summary>
<p style="margin:.4rem 0"><a href="{{ $pdfUrl }}" target="_blank" rel="noopener" style="text-decoration:underline">Als PDF öffnen</a> (zeigt den aktuellen Stand dieser Zusammenstellung)</p>
<iframe title="Vorschau des Dokuments" srcdoc="{{ $documentPreview }}" style="width:100%;height:32rem;border:1px solid rgba(128,128,128,.3);border-radius:.375rem;background:#fff"></iframe>
</details>
@endif
</div>