feat: xlsx export of booking edit draft data for admins

This commit is contained in:
Björn Fromme
2026-01-13 10:22:03 +01:00
parent 5221cea53b
commit 3d4d88e986
7 changed files with 912 additions and 84 deletions
+44
View File
@@ -37,6 +37,18 @@ class BookingEditDraft
#[ORM\Column(type: 'date_immutable')]
private \DateTimeImmutable $travelDate;
/**
* BusProNet travel date ID (termin idbuspro) for loading travel data.
*/
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $dateId = null;
/**
* BusProNet hotel ID for loading travel data.
*/
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $hotelId = null;
#[ORM\Column(type: 'json')]
private array $formData = [];
@@ -95,6 +107,38 @@ class BookingEditDraft
return $this;
}
public function getDateId(): ?int
{
return $this->dateId;
}
public function setDateId(?int $dateId): static
{
$this->dateId = $dateId;
return $this;
}
public function getHotelId(): ?int
{
return $this->hotelId;
}
public function setHotelId(?int $hotelId): static
{
$this->hotelId = $hotelId;
return $this;
}
/**
* Checks if the draft has the required travel IDs for export functionality.
*/
public function hasExportData(): bool
{
return null !== $this->dateId && null !== $this->hotelId;
}
public function getFormData(): array
{
return $this->formData;