From 9a9ed642984f9a9fba1872f2ae5220a835c3eec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 3 Feb 2022 12:54:44 +0100 Subject: [PATCH 01/15] fix on test after creating an activity without generating a document --- .../ChillActivityBundle/Controller/ActivityController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index d46136173..3858979ef 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -220,7 +220,7 @@ final class ActivityController extends AbstractController $this->entityManager->persist($entity); $this->entityManager->flush(); - if ($form->has('gendocTemplateId') && '' !== $form['gendocTemplateId']) { + if ($form->has('gendocTemplateId') && null !== $form['gendocTemplateId']->getData()) { return $this->redirectToRoute( 'chill_docgenerator_generate_from_template', [ @@ -437,7 +437,7 @@ final class ActivityController extends AbstractController $this->entityManager->persist($entity); $this->entityManager->flush(); - if ($form->has('gendocTemplateId') && '' !== $form['gendocTemplateId']) { + if ($form->has('gendocTemplateId') && null !== $form['gendocTemplateId']->getData()) { return $this->redirectToRoute( 'chill_docgenerator_generate_from_template', [ From 3f83c323bef837acd52504b0ab661fd213f5c605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 3 Feb 2022 13:16:13 +0100 Subject: [PATCH 02/15] fix creating workflow from document in accompanying course --- .../AccompanyingCourseDocument/_workflow.html.twig | 12 ++++++------ .../_components/EntityWorkflow/PickWorkflow.vue | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig index 0a1942f6d..2d7e99f75 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig @@ -8,14 +8,13 @@

{{ document.title }}

- {{ document.object.type }} - + {% if document.description is not empty %}
{{ document.description }}
{% endif %} - +
@@ -43,14 +42,15 @@ 'changeClass' string 'noText' boolean #} - {# vue component #} + {# vue component + > #} + {{ 'Edit'|trans }} {% else %} {{ 'Update document'|trans }} @@ -58,4 +58,4 @@ {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue index e74cd7ef2..826917fbb 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue @@ -47,7 +47,8 @@ export default { console.log('goToGenerateWorkflow', event, workflowName); if (!this.$props.preventDefaultMoveToGenerate) { - event.target.click(); + console.log('to go generate'); + window.location.assign(this.makeLink(workflowName)); } this.$emit('goToGenerateWorkflow', {event, workflowName, link: this.makeLink(workflowName)}); From 2343a4a3340b282f6dd81d42632d8655bfe9d068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 3 Feb 2022 13:49:52 +0100 Subject: [PATCH 03/15] add links between document in workflow and course --- .../AccompanyingCourseDocument/_workflow.html.twig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig index 2d7e99f75..6c664b314 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig @@ -31,6 +31,13 @@ {% if display_action is defined and display_action == true %} {% endif %} From f9b514c8692fbab5e273611852e8c22e2c1ef7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 7 Feb 2022 11:22:35 +0100 Subject: [PATCH 04/15] fix assertion of type. https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/266 --- .../Household/HouseholdMembershipSequentialValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php index 89a9ba9a9..c357cb138 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php @@ -36,7 +36,7 @@ class HouseholdMembershipSequentialValidator extends ConstraintValidator public function validate($person, Constraint $constraint) { if (!$person instanceof Person) { - throw new UnexpectedTypeException($constraint, Person::class); + throw new UnexpectedTypeException($person, Person::class); } $participations = $person->getHouseholdParticipationsShareHousehold(); From 03007370bc4afe4304e9a8d1fd919545c8e9ffc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 7 Feb 2022 17:44:03 +0100 Subject: [PATCH 05/15] fix "impossible to confirm a course" In some case, the "confirm" button for the form AccompanyingCourse was disable, due to wrong condition. This commit also fixes the filtering for users, and allow to remove a user associated with an accompanyingCourse. --- .../Resources/public/vuejs/_js/i18n.js | 6 +- .../AccompanyingCourse/components/Confirm.vue | 18 +- .../components/Referrer.vue | 266 +++++++++--------- .../vuejs/AccompanyingCourse/js/i18n.js | 2 +- .../vuejs/AccompanyingCourse/store/index.js | 57 ++-- 5 files changed, 189 insertions(+), 160 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index c1eac0b06..0f2b52568 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -91,11 +91,11 @@ export const multiSelectMessages = { multiselect: { placeholder: 'Choisir', tag_placeholder: 'Créer un nouvel élément', - select_label: 'Appuyer sur "Entrée" pour sélectionner', - deselect_label: 'Appuyer sur "Entrée" pour désélectionner', + select_label: '"Entrée" ou cliquez pour sélectionner', + deselect_label: '"Entrée" ou cliquez pour désélectionner', select_group_label: 'Appuyer sur "Entrée" pour sélectionner ce groupe', deselect_group_label: 'Appuyer sur "Entrée" pour désélectionner ce groupe', selected_label: 'Sélectionné' } } -}; \ No newline at end of file +}; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue index faba287c5..d12bd1184 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue @@ -60,14 +60,14 @@