- CaseRequirements: Vor einem eigenen verbindlichen Angebot und vor der verbindlichen Bestätigung eines Buchungswunsches müssen Vor- und Nachname, E-Mail, vollständige Anschrift mit Land, Personenzahl und Zeitraum vorliegen – harter Blocker, auch von Hand (G2a, B3). Die Auskunft unter Vorbehalt bleibt ohne dieses Gate. - ContributeCaseFacts (S5): jede Angabe mit Herkunft und Ergebnis in case_facts; fehlend → übernommen, gleich → bestätigt, abweichend vom Gast → Prüfaufgabe (Kartei bleibt), Vermieterin maßgeblich, Zeitraum und Personen → Änderungswunsch; idempotent; danach einmal CaseAutomation. - ProvideGuestContact und Webformular nutzen den Fakteneingang. - Land als ISO-Code mit „Deutschland“ als änderbarem Formularstandard; guests.country ohne stillen Standardwert (B4). - Testdaten bestehender Tests um Anschriften ergänzt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
/**
|
|
* Countries guests usually come from, as ISO 3166-1 alpha-2 codes (the guest record stores the code). Forms may
|
|
* pre-select Germany; it counts as given only because the guest or the landlord sends it (v0.11 B4).
|
|
*/
|
|
class Countries
|
|
{
|
|
public const DEFAULT = 'DE';
|
|
|
|
/**
|
|
* @return array<string, string> code => name
|
|
*/
|
|
public static function options(): array
|
|
{
|
|
return [
|
|
'DE' => 'Deutschland',
|
|
'AT' => 'Österreich',
|
|
'CH' => 'Schweiz',
|
|
'NL' => 'Niederlande',
|
|
'BE' => 'Belgien',
|
|
'LU' => 'Luxemburg',
|
|
'DK' => 'Dänemark',
|
|
'SE' => 'Schweden',
|
|
'NO' => 'Norwegen',
|
|
'FI' => 'Finnland',
|
|
'PL' => 'Polen',
|
|
'CZ' => 'Tschechien',
|
|
'FR' => 'Frankreich',
|
|
'IT' => 'Italien',
|
|
'ES' => 'Spanien',
|
|
'GB' => 'Vereinigtes Königreich',
|
|
'IE' => 'Irland',
|
|
'US' => 'Vereinigte Staaten',
|
|
];
|
|
}
|
|
|
|
public static function name(?string $code): ?string
|
|
{
|
|
return $code === null ? null : (self::options()[$code] ?? $code);
|
|
}
|
|
}
|