mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
improves create a person with address
* validation: must have an address when 'create a form' is checked; * minor improvements
This commit is contained in:
@@ -35,7 +35,7 @@ class HouseholdMember
|
||||
/**
|
||||
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
* @Assert\GreaterThan(
|
||||
* @Assert\GreaterThanOrEqual(
|
||||
* propertyPath="startDate",
|
||||
* message="household_membership.The end date must be after start date",
|
||||
* groups={"household_memberships"}
|
||||
@@ -202,7 +202,7 @@ class HouseholdMember
|
||||
|
||||
public function setPosition(?Position $position): self
|
||||
{
|
||||
if ($this->position instanceof Position) {
|
||||
if ($this->position instanceof Position && $this->position !== $position) {
|
||||
throw new LogicException('The position is already set. You cannot change ' .
|
||||
'a position of a membership');
|
||||
}
|
||||
|
Reference in New Issue
Block a user