feat: xlsx export of booking edit draft data for admins
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user