Anschrift für Veranstaltungsort

This commit is contained in:
2026-09-10 11:45:52 +02:00
parent 70a57d10f5
commit ddfaab1501
19 changed files with 306 additions and 10 deletions
@@ -38,6 +38,8 @@ class CreateEventCommand {
'name' => $this->request->name,
'identifier' => Str::random(10),
'location' => $this->request->location,
'street' => $this->normalizeOptional($this->request->street),
'house_number' => $this->normalizeOptional($this->request->houseNumber),
'postal_code' => $this->request->postalCode,
'email' => $this->request->email,
'start_date' => $this->request->begin,
@@ -107,6 +109,17 @@ class CreateEventCommand {
return $response;
}
/**
* Straße und Hausnummer sind optional. Ein leer gelassenes Eingabefeld liefert einen leeren String --
* gespeichert wird dafür `null`, damit „nicht angegeben" nur eine Darstellung hat.
*/
private function normalizeOptional(?string $value): ?string
{
$value = trim((string) $value);
return '' === $value ? null : $value;
}
/**
* Event-Teil der Rechnungsnummer, z.B. `WM-V-20260701`: Tenant-Präfix, Dokumentart „V" für
* Veranstaltung, dann ohne Trenner Jahr, Monat des Beginns und die laufende Nummer der
@@ -19,8 +19,10 @@ class CreateEventRequest {
public string $accountOwner;
public string $accountIban;
public bool $payPerDay;
public ?string $street;
public ?string $houseNumber;
public function __construct(string $name, string $location, string $postalCode, string $email, DateTime $begin, DateTime $end, DateTime $earlyBirdEnd, DateTime $registrationFinalEnd, int $earlyBirdEndAmountIncrease, ParticipationFeeType $participationFeeType, string $accountOwner, string $accountIban, bool $payPerDay) {
public function __construct(string $name, string $location, string $postalCode, string $email, DateTime $begin, DateTime $end, DateTime $earlyBirdEnd, DateTime $registrationFinalEnd, int $earlyBirdEndAmountIncrease, ParticipationFeeType $participationFeeType, string $accountOwner, string $accountIban, bool $payPerDay, ?string $street = null, ?string $houseNumber = null) {
$this->name = $name;
$this->location = $location;
$this->postalCode = $postalCode;
@@ -34,5 +36,7 @@ class CreateEventRequest {
$this->accountOwner = $accountOwner;
$this->accountIban = $accountIban;
$this->payPerDay = $payPerDay;
$this->street = $street;
$this->houseNumber = $houseNumber;
}
}