Files
fewo-stommer/app/Enums/ChannelTaskProof.php
T
LarsandClaude Opus 5.5 ac9d20b812 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>
2026-11-01 20:53:35 +01:00

55 lines
1.7 KiB
PHP

<?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).',
};
}
}