fix: correctly assign items to timeline
This commit is contained in:
1 parent
ecc059cefc
commit
da18856cc2
4 files changed
+63
-50
No files matched your search
@@ -10,6 +10,7 @@ class TimelineItem
|
||||
public const TYPE_ASSIGNMENT = 'assignment';
|
||||
public const TYPE_DISPOSITION = 'disposition';
|
||||
|
||||
private ?int $dispositionId = null;
|
||||
private ?\DateTimeImmutable $dateFrom = null;
|
||||
private ?\DateTimeImmutable $dateTo = null;
|
||||
private ?string $status = null;
|
||||
@@ -44,6 +45,7 @@ class TimelineItem
|
||||
$dateTo = $assignment->getDestination()->getDateTo();
|
||||
|
||||
return (new static($assignment->getId(), static::TYPE_DISPOSITION))
|
||||
->setDispositionId($disposition->getId())
|
||||
->setDateFrom($dateFrom)
|
||||
->setDateTo($dateTo)
|
||||
->setJobProfile($assignment->getJobProfile()->getName())
|
||||
@@ -64,6 +66,18 @@ class TimelineItem
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function getDispositionId(): ?int
|
||||
{
|
||||
return $this->dispositionId;
|
||||
}
|
||||
|
||||
public function setDispositionId(?int $dispositionId): static
|
||||
{
|
||||
$this->dispositionId = $dispositionId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDateFrom(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->dateFrom;
|
||||
|
||||
Reference in new issue
Block a user