mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
rdv: add default status on rdv when creating a new rdv
This commit is contained in:
@@ -158,6 +158,7 @@ class CalendarController extends AbstractController
|
||||
|
||||
$entity = new Calendar();
|
||||
$entity->setUser($this->getUser());
|
||||
$entity->setStatus($entity::STATUS_VALID);
|
||||
|
||||
// if ($user instanceof User) {
|
||||
// $entity->setPerson($user);
|
||||
@@ -167,9 +168,6 @@ class CalendarController extends AbstractController
|
||||
$entity->setAccompanyingPeriod($accompanyingPeriod);
|
||||
}
|
||||
|
||||
// $entity->setType($activityType);
|
||||
// $entity->setDate(new \DateTime('now'));
|
||||
|
||||
$form = $this->createForm(CalendarType::class, $entity, [
|
||||
'accompanyingPeriod' => $accompanyingPeriod,
|
||||
])->handleRequest($request);
|
||||
@@ -191,7 +189,6 @@ class CalendarController extends AbstractController
|
||||
}
|
||||
|
||||
$entity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
||||
dump($entity_array);
|
||||
|
||||
return $this->render($view, [
|
||||
'user' => $user,
|
||||
|
Reference in New Issue
Block a user