From 4fa1bb4341b6570f87bb7126cf1fb9915174cf88 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 12:45:02 +0100 Subject: [PATCH 01/66] demandeur not displayed in search list if anonymous --- .../views/Person/list_with_period.html.twig | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index 6f107a593..708766dc2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -99,11 +99,12 @@ {% endif %}
- {% if acp.requestorPerson == person %} + {% if acp.requestoranonymous == false and acp.requestorPerson == person %} {{ 'Requestor'|trans({'gender': person.gender}) }} {% endif %} + {% if acp.emergency %} {{- 'Emergency'|trans|upper -}} {% endif %} @@ -186,39 +187,39 @@ - - {% if (acp.requestorPerson is not null and acp.requestorPerson.id != person.id) or acp.requestorThirdParty is not null %} -
-
-

- {% if acp.requestorPerson is not null %} - {{ 'Requestor'|trans({'gender': acp.requestorPerson.gender}) }} + {% if acp.requestoranonymous == false %} + {% if (acp.requestorPerson is not null and acp.requestorPerson.id != person.id) or acp.requestorThirdParty is not null %} +
+
+

+ {% if acp.requestorPerson is not null %} + {{ 'Requestor'|trans({'gender': acp.requestorPerson.gender}) }} + {% else %} + {{ 'Requestor'|trans({'gender': 'other'})}} + {% endif %} +

+
+
+ {% if acp.requestorThirdParty is not null %} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + targetEntity: { name: 'thirdparty', id: acp.requestorThirdParty.id }, + action: 'show', + displayBadge: true, + buttonText: acp.requestorThirdParty|chill_entity_render_string + } %} {% else %} - {{ 'Requestor'|trans({'gender': 'other'})}} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + targetEntity: { name: 'person', id: acp.requestorPerson.id }, + action: 'show', + displayBadge: true, + buttonText: acp.requestorPerson|chill_entity_render_string, + isDead: acp.requestorPerson.deathdate is not null + } %} {% endif %} -

