feat: API endpoint to load travel data by code
This commit is contained in:
@@ -2,10 +2,19 @@
|
||||
|
||||
namespace App\BusProNet\Model;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
class CrmSelection
|
||||
{
|
||||
#[Groups(['api:single'])]
|
||||
public ?int $id = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public ?string $label = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public bool $mutable = false;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public bool $selected = false;
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\BusProNet\Model;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
class CrmSelectionGroup
|
||||
{
|
||||
/**
|
||||
@@ -16,8 +18,13 @@ class CrmSelectionGroup
|
||||
86 => 'Programm',
|
||||
];
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public ?int $id = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public ?string $label = null;
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public ?array $selections = null;
|
||||
|
||||
public function getMutableSelections(): array
|
||||
@@ -27,6 +34,7 @@ class CrmSelectionGroup
|
||||
});
|
||||
}
|
||||
|
||||
#[Groups(['api:single'])]
|
||||
public function isVisible(): bool
|
||||
{
|
||||
return 0 < count($this->getMutableSelections());
|
||||
|
||||
@@ -49,7 +49,7 @@ class Room
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
public ?int $available = null;
|
||||
|
||||
#[Groups(['api:list', 'api:single'])]
|
||||
#[Groups(['booking'])]
|
||||
public ?string $board = null;
|
||||
|
||||
#[Groups(['booking'])]
|
||||
|
||||
Reference in New Issue
Block a user