closed step added + form/controller/template basic start

This commit is contained in:
2021-11-18 14:46:33 +01:00
parent 0a522b465f
commit 5928215c0d
5 changed files with 91 additions and 0 deletions

View File

@@ -94,6 +94,14 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
*/
public const STEP_CONFIRMED = 'CONFIRMED';
/**
* Mark an accompanying period as "closed".
*
* This means that the accompanying period **is**
* closed by the creator
*/
public const STEP_CLOSED = 'CLOSED';
/**
* @var integer
*
@@ -117,6 +125,8 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
*
* @ORM\Column(type="date", nullable=true)
* @Groups({"read", "write"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CLOSED})
* @Assert\GreaterThan(propertyPath="openingDate", groups={AccompanyingPeriod::STEP_CLOSED})
*/
private $closingDate = null;
@@ -166,6 +176,7 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
* targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive")
* @ORM\JoinColumn(nullable=true)
* @Groups({"read", "write"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CLOSED})
*/
private $closingMotive = null;