diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d6c1c831..91e0083c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ and this project adheres to ## Unreleased +* [ACL] fix allow to see the course, event if the scope'course does not contains the scope's user +* [search] enforce limit of results for fetching rsults by search api https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/576 +* [activity] Fix delete button for document (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/554) +* [activity] Add return path the document generation (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/553) +* [person] add person ressource to person docgen normaliser (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/517) +* [person] AccompanyingCourseWorkEdit: fix deleting evaluation documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/546) +* [person] AccompanyingCourseWorkEdit: download existing documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/512) +* [person] AccompanyingCourseWorkEdit: replace document by a new one (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/511) +* [person] AccompanyingPeriodWork: add referrers to work, add doctrine event listener to add logged user to referrers collection and display a referrers list in work list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/502) * [person] AccompanyingPeriodWorkEvaluation: fix circular reference when serialising (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/495) * [person] order accompanying period by opening date in search persons, person and household period lists (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/493) * [parcours] autosave of the pinned comment for draft accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/477) @@ -46,9 +55,13 @@ and this project adheres to * [contact] add contact button color changed plus the pipe at the side removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/506) * [household] create-edit household composition placed in separate page to avoid confusion (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/505) * [blur] Improved positioning of toggle icon (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/486) +* [parcours] List of parcours for a specific user so they can be reassigned in case of absence (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/509) * [thirdparty] Thirdparty view page, english text translated (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/534) * [social_action] Translation changed in evaluation section (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/512) * [filiation] Possible to add person (or create onthefly) to add to filiation graph + add relation (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/519) +* [household] Within parcours listing page of household add create button (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/560) +* [person_resource] bugfix when adding thirdparty or freetext resource (no issue) +* [aside_activity] style correction + sticky-form create button (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/529) ## Test releases diff --git a/phpstan-types.neon b/phpstan-types.neon index ddde5cc03..9671c05a5 100644 --- a/phpstan-types.neon +++ b/phpstan-types.neon @@ -250,11 +250,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Entity/Address.php - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 1 - path: src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 1 diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 3858979ef..a89b1d67c 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -179,14 +179,15 @@ final class ActivityController extends AbstractController { $view = null; - [$person, $accompanyingPeriod] = $this->getEntity($request); - $entity = $this->activityRepository->find($id); if (null === $entity) { throw $this->createNotFoundException('Unable to find Activity entity.'); } + $accompanyingPeriod = $entity->getAccompanyingPeriod(); + $person = $entity->getPerson(); + if ($entity->getAccompanyingPeriod() instanceof AccompanyingPeriod) { $view = 'ChillActivityBundle:Activity:editAccompanyingCourse.html.twig'; $accompanyingPeriod = $entity->getAccompanyingPeriod(); @@ -220,6 +221,9 @@ final class ActivityController extends AbstractController $this->entityManager->persist($entity); $this->entityManager->flush(); + $params = $this->buildParamsToUrl($person, $accompanyingPeriod); + $params['id'] = $entity->getId(); + if ($form->has('gendocTemplateId') && null !== $form['gendocTemplateId']->getData()) { return $this->redirectToRoute( 'chill_docgenerator_generate_from_template', @@ -227,15 +231,13 @@ final class ActivityController extends AbstractController 'template' => $form->get('gendocTemplateId')->getData(), 'entityClassName' => Activity::class, 'entityId' => $entity->getId(), + 'returnPath' => $this->generateUrl('chill_activity_activity_edit', $params), ] ); } $this->addFlash('success', $this->get('translator')->trans('Success : activity updated!')); - $params = $this->buildParamsToUrl($person, $accompanyingPeriod); - $params['id'] = $entity->getId(); - return $this->redirectToRoute('chill_activity_activity_show', $params); } @@ -444,6 +446,9 @@ final class ActivityController extends AbstractController 'template' => $form->get('gendocTemplateId')->getData(), 'entityClassName' => Activity::class, 'entityId' => $entity->getId(), + 'returnPath' => $this->generateUrl('chill_activity_activity_edit', [ + 'id' => $entity->getId(), + ]), ] ); } diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 6f935ad99..891eb8577 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -305,6 +305,7 @@ class ActivityType extends AbstractType 'label' => $activityType->getLabel('documents'), 'required' => $activityType->isRequired('documents'), 'allow_add' => true, + 'allow_delete' => true, 'button_add_label' => 'activity.Insert a document', 'button_remove_label' => 'activity.Remove a document', 'empty_collection_explain' => 'No documents', diff --git a/src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss b/src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss new file mode 100644 index 000000000..16e66eadb --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss @@ -0,0 +1,16 @@ +div.chill-dropzone__below-zone { + a.btn-delete { + display: none; + } +} + +// do it in js does not work +// document.addEventListener('DOMContentLoaded', e => { +// const dropzoneBelow = document.querySelectorAll('div.chill-dropzone__below-zone'); +// dropzoneBelow.forEach( +// d => { +// const a = d.querySelector('a.btn-delete'); +// d.removeChild(a); +// } +// ) +// }); diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig index b278c0300..d0359e223 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig @@ -30,4 +30,5 @@ {{ parent() }} {{ encore_entry_link_tags('mod_async_upload') }} {{ encore_entry_link_tags('vue_activity') }} + {{ encore_entry_link_tags('page_edit_activity') }} {% endblock %} diff --git a/src/Bundle/ChillActivityBundle/chill.webpack.config.js b/src/Bundle/ChillActivityBundle/chill.webpack.config.js index f312e8a19..eec983920 100644 --- a/src/Bundle/ChillActivityBundle/chill.webpack.config.js +++ b/src/Bundle/ChillActivityBundle/chill.webpack.config.js @@ -7,5 +7,7 @@ module.exports = function(encore, entries) ChillActivityAssets: __dirname + '/Resources/public' }); + encore.addEntry('page_edit_activity', __dirname + '/Resources/public/page/edit_activity/index.scss'); + encore.addEntry('vue_activity', __dirname + '/Resources/public/vuejs/Activity/index.js'); }; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig index 6cc45aeaf..4dd12e042 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/index.html.twig @@ -40,7 +40,7 @@ {% endif %} -
+