mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
person: create a person with address and attribute the household to the create ousehold button
This commit is contained in:
parent
f2c60cfd20
commit
3ed562e5d9
@ -251,18 +251,6 @@ final class PersonController extends AbstractController
|
|||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
$this->lastPostDataReset();
|
$this->lastPostDataReset();
|
||||||
|
|
||||||
if ($form->get('createPeriod')->isClicked()) {
|
|
||||||
return $this->redirectToRoute('chill_person_accompanying_course_new', [
|
|
||||||
'person_id' => [$person->getId()],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($form->get('createHousehold')->isClicked()) {
|
|
||||||
return $this->redirectToRoute('chill_person_household_members_editor', [
|
|
||||||
'persons' => [$person->getId()],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$address = $form->get('address')->getData();
|
$address = $form->get('address')->getData();
|
||||||
$addressForm = $form->get('addressForm')->getData();
|
$addressForm = $form->get('addressForm')->getData();
|
||||||
|
|
||||||
@ -279,6 +267,25 @@ final class PersonController extends AbstractController
|
|||||||
$this->em->persist($member);
|
$this->em->persist($member);
|
||||||
$this->em->persist($household);
|
$this->em->persist($household);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
|
if ($form->get('createHousehold')->isClicked()) {
|
||||||
|
return $this->redirectToRoute('chill_person_household_members_editor', [
|
||||||
|
'persons' => [$person->getId()],
|
||||||
|
'household' => $household->getId()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($form->get('createPeriod')->isClicked()) {
|
||||||
|
return $this->redirectToRoute('chill_person_accompanying_course_new', [
|
||||||
|
'person_id' => [$person->getId()],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($form->get('createHousehold')->isClicked()) {
|
||||||
|
return $this->redirectToRoute('chill_person_household_members_editor', [
|
||||||
|
'persons' => [$person->getId()],
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirectToRoute(
|
return $this->redirectToRoute(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user