diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkDuplicateController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkDuplicateController.php index 8d373626a..8cece72c2 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkDuplicateController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkDuplicateController.php @@ -33,16 +33,6 @@ class AccompanyingPeriodWorkDuplicateController extends AbstractController public function assignDuplicate(AccompanyingPeriodWork $acpw, Request $request) { $accompanyingPeriod = $acpw->getAccompanyingPeriod(); -/* $acpwArray = $this->accompanyingPeriodWorkRepository->findByAccompanyingPeriod($accompanyingPeriod); - - $acpwArray = array_map(function ($acpw) { - return [ - 'id' => $acpw->getId(), - 'socialAction' => $this->stringHelper->localize($acpw->getSocialAction()->getTitle()), - 'startDate' => $acpw->getStartDate(), - 'endDate' => $acpw->getEndDate(), - ]; - }, $acpwArray);*/ $this->denyAccessUnlessGranted( 'CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', @@ -55,6 +45,7 @@ class AccompanyingPeriodWorkDuplicateController extends AbstractController $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { + dump($form->get('acpw')->getData()); $acpw2 = $this->accompanyingPeriodWorkRepository->find($form->get('acpw')->getData()); $direction = $form->get('direction')->getData(); diff --git a/src/Bundle/ChillPersonBundle/Form/FindAccompanyingPeriodWorkType.php b/src/Bundle/ChillPersonBundle/Form/FindAccompanyingPeriodWorkType.php index c5ffa5406..49da088b9 100644 --- a/src/Bundle/ChillPersonBundle/Form/FindAccompanyingPeriodWorkType.php +++ b/src/Bundle/ChillPersonBundle/Form/FindAccompanyingPeriodWorkType.php @@ -27,13 +27,13 @@ class FindAccompanyingPeriodWorkType extends AbstractType } public function buildForm(FormBuilderInterface $builder, array $options) { - $accompanyingPeriod = $options['accompanyingPeriod']; - $suggestedAcpw = $this->repository->findByAccompanyingPeriod($accompanyingPeriod); +// $accompanyingPeriod = $options['accompanyingPeriod']; +// $suggestedAcpw = $this->repository->findByAccompanyingPeriod($accompanyingPeriod); $builder ->add('acpw', PickLinkedAccompanyingPeriodWorkType::class, [ 'label' => 'Accompanying period work', - 'suggested' => $suggestedAcpw, +// 'suggested' => $suggestedAcpw, 'multiple' => false, ]) ->add('direction', HiddenType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue index a0687a637..6a7a71579 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkList.vue @@ -4,7 +4,7 @@