+
-
- {% if acp.requestorThirdParty is not null %} - {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { - targetEntity: { name: 'thirdparty', id: acp.requestorThirdParty.id }, - action: 'show', - displayBadge: true, - buttonText: acp.requestorThirdParty|chill_entity_render_string - } %} - {% else %} - {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { - targetEntity: { name: 'person', id: acp.requestorPerson.id }, - action: 'show', - displayBadge: true, - buttonText: acp.requestorPerson|chill_entity_render_string, - isDead: acp.requestorPerson.deathdate is not null - } %} - {% endif %} -
-
+ {% endif %} {% endif %} - {% endfor %} From 68d99050bc7554702dc594929429257e03797746 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:06:59 +0100 Subject: [PATCH 02/66] commentfield for marital status is always visible --- .../ChillPersonBundle/Resources/views/Person/edit.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig index d394a75a8..dc71d9981 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig @@ -85,9 +85,11 @@
{{ form_row(form.maritalStatusDate, { 'label' : 'Date of last marital status change'} ) }} - {{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }}
{%- endif -%} +
+ {{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }} +
{%- endif -%} From faebb0fe30a7597d03dbc0a82d18436a83a9f3a7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:08:55 +0100 Subject: [PATCH 03/66] changelog updated --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcd149841..92e3085e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ and this project adheres to * [parcours]: component added to change the opening date of a parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/411) * [search]: listing of parcours display changed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/410) * [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408) - +* [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421) +* [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424) ## Test releases From bc1a63354cfd497fa6cab56142b7e675c279ec7d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:11:25 +0100 Subject: [PATCH 04/66] php csfixes --- .../Controller/UserAccompanyingPeriodController.php | 11 ++++++----- .../ChillPersonBundle/Entity/AccompanyingPeriod.php | 2 +- src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php | 3 --- .../Repository/AccompanyingPeriodRepository.php | 10 +++++----- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php index ddaf1b856..aa849ac2b 100644 --- a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php @@ -9,7 +9,6 @@ declare(strict_types=1); - namespace Chill\PersonBundle\Controller; use Chill\MainBundle\Pagination\PaginatorFactory; @@ -20,7 +19,6 @@ use Symfony\Component\Routing\Annotation\Route; class UserAccompanyingPeriodController extends AbstractController { - private AccompanyingPeriodRepository $accompanyingPeriodRepository; private PaginatorFactory $paginatorFactory; @@ -38,13 +36,16 @@ class UserAccompanyingPeriodController extends AbstractController { $total = $this->accompanyingPeriodRepository->countBy(['user' => $this->getUser()]); $pagination = $this->paginatorFactory->create($total); - $accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(['user' => $this->getUser()], - ['openingDate' => 'DESC'], $pagination->getItemsPerPage(), $pagination->getCurrentPageFirstItemNumber()); + $accompanyingPeriods = $this->accompanyingPeriodRepository->findBy( + ['user' => $this->getUser()], + ['openingDate' => 'DESC'], + $pagination->getItemsPerPage(), + $pagination->getCurrentPageFirstItemNumber() + ); return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [ 'accompanyingPeriods' => $accompanyingPeriods, 'pagination' => $pagination, ]); - } } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index c457d2863..e7a1c514b 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -212,7 +212,7 @@ class AccompanyingPeriod implements * * @ORM\Column(type="date") * @Groups({"read", "write", "docgen:read"}) - * @Assert\LessThan(value= "today", groups={AccompanyingPeriod::STEP_CONFIRMED}) + * @Assert\LessThan(value="today", groups={AccompanyingPeriod::STEP_CONFIRMED}) * @Assert\LessThan(propertyPath="closingDate", groups={AccompanyingPeriod::STEP_CONFIRMED}) */ private ?DateTime $openingDate = null; diff --git a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php index 3e56b423c..0a9d2a31c 100644 --- a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php @@ -12,9 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Menu; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; -use Chill\TaskBundle\Templating\UI\CountNotificationTask; use Knp\Menu\MenuItem; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -25,7 +23,6 @@ class UserMenuBuilder implements LocalMenuBuilderInterface */ public $authorizationChecker; - /** * @var TranslatorInterface */ diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index 9554f2a3b..edb4b4f3d 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -26,6 +26,11 @@ final class AccompanyingPeriodRepository implements ObjectRepository $this->repository = $entityManager->getRepository(AccompanyingPeriod::class); } + public function countBy(array $criteria): int + { + return $this->repository->count($criteria); + } + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); @@ -49,11 +54,6 @@ final class AccompanyingPeriodRepository implements ObjectRepository return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function countBy(array $criteria): int - { - return $this->repository->count($criteria); - } - public function findOneBy(array $criteria): ?AccompanyingPeriod { return $this->findOneBy($criteria); From 695d22adbad74e7af87f148207a02542a729343c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:39:52 +0100 Subject: [PATCH 05/66] bugfix creation of person or thirdparty through onTheFly --- .../Resources/public/vuejs/_components/AddPersons.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 59647e160..c880ad2fd 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -299,6 +299,7 @@ export default { } }) } + this.canCloseOnTheFlyModal = false; } }, } From 15393d9da903188a32beb08e084ab609e55882d1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:45:41 +0100 Subject: [PATCH 06/66] changelog updated with bugfix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e3085e8..fe26e1978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to * [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408) * [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421) * [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424) +* [bugfix]: modal closes and newly created person/thirdparty is selected when multiple persons/thirdparties are created through the modal (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/429) ## Test releases From f358e78734c5195d8dc8877b25f8b33f7037c558 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 14:39:40 +0100 Subject: [PATCH 07/66] onthefly button added to view person or thirdparty + badge changed if thirdparty is a contact --- .../views/PersonResource/list.html.twig | 31 ++++++++++++++++--- .../translations/messages.fr.yml | 1 + 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig index 820da9179..bb8a88606 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig @@ -32,10 +32,14 @@ {% elseif resource.thirdparty is not null %}
{{ resource.thirdparty }} - + + {% if resource.thirdparty.parent is not null %} + {{ 'Contact person'|trans|capitalize }} + {% else %} {{ 'thirdparty'|trans|capitalize }} - - + {% endif %} + +
{% else %}
@@ -56,7 +60,7 @@
{% endif %} - {% if is_granted('CHILL_PERSON_UPDATE', resource.person) %} + {% if is_granted('CHILL_PERSON_UPDATE', resource.personOwner) %}
    @@ -72,6 +76,25 @@ class="btn btn-sm btn-delete" title="{{ 'Delete'|trans }}"> +
  • + {% if resource.person is not null %} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: false, + targetEntity: { name: 'person', id: resource.person.id }, + } %} + + {% endif %} + {% if resource.thirdparty is not null %} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: false, + targetEntity: { name: 'thirdparty', id: resource.thirdparty.id }, + parent: resource.thirdparty.parent + } %} + + {% endif %} +
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index a2a5121a6..510dc1a64 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -237,6 +237,7 @@ no comment found: "Aucun commentaire" Select a type: "Choisissez un type" Select a person: "Choisissez un usager" Select a thirdparty: "Choisissez un tiers" +Contact person: "Personne de contact" # pickAPersonType From 0383571a9e1712627b921952e25fef4b04114a77 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 14:42:17 +0100 Subject: [PATCH 08/66] changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fcc5cd90..8a5bdafb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to * [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408) * [person] age added to renderstring + renderbox/ vue component created to display person text (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/389) * [household member editor] allow to push to existing household +* [person_resource]: Onthefly button added to view person/thirdparty and badge differentiation for a contact-thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/428) ## Test releases From e21ff588aee817cdbe5183c4ba4d0ab323fe478b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 14:42:54 +0100 Subject: [PATCH 09/66] csfixes --- src/Bundle/ChillActivityBundle/Entity/ActivityType.php | 2 +- src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php index 94f732a89..bdf75ed05 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php @@ -271,7 +271,7 @@ class ActivityType public function checkSocialActionsVisibility(ExecutionContextInterface $context, $payload) { if ($this->socialIssuesVisible !== $this->socialActionsVisible) { - if (!($this->socialIssuesVisible === 2 && $this->socialActionsVisible === 1)) { + if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) { $context ->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value') ->atPath('socialActionsVisible') diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index c457d2863..e7a1c514b 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -212,7 +212,7 @@ class AccompanyingPeriod implements * * @ORM\Column(type="date") * @Groups({"read", "write", "docgen:read"}) - * @Assert\LessThan(value= "today", groups={AccompanyingPeriod::STEP_CONFIRMED}) + * @Assert\LessThan(value="today", groups={AccompanyingPeriod::STEP_CONFIRMED}) * @Assert\LessThan(propertyPath="closingDate", groups={AccompanyingPeriod::STEP_CONFIRMED}) */ private ?DateTime $openingDate = null; From bdbb83ab851e381bba7435223ff5ac1f178edb37 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 31 Jan 2022 15:53:57 +0100 Subject: [PATCH 10/66] wip count comments --- .../Resources/views/Notification/_list_item.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig index 57784a20b..b87fd11e8 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig @@ -74,7 +74,7 @@ {# TODO twig extension to count comments #}
- x commentaires + 4 commentaires
From 1162c436c14a577b9e80196a8162361774b0a909 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 12:45:02 +0100 Subject: [PATCH 11/66] demandeur not displayed in search list if anonymous --- .../views/Person/list_with_period.html.twig | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index 109e2024a..86459337d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -99,11 +99,12 @@ {% endif %}
- {% if acp.requestorPerson == person %} + {% if acp.requestoranonymous == false and acp.requestorPerson == person %} {{ 'Requestor'|trans({'gender': person.gender}) }} {% endif %} + {% if acp.emergency %} {{- 'Emergency'|trans|upper -}} {% endif %} @@ -186,39 +187,39 @@ - - {% if (acp.requestorPerson is not null and acp.requestorPerson.id != person.id) or acp.requestorThirdParty is not null %} -
-
-

