Anfrage-Basisprozess inquiry.request mit Schablonen für Antwort und Gastkommunikation
Antwortart (Auskunft/Angebot) und Reservierung sind entkoppelt (neue Einstellung inquiry_answer; pre_reservation bleibt die Reservierungsstrategie). Anlass-bezogene Absender für Anreise-Information und Bewertungsbitte; Schablonen liefern Standardwerte unterhalb aller einstellbaren Ebenen. A1/A2 bleiben Voreinstellungen und Altfassungen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e40f8639b3
commit
221ce8ca81
51 files changed
+773
-73
No files matched your search
@@ -5,6 +5,7 @@
|
||||
use App\Enums\BookingNoticeMode;
|
||||
use App\Enums\ContractDelivery;
|
||||
use App\Enums\DataRequestMode;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\ProcessingMode;
|
||||
use App\Enums\ProcessSetting;
|
||||
use App\Enums\Responsibility;
|
||||
@@ -39,7 +40,8 @@ public static function field(string $name, ProcessSetting $setting, string $inhe
|
||||
->helperText('Automatisch: Das System sendet Angebote bzw. Unterlagen selbst, sobald alle Angaben da sind. Sonst bereitet es alles vor und Sie geben frei.'),
|
||||
ProcessSetting::PreReservation => Select::make($name)->options(['1' => 'Ja – der Zeitraum ist bis zum Ablauf des Angebots reserviert', '0' => 'Nein – der Gast erhält eine unverbindliche Auskunft und kann daraus die Buchung anfragen (erneute Prüfung vor der Bestätigung)'])->placeholder($placeholder),
|
||||
ProcessSetting::HoldHours => TextInput::make($name)->integer()->minValue(1)->maxValue(720)->suffix('Stunden')->placeholder($placeholder),
|
||||
ProcessSetting::Documents, ProcessSetting::Payments, ProcessSetting::GuestMessages => Select::make($name)->options([Responsibility::Landlord->value => Responsibility::Landlord->getLabel(), Responsibility::Portal->value => Responsibility::Portal->getLabel()])->placeholder($placeholder),
|
||||
ProcessSetting::Documents, ProcessSetting::Payments, ProcessSetting::GuestMessages, ProcessSetting::ArrivalInfoSender, ProcessSetting::ReviewRequestSender => Select::make($name)->options([Responsibility::Landlord->value => Responsibility::Landlord->getLabel(), Responsibility::Portal->value => Responsibility::Portal->getLabel()])->placeholder($placeholder),
|
||||
ProcessSetting::InquiryAnswer => Select::make($name)->options(InquiryAnswer::class)->placeholder($placeholder),
|
||||
ProcessSetting::ArrivalInfoDaysBefore => TextInput::make($name)->integer()->minValue(1)->maxValue(14)->suffix('Tage vor Anreise')->placeholder($placeholder),
|
||||
ProcessSetting::ContractTemplate => Select::make($name)
|
||||
->options(fn (): array => ContractTemplate::query()->orderBy('name')->orderBy('version')->get()->mapWithKeys(fn (ContractTemplate $template): array => [$template->id => $template->label()])->all())
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Enums\ProcessSetting;
|
||||
use App\Enums\UserRole;
|
||||
@@ -112,7 +113,9 @@ public static function where(ProcessSetting $setting): string
|
||||
public static function answer(ProcessProfile $profile): string
|
||||
{
|
||||
return match ($profile->intake) {
|
||||
IntakeKind::Inquiry => $profile->preReservation() ? 'Angebot mit Annahmelink, Zeitraum reserviert' : 'Unverbindliche Auskunft, „Buchung anfragen“, erneute Prüfung',
|
||||
IntakeKind::Inquiry => $profile->inquiryAnswer() === InquiryAnswer::Offer
|
||||
? 'Angebot mit Annahmelink'.($profile->preReservation() ? ', Zeitraum schon bei der Anfrage reserviert' : ', Zeitraum erst mit dem Angebot reserviert')
|
||||
: 'Unverbindliche Auskunft, „Buchung anfragen“, erneute Prüfung',
|
||||
IntakeKind::Booking => 'keine – beim Portal bereits verbindlich',
|
||||
IntakeKind::Internal => 'keine – eigene Belegung',
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
use App\Enums\BookingTaskKind;
|
||||
use App\Enums\BookingTaskStatus;
|
||||
use App\Enums\DocumentKind;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Enums\Responsibility;
|
||||
use App\Exceptions\ReservationException;
|
||||
@@ -52,7 +53,7 @@ private function sendInformationAction(): Action
|
||||
->label(fn (): string => $this->record->information_version > 0 ? 'Auskunft ändern & neu senden' : 'Unverbindliche Auskunft prüfen und senden')
|
||||
->icon(Heroicon::OutlinedPaperAirplane)
|
||||
->visible(fn (): bool => in_array($this->record->status, [BookingStatus::Reserved, BookingStatus::Expired], true) && $this->record->intake !== IntakeKind::Booking
|
||||
&& ! $this->record->process()->preReservation() && $this->record->offer_version === 0 && ! $this->record->isHoldActive())
|
||||
&& $this->record->process()->inquiryAnswer() === InquiryAnswer::Information && $this->record->offer_version === 0 && ! $this->record->isHoldActive())
|
||||
->modalHeading('Unverbindliche Auskunft an den Gast')
|
||||
->modalDescription('Nach Ihrer Einstellung reservieren Anfragen den Zeitraum nicht. Der Gast erhält Preis und Verfügbarkeit zum heutigen Stand und kann daraus die Buchung anfragen; dann wird erneut geprüft. Verbindlich wird erst Ihre (oder die automatische) Bestätigung.')
|
||||
->modalSubmitActionLabel('Senden')
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
use App\Enums\ChangeBasis;
|
||||
use App\Enums\ChangeStatus;
|
||||
use App\Enums\DocumentKind;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Enums\InternalKind;
|
||||
use App\Enums\ProcessingMode;
|
||||
@@ -190,7 +191,7 @@ private function sendOfferAction(): Action
|
||||
return Action::make('sendOffer')
|
||||
->label(fn (): string => match (true) {
|
||||
$this->record->status === BookingStatus::OfferSent => 'Angebot ändern & neu senden',
|
||||
! $this->record->process()->preReservation() => 'Stattdessen verbindliches Angebot mit Reservierung senden',
|
||||
$this->record->process()->inquiryAnswer() === InquiryAnswer::Information => 'Stattdessen verbindliches Angebot mit Reservierung senden',
|
||||
default => 'Angebot prüfen und senden',
|
||||
})
|
||||
->icon(Heroicon::OutlinedPaperAirplane)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
use App\Process\ChannelCapabilities;
|
||||
use App\Process\ChannelProcessConfiguration;
|
||||
use App\Process\ConfigurationImpact;
|
||||
use App\Process\Models\ExternalBookingModel;
|
||||
use App\Process\Models\ProcessModel;
|
||||
use App\Process\ProcessCatalogue;
|
||||
use App\Process\ProcessProfile;
|
||||
@@ -243,10 +242,11 @@ public function chooseTemplate(string $area, string $key): void
|
||||
public function applyPreset(string $archetype): void
|
||||
{
|
||||
$presets = $this->presets();
|
||||
$base = app(ProcessCatalogue::class)->model(ExternalBookingModel::key());
|
||||
if (! isset($presets[$archetype]) || ! in_array(IntakeKind::from($this->intake), $base::intakes(), true)) {
|
||||
$composedBy = isset($presets[$archetype]) ? app(ProcessCatalogue::class)->model($archetype)::composedBy() : null;
|
||||
if ($composedBy === null) {
|
||||
return;
|
||||
}
|
||||
$base = app(ProcessCatalogue::class)->model($composedBy);
|
||||
$this->acknowledge = false;
|
||||
$this->drafts[$this->intake]['model'] = $base::key();
|
||||
$this->drafts[$this->intake]['variant'] = 'standard';
|
||||
|
||||
Reference in new issue
Block a user