WIP: Implement application process
This commit is contained in:
+25
-11
@@ -4,7 +4,6 @@ namespace App\Entity;
|
||||
|
||||
use App\Entity\Traits\BlameableEntity;
|
||||
use App\Entity\Traits\TimestampableEntity;
|
||||
use App\Model\BenefitsDto;
|
||||
use App\Repository\AssignmentRepository;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
@@ -38,7 +37,10 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
#[Assert\Range(min: 1, minMessage: 'Die Mindestanzahl ist 1')]
|
||||
private ?int $available = 1;
|
||||
private ?int $availableDispositions = 1;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $showAvailableDispositions = false;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
|
||||
private ?\DateTimeImmutable $dateFrom = null;
|
||||
@@ -53,8 +55,8 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $pickup = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private array $benefits;
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $benefits;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $remarks = null;
|
||||
@@ -78,7 +80,7 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
$this->fees = new ArrayCollection();
|
||||
$this->applications = new ArrayCollection();
|
||||
$this->dispositions = new ArrayCollection();
|
||||
$this->benefits = BenefitsDto::$defaults;
|
||||
$this->benefits = "Anreise im E&P Reisebus\nUnterkunft\nVerpflegung\nSkipass\n";
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
@@ -115,14 +117,26 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAvailable(): ?int
|
||||
public function getAvailableDispositions(): ?int
|
||||
{
|
||||
return $this->available;
|
||||
return $this->availableDispositions;
|
||||
}
|
||||
|
||||
public function setAvailable(?int $available): static
|
||||
public function setAvailableDispositions(?int $availableDispositions): static
|
||||
{
|
||||
$this->available = $available;
|
||||
$this->availableDispositions = $availableDispositions;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isShowAvailableDispositions(): ?bool
|
||||
{
|
||||
return $this->showAvailableDispositions;
|
||||
}
|
||||
|
||||
public function setShowAvailableDispositions(bool $showAvailableDispositions): static
|
||||
{
|
||||
$this->showAvailableDispositions = $showAvailableDispositions;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -184,12 +198,12 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getBenefits(): array
|
||||
public function getBenefits(): ?string
|
||||
{
|
||||
return $this->benefits;
|
||||
}
|
||||
|
||||
public function setBenefits(array $benefits): static
|
||||
public function setBenefits(?string $benefits): static
|
||||
{
|
||||
$this->benefits = $benefits;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user