Dokumentenzusammenstellung und Vorlagensteuerung (Paket 3, Prozessarchitektur v0.10)
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
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>
This commit is contained in:
1 parent
64248c09fa
commit
cf11c8a474
45 files changed
+2385
-144
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Actions\ConfirmBooking;
|
||||
use App\Actions\CreateReservation;
|
||||
use App\Actions\SendBookingDocuments;
|
||||
use App\Actions\TakeOverExternalBooking;
|
||||
use App\Exceptions\ReservationException;
|
||||
use App\Filament\Resources\BlockedPeriods\BlockedPeriodResource;
|
||||
@@ -19,6 +20,7 @@
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Entry of a new case that did not come through the website: a request (A1/A2) goes the same way as a website request,
|
||||
@@ -63,7 +65,16 @@ protected function handleRecordCreation(array $data): Model
|
||||
$booking = app(CreateReservation::class)->handle($property, $stay, $guest, source: 'manual', sendMails: $sendMails && ! ($data['confirm_immediately'] ?? false), originChannel: $channel);
|
||||
|
||||
if ($data['confirm_immediately'] ?? false) {
|
||||
app(ConfirmBooking::class)->handle($booking, notifyGuest: $sendMails && filled($booking->guest?->email));
|
||||
DB::transaction(fn () => app(ConfirmBooking::class)->bind($booking));
|
||||
if ($sendMails && filled($booking->guest?->email)) {
|
||||
// The documents go out only when their composition needs no check; otherwise they wait on the case page.
|
||||
$waiting = app(SendBookingDocuments::class)->automatically($booking->fresh());
|
||||
if ($waiting !== []) {
|
||||
Notification::make()->title('Gebucht – Unterlagen noch nicht gesendet')->body(implode(' ', $waiting))->warning()->send();
|
||||
}
|
||||
} else {
|
||||
app(ConfirmBooking::class)->deliver($booking->fresh(), notifyGuest: false);
|
||||
}
|
||||
}
|
||||
} catch (QuoteException|ReservationException $exception) {
|
||||
Notification::make()->title('Nicht möglich')->body($exception->getMessage())->danger()->send();
|
||||
|
||||
Reference in new issue
Block a user