- {% if acp.requestorPerson is not null %} - {{ 'Requestor'|trans({'gender': acp.requestorPerson.gender}) }} + {% if acp.requestoranonymous == false %} + {% if (acp.requestorPerson is not null and acp.requestorPerson.id != person.id) or acp.requestorThirdParty is not null %} +
+
+

+ {% if acp.requestorPerson is not null %} + {{ 'Requestor'|trans({'gender': acp.requestorPerson.gender}) }} + {% else %} + {{ 'Requestor'|trans({'gender': 'other'})}} + {% endif %} +

+
+
+ {% if acp.requestorThirdParty is not null %} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + targetEntity: { name: 'thirdparty', id: acp.requestorThirdParty.id }, + action: 'show', + displayBadge: true, + buttonText: acp.requestorThirdParty|chill_entity_render_string + } %} {% else %} - {{ 'Requestor'|trans({'gender': 'other'})}} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + targetEntity: { name: 'person', id: acp.requestorPerson.id }, + action: 'show', + displayBadge: true, + buttonText: acp.requestorPerson|chill_entity_render_string, + isDead: acp.requestorPerson.deathdate is not null + } %} {% endif %} -

+
-
- {% if acp.requestorThirdParty is not null %} - {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { - targetEntity: { name: 'thirdparty', id: acp.requestorThirdParty.id }, - action: 'show', - displayBadge: true, - buttonText: acp.requestorThirdParty|chill_entity_render_string - } %} - {% else %} - {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { - targetEntity: { name: 'person', id: acp.requestorPerson.id }, - action: 'show', - displayBadge: true, - buttonText: acp.requestorPerson|chill_entity_render_string, - isDead: acp.requestorPerson.deathdate is not null - } %} - {% endif %} -
-
+ {% endif %} {% endif %} - {% endfor %} From af1c2687841c462ec988090da28d0e8e34092a4a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:06:59 +0100 Subject: [PATCH 12/66] commentfield for marital status is always visible --- .../ChillPersonBundle/Resources/views/Person/edit.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig index d394a75a8..dc71d9981 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig @@ -85,9 +85,11 @@
{{ form_row(form.maritalStatusDate, { 'label' : 'Date of last marital status change'} ) }} - {{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }}
{%- endif -%} +
+ {{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }} +
{%- endif -%} From 0689ca366d198391f4b8edce26023fd21f704b90 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:08:55 +0100 Subject: [PATCH 13/66] changelog updated --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a198c0929..78637ad4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,10 +29,14 @@ and this project adheres to * [parcours]: component added to change the opening date of a parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/411) * [search]: listing of parcours display changed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/410) * [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408) +* [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421) +* [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424) * [person] age added to renderstring + renderbox/ vue component created to display person text (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/389) * [household member editor] allow to push to existing household * [workflow][notification] improve how notifications and workflows are 'attached' to entities: contextual list, counter, buttons and vue modal +## Test releases + ### test release 2021-01-28 From 69dd920fd6468893e2f11a8b752bdbc89989ab45 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:11:25 +0100 Subject: [PATCH 14/66] php csfixes --- src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index d71ac2b9f..07fb859b7 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -213,7 +213,7 @@ class AccompanyingPeriod implements * * @ORM\Column(type="date") * @Groups({"read", "write", "docgen:read"}) - * @Assert\LessThan(value= "today", groups={AccompanyingPeriod::STEP_CONFIRMED}) + * @Assert\LessThan(value="today", groups={AccompanyingPeriod::STEP_CONFIRMED}) * @Assert\LessThan(propertyPath="closingDate", groups={AccompanyingPeriod::STEP_CONFIRMED}) */ private ?DateTime $openingDate = null; From b79885cd215165040c919e94693c0fe56a9d44d5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:39:52 +0100 Subject: [PATCH 15/66] bugfix creation of person or thirdparty through onTheFly --- .../Resources/public/vuejs/_components/AddPersons.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 3ef7b4037..f9b32f091 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -299,6 +299,7 @@ export default { } }) } + this.canCloseOnTheFlyModal = false; } }, } From 2eb1ebd2639870fdb1a4b5ffc094fa8a714d3729 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 13:45:41 +0100 Subject: [PATCH 16/66] changelog updated with bugfix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78637ad4b..aa0d8c08b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to * [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408) * [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421) * [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424) +* [bugfix]: modal closes and newly created person/thirdparty is selected when multiple persons/thirdparties are created through the modal (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/429) * [person] age added to renderstring + renderbox/ vue component created to display person text (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/389) * [household member editor] allow to push to existing household * [workflow][notification] improve how notifications and workflows are 'attached' to entities: contextual list, counter, buttons and vue modal From a4457664d45d215fed71142ea90fed1f1a70bfd9 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 18:33:29 +0100 Subject: [PATCH 17/66] bugfix addPersons --- .../public/vuejs/_components/AddPersons.vue | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index f9b32f091..3958e39ef 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -195,18 +195,18 @@ export default { setTimeout(function() { if (query === "") { - this.loadSuggestions([]); - return; + this.loadSuggestions([]); + return; } if (query === this.search.query) { - if (this.currentSearchQueryController !== undefined) { - this.currentSearchQueryController.abort() - } - this.currentSearchQueryController = new AbortController(); - searchEntities({ query, options: this.options }, this.currentSearchQueryController) + if (this.currentSearchQueryController !== undefined) { + this.currentSearchQueryController.abort() + } + this.currentSearchQueryController = new AbortController(); + searchEntities({ query, options: this.options }, this.currentSearchQueryController) .then(suggested => new Promise((resolve, reject) => { - this.loadSuggestions(suggested.results); - resolve(); + this.loadSuggestions(suggested.results); + resolve(); })); } }.bind(this), query.length > 3 ? 300 : 700); @@ -241,13 +241,14 @@ export default { return item.result.type + item.result.id; }, addPriorSuggestion() { - //console.log('addPriorSuggestion', this.hasPriorSuggestion); + // console.log('prior suggestion', this.priorSuggestion); if (this.hasPriorSuggestion) { - console.log('addPriorSuggestion',); + // console.log('addPriorSuggestion',); this.suggested.unshift(this.priorSuggestion); this.selected.unshift(this.priorSuggestion); - console.log('reset priorSuggestion'); + // console.log('selected', this.selected); + // console.log('suggested', this.suggested); this.newPriorSuggestion(null); } }, @@ -260,13 +261,14 @@ export default { result: entity } this.search.priorSuggestion = suggestion; - console.log('search priorSuggestion', this.search.priorSuggestion); + // console.log('search priorSuggestion', this.search.priorSuggestion); + this.addPriorSuggestion(suggestion) } else { this.search.priorSuggestion = {}; } }, saveFormOnTheFly({ type, data }) { - console.log('saveFormOnTheFly from addPersons, type', type, ', data', data); + // console.log('saveFormOnTheFly from addPersons, type', type, ', data', data); if (type === 'person') { makeFetch('POST', '/api/1.0/person/person.json', data) .then(response => { @@ -276,10 +278,10 @@ export default { .catch((error) => { if (error.name === 'ValidationException') { for (let v of error.violations) { - this.$toast.open({message: v }); + this.$toast.open({message: v }); } } else { - this.$toast.open({message: 'An error occurred'}); + this.$toast.open({message: 'An error occurred'}); } }) } @@ -292,10 +294,10 @@ export default { .catch((error) => { if (error.name === 'ValidationException') { for (let v of error.violations) { - this.$toast.open({message: v }); + this.$toast.open({message: v }); } } else { - this.$toast.open({message: 'An error occurred'}); + this.$toast.open({message: 'An error occurred'}); } }) } From a0bc6c76047a278f9d8157058f081194053e3c14 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 31 Jan 2022 18:47:06 +0100 Subject: [PATCH 18/66] csfixes --- .../Entity/ActivityType.php | 2 +- .../ChillMainBundle/Form/WorkflowStepType.php | 34 +++++++++---------- .../AccompanyingPeriodRepository.php | 10 +++--- .../public/vuejs/_components/AddPersons.vue | 4 +-- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php index 94f732a89..bdf75ed05 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php @@ -271,7 +271,7 @@ class ActivityType public function checkSocialActionsVisibility(ExecutionContextInterface $context, $payload) { if ($this->socialIssuesVisible !== $this->socialActionsVisible) { - if (!($this->socialIssuesVisible === 2 && $this->socialActionsVisible === 1)) { + if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) { $context ->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value') ->atPath('socialActionsVisible') diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php index 18ac10c47..b843890c2 100644 --- a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php +++ b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php @@ -76,32 +76,32 @@ class WorkflowStepType extends AbstractType 'expanded' => true, 'choices' => $choices, 'choice_label' => function (Transition $transition) use ($workflow) { - $meta = $workflow->getMetadataStore()->getTransitionMetadata($transition); + $meta = $workflow->getMetadataStore()->getTransitionMetadata($transition); - if (array_key_exists('label', $meta)) { - return $this->translatableStringHelper->localize($meta['label']); - } + if (array_key_exists('label', $meta)) { + return $this->translatableStringHelper->localize($meta['label']); + } - return $transition->getName(); - }, + return $transition->getName(); + }, 'choice_attr' => static function (Transition $transition) use ($workflow) { - $toFinal = true; + $toFinal = true; - foreach ($transition->getTos() as $to) { - $meta = $workflow->getMetadataStore()->getPlaceMetadata($to); + foreach ($transition->getTos() as $to) { + $meta = $workflow->getMetadataStore()->getPlaceMetadata($to); - if ( + if ( !array_key_exists('isFinal', $meta) || false === $meta['isFinal'] ) { - $toFinal = false; - } + $toFinal = false; } + } - return [ - 'data-is-transition' => 'data-is-transition', - 'data-to-final' => $toFinal ? '1' : '0', - ]; - }, + return [ + 'data-is-transition' => 'data-is-transition', + 'data-to-final' => $toFinal ? '1' : '0', + ]; + }, ]) ->add('future_dest_users', PickUserDynamicType::class, [ 'label' => 'workflow.dest for next steps', diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index 3f0c30e47..10b424cef 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -28,6 +28,11 @@ final class AccompanyingPeriodRepository implements ObjectRepository $this->repository = $entityManager->getRepository(AccompanyingPeriod::class); } + public function countBy(array $criteria): int + { + return $this->repository->count($criteria); + } + public function countByRecentUserHistory(User $user, DateTimeImmutable $since): int { $qb = $this->buildQueryByRecentUserHistory($user, $since); @@ -35,11 +40,6 @@ final class AccompanyingPeriodRepository implements ObjectRepository return $qb->select('count(a)')->getQuery()->getSingleScalarResult(); } - public function countBy(array $criteria): int - { - return $this->repository->count($criteria); - } - public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 3958e39ef..9e318ff96 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -247,8 +247,6 @@ export default { this.suggested.unshift(this.priorSuggestion); this.selected.unshift(this.priorSuggestion); - // console.log('selected', this.selected); - // console.log('suggested', this.suggested); this.newPriorSuggestion(null); } }, @@ -262,7 +260,7 @@ export default { } this.search.priorSuggestion = suggestion; // console.log('search priorSuggestion', this.search.priorSuggestion); - this.addPriorSuggestion(suggestion) + this.addPriorSuggestion(suggestion); } else { this.search.priorSuggestion = {}; } From 7d8bd089a21b8a47c29bc593d02c601436679634 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Feb 2022 10:09:48 +0100 Subject: [PATCH 19/66] double edit button removed --- .../Resources/views/HouseholdComposition/index.html.twig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig index 594863a64..ccd0ba1a9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig @@ -22,7 +22,7 @@

