V2.1: Kanalfähigkeiten, Ausführungsvarianten, Dokumentenentkopplung, Portalbestätigung
Modellwahl über Kanalfähigkeiten mit erklärten Einschränkungen, Abgleich alter Werte, Ausführungsvarianten je Modul, getrennte Vertrags-/Buchungsinformation, Warten auf die Portalbestätigung mit Eskalation und Wiederaufnahme (Fälle C und D getestet). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ef1635e59a
commit
8442d0a3d8
62 files changed
+1818
-69
No files matched your search
@@ -11,6 +11,7 @@
|
||||
use App\Actions\RecordPortalAmounts;
|
||||
use App\Actions\RequestCaseData;
|
||||
use App\Actions\SendBookingDocuments;
|
||||
use App\Actions\SendBookingNotice;
|
||||
use App\Actions\SendOffer;
|
||||
use App\Actions\SetBookingStatus;
|
||||
use App\Documents\OfferTerms;
|
||||
@@ -18,6 +19,7 @@
|
||||
use App\Enums\ActivityState;
|
||||
use App\Enums\AdminMode;
|
||||
use App\Enums\AmountKind;
|
||||
use App\Enums\BookingNoticeMode;
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\BookingTaskKind;
|
||||
use App\Enums\BookingTaskStatus;
|
||||
@@ -50,6 +52,8 @@
|
||||
use App\Process\CaseAutomation;
|
||||
use App\Process\CaseLog;
|
||||
use App\Process\CaseRequirements;
|
||||
use App\Process\PortalConfirmation;
|
||||
use App\Process\ProcessRunner;
|
||||
use App\Support\Countries;
|
||||
use App\Support\Money;
|
||||
use Carbon\CarbonImmutable;
|
||||
@@ -141,6 +145,8 @@ protected function getHeaderActions(): array
|
||||
$this->confirmAction(),
|
||||
$this->sendDocumentsAction(),
|
||||
$this->resendConfirmationAction(),
|
||||
$this->confirmPortalAction(),
|
||||
$this->sendBookingNoticeAction(),
|
||||
$this->portalPriceAction(),
|
||||
$this->changeAction(),
|
||||
$this->confirmPortalCancellationAction(),
|
||||
@@ -492,6 +498,50 @@ private function confirmAction(): Action
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* V2.1: the landlord states that the portal confirmed the booking (e.g. seen in the portal's own interface). The steps that
|
||||
* wait for it go on; the booking itself was binding from the start.
|
||||
*/
|
||||
private function confirmPortalAction(): Action
|
||||
{
|
||||
return Action::make('confirmPortal')
|
||||
->label('Bestätigung des Portals festhalten')
|
||||
->icon(Heroicon::OutlinedCheckBadge)
|
||||
->visible(fn (): bool => $this->record->isBinding() && $this->record->process()->awaitsPortalConfirmation() && PortalConfirmation::evidence($this->record) === null)
|
||||
->modalDescription('Das Portal hat die Buchung bestätigt (z. B. in seiner Oberfläche gesehen). Unterlagen und Nachrichten, die darauf warten, gehen dann weiter. Die Buchung bleibt wie sie ist.')
|
||||
->schema([Textarea::make('note')->label('Woran haben Sie das gesehen?')->rows(2)->maxLength(500)])
|
||||
->action(function (array $data): void {
|
||||
PortalConfirmation::confirm($this->record, CaseLog::actor(), $data['note'] ?? null);
|
||||
app(ProcessRunner::class)->advance($this->record->fresh(), 'portal.mail');
|
||||
$this->record->refresh();
|
||||
Notification::make()->title('Bestätigung festgehalten')->success()->send();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* V2.1: the short booking information to the guest, sent by hand (also where the automatic dispatch is off).
|
||||
*/
|
||||
private function sendBookingNoticeAction(): Action
|
||||
{
|
||||
return Action::make('sendBookingNotice')
|
||||
->label('Buchungsinformation an den Gast senden')
|
||||
->icon(Heroicon::OutlinedEnvelope)
|
||||
->visible(fn (): bool => $this->record->isBinding() && $this->record->process()->bookingNotice() !== BookingNoticeMode::Off && ! SendBookingNotice::sent($this->record) && filled($this->record->guest?->email))
|
||||
->requiresConfirmation()
|
||||
->modalDescription('Der Gast erhält eine kurze Information über seine Buchung – ohne Vertrag.')
|
||||
->action(function (SendBookingNotice $notice): void {
|
||||
try {
|
||||
$notice->handle($this->record->fresh());
|
||||
} catch (ReservationException $exception) {
|
||||
Notification::make()->title('Nicht gesendet')->body($exception->getMessage())->danger()->send();
|
||||
|
||||
return;
|
||||
}
|
||||
$this->record->refresh();
|
||||
Notification::make()->title('Buchungsinformation gesendet')->success()->send();
|
||||
});
|
||||
}
|
||||
|
||||
private function resendConfirmationAction(): Action
|
||||
{
|
||||
return Action::make('resendConfirmation')
|
||||
|
||||
Reference in new issue
Block a user