WIP: Improve assignment overview for teamers in mobile view

This commit is contained in:
Björn Fromme
2023-10-20 12:47:03 +02:00
parent 7f3115a0ba
commit fd23ea7503
8 changed files with 127 additions and 75 deletions
+12
View File
@@ -12,6 +12,7 @@ class Hotel
private ?string $street = null;
private ?string $phone = null;
private ?string $type = null;
private ?string $country = null;
public function getId(): ?int
{
@@ -109,4 +110,15 @@ class Hotel
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): static
{
$this->country = $country;
return $this;
}
}
+1
View File
@@ -227,6 +227,7 @@ class ResponseParser
->setBusProId($busProId)
->setCode((string) $item->attributes()['code'])
->setName($item->xpath('name') ? (string) $item->xpath('name')[0] : null)
->setCountry($item->xpath('land') ? strtolower((string) $item->xpath('land')[0]) : null)
->setCity($item->xpath('ort') ? (string) $item->xpath('ort')[0] : null)
->setStreet($item->xpath('strasse') ? (string) $item->xpath('strasse')[0] : null)
->setPhone($item->xpath('telefon') ? (string) $item->xpath('telefon')[0] : null)
+2
View File
@@ -93,6 +93,7 @@ class BpnImportCommand extends Command
'date_to' => $dateTo->format('Y-m-d'),
'product' => $product,
'pickups' => json_encode($datePickups),
'country' => $hotel->getCountry(),
], [
'id' => $id,
'hotel_bus_pro_id' => $hotelBusProId,
@@ -112,6 +113,7 @@ class BpnImportCommand extends Command
'hotel_code' => $hotel->getCode(),
'hotel_bus_pro_id' => $hotelBusProId,
'pickups' => json_encode($datePickups),
'country' => $hotel->getCountry(),
])
;
++$addedCount;
+15
View File
@@ -41,6 +41,9 @@ class Destination
#[ORM\Column]
private array $pickups = [];
#[ORM\Column(length: 2, nullable: true)]
private ?string $country = null;
public function __toString(): string
{
return sprintf('%s - %s: %s, %s',
@@ -168,4 +171,16 @@ class Destination
{
return 0 < count($this->getPickups());
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): static
{
$this->country = $country;
return $this;
}
}