{{ c.householdCompositionType.label|localize_translatable_string }}

{{ 'household_composition.numberOfChildren'|trans }}: {{ c.numberOfChildren }}

-
{{ 'household_composition.Since'|trans({'startDate': c.startDate}) }}
+
{{ 'household_composition.Since'|trans({'startDate': c.startDate}) }}
@@ -45,7 +45,7 @@
  • - +
  • @@ -57,8 +57,8 @@ {{ form_widget(form) }}
      -
    • - {{ 'Cancel'|trans }} +
    • + {{ 'Cancel'|trans }}
    • From 930b6ff77e82a0876e3fbadfdae365e8fae273f8 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Feb 2022 10:17:08 +0100 Subject: [PATCH 20/66] minor style changes --- .../Resources/views/PersonResource/list.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig index bb8a88606..922c369e7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig @@ -23,7 +23,7 @@ {% for resource in personResources %}
      -
      +
      {% if resource.person is not null %}
      {{ resource.person }} @@ -47,7 +47,7 @@
      {% endif %}
      -
      +
      {% if resource.kind %} {{ resource.kind.title.fr|capitalize }} {% endif %} From e4d5e40a8bae8e384a677e7a38b879e27f2ed87e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 31 Jan 2022 18:59:33 +0100 Subject: [PATCH 21/66] improve homepage_widget tables with datas --- .../HomepageWidget/MyAccompanyingCourses.vue | 38 +++++++++++++++---- .../vuejs/HomepageWidget/MyEvaluations.vue | 6 ++- .../public/vuejs/HomepageWidget/MyTasks.vue | 37 ++++++++++++------ .../public/vuejs/HomepageWidget/MyWorks.vue | 21 +++++++++- .../public/vuejs/HomepageWidget/js/i18n.js | 9 ++++- .../ChillTaskBundle/Entity/SingleTask.php | 6 +++ 6 files changed, 95 insertions(+), 22 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue index 220588914..4292c3af5 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyAccompanyingCourses.vue @@ -3,16 +3,38 @@ {{ $t('no_data') }}