rdv: others pages: edit, list

This commit is contained in:
nobohan
2021-07-19 17:18:56 +02:00
parent d4ec5d137e
commit 7e02b284ca
8 changed files with 157 additions and 125 deletions

View File

@@ -16,6 +16,8 @@ use Chill\CalendarBundle\Entity\CalendarRange;
use Chill\CalendarBundle\Entity\Invite;
use Chill\ActivityBundle\Entity\Activity;
use Chill\CalendarBundle\Repository\CalendarRepository;
use DateInterval;
use DateTimeImmutable;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Mapping\ClassMetadata;
@@ -51,7 +53,7 @@ class Calendar
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private User $mainUser;
private ?User $mainUser;
/**
*
@@ -416,7 +418,6 @@ class Calendar
return $this->getInvites(); //TODO get users of the invite
}
public static function loadValidatorMetadata(ClassMetadata $metadata): void
{
$metadata->addPropertyConstraint('startDate', new NotBlank());