Ein Eingang fuer alle Kanaele (Paket 4, Prozessarchitektur v0.10)
Portalbuchungen und -anfragen aus Kalender und Mail werden ueber PortalIntake zum Vorgang (nur bei sicherer Erkennung), Dubletten ueber Buchungsnummer, gleiches Portal mit gleichen Naechten und Spiegelung; Unsicheres wird geklaert. Portalstorno und -aenderung als Aufgabe am Vorgang ohne stille Stornierung. Schalter je Kanal (Aus als Standard, Beobachten, Anlegen, Anlegen + weiter), Eingangsprotokoll, Bestandsuebernahme mit Vorschau/Bericht/Ruecknahme, Sperrnachweis in drei Stufen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf11c8a474
commit
ac9d20b812
29 files changed
+1952
-16
No files matched your search
@@ -17,6 +17,8 @@ enum BookingTaskKind: string implements HasLabel
|
||||
case CancellationRequest = 'cancellation_request';
|
||||
case CancellationFee = 'cancellation_fee';
|
||||
case PortalCancellation = 'portal_cancellation';
|
||||
case PortalCancellationReported = 'portal_cancel_reported';
|
||||
case PortalChangeReported = 'portal_change_reported';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
@@ -27,12 +29,14 @@ public function getLabel(): string
|
||||
self::CancellationRequest => 'Stornierungswunsch des Gastes',
|
||||
self::CancellationFee => 'Stornokosten prüfen und abrechnen',
|
||||
self::PortalCancellation => 'Stornierung im Portal veranlassen bzw. prüfen',
|
||||
self::PortalCancellationReported => 'Das Portal meldet eine Stornierung – bitte prüfen',
|
||||
self::PortalChangeReported => 'Das Portal meldet eine Änderung – bitte prüfen',
|
||||
};
|
||||
}
|
||||
|
||||
public function isPayment(): bool
|
||||
{
|
||||
return ! in_array($this, [self::CancellationRequest, self::CancellationFee, self::PortalCancellation], true);
|
||||
return ! in_array($this, [self::CancellationRequest, self::CancellationFee, self::PortalCancellation, self::PortalCancellationReported, self::PortalChangeReported], true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,7 +50,7 @@ public function reminder(): ?array
|
||||
self::DepositReminder => [PaymentReminder::DEPOSIT_OVERDUE, 'deposit_reminded_at'],
|
||||
self::BalanceRequest => [PaymentReminder::BALANCE_REQUEST, 'balance_requested_at'],
|
||||
self::BalanceReminder => [PaymentReminder::BALANCE_OVERDUE, 'balance_reminded_at'],
|
||||
self::CancellationRequest, self::CancellationFee, self::PortalCancellation => null,
|
||||
self::CancellationRequest, self::CancellationFee, self::PortalCancellation, self::PortalCancellationReported, self::PortalChangeReported => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasDescription;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
/**
|
||||
* Whether bookings and requests recognised on a channel become cases by themselves (UMSETZUNGSPLAN_v0.10 §5.5). Every
|
||||
* channel starts switched off; observing only records what would happen. Creating cases never sends anything that the
|
||||
* landlord has not released (documents need their release, package 3); only the last mode lets the new cases follow
|
||||
* the automatic handling of the settings.
|
||||
*/
|
||||
enum CaseIntakeMode: string implements HasDescription, HasLabel
|
||||
{
|
||||
case Off = 'off';
|
||||
case Observe = 'observe';
|
||||
case Create = 'create';
|
||||
case Continue = 'continue';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Off => 'Aus – Sie übernehmen Buchungen selbst',
|
||||
self::Observe => 'Beobachten – nur protokollieren, was entstehen würde',
|
||||
self::Create => 'Vorgänge anlegen – die nächsten Schritte geben Sie frei',
|
||||
self::Continue => 'Vorgänge anlegen und nach Ihren Einstellungen weiterbearbeiten',
|
||||
};
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Off => 'Erkannte Buchungen erscheinen als Klärungsfall; nichts entsteht automatisch.',
|
||||
self::Observe => 'Es entsteht nichts. Das Eingangsprotokoll zeigt, welche Vorgänge entstanden wären und warum.',
|
||||
self::Create => 'Sicher erkannte Buchungen werden zum Vorgang; Sie geben jeden weiteren Schritt frei.',
|
||||
self::Continue => 'Wie „anlegen“; danach laufen die Vorgänge automatisch oder mit Freigabe – wie unter „So arbeite ich“ eingestellt.',
|
||||
};
|
||||
}
|
||||
|
||||
public function records(): bool
|
||||
{
|
||||
return $this !== self::Off;
|
||||
}
|
||||
|
||||
public function creates(): bool
|
||||
{
|
||||
return in_array($this, [self::Create, self::Continue], true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
/**
|
||||
* How far a block (or release) on a portal is proven (E-018). The three steps are different statements: entering the
|
||||
* block does not show that the portal took it over, and a calendar feed we provide proves nothing about the portal.
|
||||
*/
|
||||
enum ChannelTaskProof: string implements HasColor, HasLabel
|
||||
{
|
||||
/** The change was made or started (by hand or by an automation). */
|
||||
case Initiated = 'initiated';
|
||||
|
||||
/** The block was seen in the portal's own calendar. */
|
||||
case Observed = 'observed';
|
||||
|
||||
/** The portal confirmed it (e.g. its own confirmation or a test booking was refused). */
|
||||
case Confirmed = 'confirmed';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Initiated => 'veranlasst',
|
||||
self::Observed => 'im Portal gesehen',
|
||||
self::Confirmed => 'Wirksamkeit bestätigt',
|
||||
};
|
||||
}
|
||||
|
||||
public function getColor(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Initiated => 'warning',
|
||||
self::Observed => 'info',
|
||||
self::Confirmed => 'success',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The choice the landlord reads when completing a task.
|
||||
*/
|
||||
public function question(bool $block = true): string
|
||||
{
|
||||
$what = $block ? 'gesperrt' : 'freigegeben';
|
||||
|
||||
return match ($this) {
|
||||
self::Initiated => "Ich habe den Zeitraum im Portal {$what}.",
|
||||
self::Observed => "… und im Kalender des Portals gesehen, dass er {$what} ist.",
|
||||
self::Confirmed => 'Das Portal hat es bestätigt (z. B. Bestätigung oder Testanfrage abgelehnt).',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasColor;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
/**
|
||||
* What the intake made of one incoming event (portal calendar entry or portal e-mail).
|
||||
*/
|
||||
enum IntakeOutcome: string implements HasColor, HasLabel
|
||||
{
|
||||
/** A booking binding on the portal, recognised with confidence: a new case (A3–A5). */
|
||||
case Create = 'create';
|
||||
|
||||
/** A non-binding request through the portal: a new request case (A2). */
|
||||
case Inquiry = 'inquiry';
|
||||
|
||||
/** The same booking as an existing case (reference, same portal and dates, or its calendar mirror). */
|
||||
case Link = 'link';
|
||||
|
||||
/** Not certain enough: the landlord clarifies. */
|
||||
case Clarify = 'clarify';
|
||||
|
||||
/** No booking of this portal (block, mirror of another portal, own use, already clarified). */
|
||||
case Ignore = 'ignore';
|
||||
|
||||
/** The portal reports a cancellation of a known case. */
|
||||
case CancellationSignal = 'cancellation';
|
||||
|
||||
/** The portal reports other dates for a known case, or its calendar entry disappeared. */
|
||||
case ChangeSignal = 'change';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Create => 'Neuer Vorgang (Buchung)',
|
||||
self::Inquiry => 'Neuer Vorgang (Anfrage)',
|
||||
self::Link => 'Gehört zu vorhandenem Vorgang',
|
||||
self::Clarify => 'Klärung nötig',
|
||||
self::Ignore => 'Keine Buchung',
|
||||
self::CancellationSignal => 'Portal meldet Stornierung',
|
||||
self::ChangeSignal => 'Portal meldet Änderung',
|
||||
};
|
||||
}
|
||||
|
||||
public function getColor(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Create, self::Inquiry => 'success',
|
||||
self::Link, self::Ignore => 'gray',
|
||||
self::Clarify => 'warning',
|
||||
self::CancellationSignal, self::ChangeSignal => 'danger',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user