wip: functionality for new role 'management'
This commit is contained in:
+75
-8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user