wip: functionality for new role 'management'

This commit is contained in:
Björn Fromme
2024-02-14 14:59:47 +01:00
parent 7f05cf30b6
commit 7c7addf531
17 changed files with 312 additions and 68 deletions
+75 -8
View File
@@ -40,8 +40,20 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
#[ORM\Column(length: 255, nullable: true)]
private ?string $jobProfileName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $hotel = null;
#[ORM\Column(length: 32, nullable: true)]
private ?string $hotelCode = null;
#[ORM\Column(nullable: true)]
private ?int $hotelBusProId = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $assignmentDate = null;
private ?\DateTimeImmutable $assignmentDateFrom = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $assignmentDateTo = null;
#[ORM\Column]
#[Assert\Count(min: 1, minMessage: 'Bitte gib eine Bewertung ab')]
@@ -69,10 +81,17 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
{
$instance = new static($user);
$destination = $assignment->getDestination();
$jobProfile = $assignment->getJobProfile();
$instance
->setDestinationName($assignment->getDestination()->getProduct())
->setAssignmentDate($assignment->getEffectiveDateFrom())
->setJobProfileName($assignment->getJobProfile()->getName())
->setAssignmentDateFrom($assignment->getEffectiveDateFrom())
->setAssignmentDateTo($assignment->getEffectiveDateTo())
->setDestinationName($destination->getProduct())
->setHotel($destination->getHotel())
->setHotelCode($destination->getHotelCode())
->setHotelBusProId($destination->getHotelBusProId())
->setJobProfileName($jobProfile->getName())
;
return $instance;
@@ -124,14 +143,26 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
return $this;
}
public function getAssignmentDate(): ?\DateTimeImmutable
public function getAssignmentDateFrom(): ?\DateTimeImmutable
{
return $this->assignmentDate;
return $this->assignmentDateFrom;
}
public function setAssignmentDate(\DateTimeImmutable $assignmentDate): static
public function setAssignmentDateFrom(\DateTimeImmutable $assignmentDateFrom): static
{
$this->assignmentDate = $assignmentDate;
$this->assignmentDateFrom = $assignmentDateFrom;
return $this;
}
public function getAssignmentDateTo(): ?\DateTimeImmutable
{
return $this->assignmentDateTo;
}
public function setAssignmentDateTo(?\DateTimeImmutable $assignmentDateTo): static
{
$this->assignmentDateTo = $assignmentDateTo;
return $this;
}
@@ -148,6 +179,42 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
return $this;
}
public function getHotel(): ?string
{
return $this->hotel;
}
public function setHotel(?string $hotel): static
{
$this->hotel = $hotel;
return $this;
}
public function getHotelCode(): ?string
{
return $this->hotelCode;
}
public function setHotelCode(?string $hotelCode): static
{
$this->hotelCode = $hotelCode;
return $this;
}
public function getHotelBusProId(): ?int
{
return $this->hotelBusProId;
}
public function setHotelBusProId(?int $hotelBusProId): static
{
$this->hotelBusProId = $hotelBusProId;
return $this;
}
public function getRatings(): array
{
return $this->ratings;