Vollstaendige Gastdaten direkt im Zuordnungsdialog erfassen
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m48s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m48s
This commit is contained in:
1 parent
13f1b5856c
commit
78aafd7c28
6 files changed
+105
-28
No files matched your search
@@ -21,26 +21,11 @@ public static function configure(Schema $schema): Schema
|
||||
Section::make('Kontakt')
|
||||
->columnSpan(2)
|
||||
->columns(2)
|
||||
->schema([
|
||||
TextInput::make('first_name')->label('Vorname')->required()->maxLength(255),
|
||||
TextInput::make('last_name')->label('Nachname')->maxLength(255)->dehydrateStateUsing(fn (?string $state): string => $state ?? ''),
|
||||
TextInput::make('email')->label('E-Mail')->email()->maxLength(255)->dehydrateStateUsing(fn (?string $state): ?string => filled($state) ? $state : null)->helperText('Bei Portalgästen gegebenenfalls noch unbekannt. Keine Ersatzadresse eintragen.'),
|
||||
TextInput::make('phone')->label('Telefon')->tel()->maxLength(50),
|
||||
TextInput::make('street')->label('Straße')->maxLength(255),
|
||||
TextInput::make('postal_code')->label('PLZ')->maxLength(20),
|
||||
TextInput::make('city')->label('Ort')->maxLength(255),
|
||||
Select::make('country')
|
||||
->label('Land')
|
||||
->options(['DE' => 'Deutschland', 'AT' => 'Österreich', 'CH' => 'Schweiz', 'NL' => 'Niederlande', 'DK' => 'Dänemark', 'PL' => 'Polen'])
|
||||
->default('DE')
|
||||
->required(),
|
||||
]),
|
||||
->schema(static::contactFields()),
|
||||
Section::make('Verwaltung')
|
||||
->columnSpan(1)
|
||||
->schema([
|
||||
TagsInput::make('tags')
|
||||
->label('Markierungen')
|
||||
->suggestions(['Stammgast', 'Familie', 'Empfehlung', 'Nicht wieder vermieten']),
|
||||
...static::personalFields(),
|
||||
TextEntry::make('marketing_consent_at')
|
||||
->label('Einwilligung Angebote per E-Mail')
|
||||
->state(fn (?Guest $record): string => $record?->marketing_consent_at ? 'bestätigt am '.$record->marketing_consent_at->format('d.m.Y') : 'keine'),
|
||||
@@ -48,8 +33,33 @@ public static function configure(Schema $schema): Schema
|
||||
->label('Anonymisiert')
|
||||
->dateTime('d.m.Y')
|
||||
->visible(fn (?Guest $record): bool => $record?->anonymized_at !== null),
|
||||
Textarea::make('notes')->label('Notizen')->rows(5),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
/** @return array<TextInput|Select> */
|
||||
public static function contactFields(): array
|
||||
{
|
||||
return [
|
||||
TextInput::make('first_name')->label('Vorname')->required()->maxLength(255),
|
||||
TextInput::make('last_name')->label('Nachname')->maxLength(255)->dehydrateStateUsing(fn (?string $state): string => $state ?? ''),
|
||||
TextInput::make('email')->label('E-Mail')->email()->maxLength(255)->dehydrateStateUsing(fn (?string $state): ?string => filled($state) ? $state : null)->helperText('Bei Portalgästen gegebenenfalls noch unbekannt. Keine Ersatzadresse eintragen.'),
|
||||
TextInput::make('phone')->label('Telefon')->tel()->maxLength(50),
|
||||
TextInput::make('street')->label('Straße')->maxLength(255),
|
||||
TextInput::make('postal_code')->label('PLZ')->maxLength(20),
|
||||
TextInput::make('city')->label('Ort')->maxLength(255),
|
||||
Select::make('country')->label('Land')
|
||||
->options(['DE' => 'Deutschland', 'AT' => 'Österreich', 'CH' => 'Schweiz', 'NL' => 'Niederlande', 'DK' => 'Dänemark', 'PL' => 'Polen'])
|
||||
->default('DE')->required(),
|
||||
];
|
||||
}
|
||||
|
||||
/** @return array<TagsInput|Textarea> */
|
||||
public static function personalFields(): array
|
||||
{
|
||||
return [
|
||||
TagsInput::make('tags')->label('Markierungen')->suggestions(['Stammgast', 'Familie', 'Empfehlung', 'Nicht wieder vermieten']),
|
||||
Textarea::make('notes')->label('Notizen')->rows(5),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user