From 6d382f93e85e719436e5633bdb3656746843ed5b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 26 Jan 2022 15:08:47 +0100 Subject: [PATCH 01/46] use pickDynamicUserType --- .../src/Form/AsideActivityFormType.php | 38 +++++++++++-------- .../views/asideActivity/new.html.twig | 13 ++++++- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index 5a4eec9e0..bfc8e02a6 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -17,6 +17,7 @@ use Chill\AsideActivityBundle\Templating\Entity\CategoryRender; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\ChillTextareaType; +use Chill\MainBundle\Form\Type\PickUserDynamicType; use DateInterval; use DateTime; use DateTimeImmutable; @@ -68,22 +69,27 @@ final class AsideActivityFormType extends AbstractType ]; $builder - ->add( - 'agent', - EntityType::class, - [ - 'label' => 'For agent', - 'required' => true, - 'class' => User::class, - 'data' => $this->storage->getToken()->getUser(), - 'query_builder' => static function (EntityRepository $er) { - return $er->createQueryBuilder('u')->where('u.enabled = true'); - }, - 'attr' => ['class' => 'select2 '], - 'placeholder' => 'Choose the agent for whom this activity is created', - 'choice_label' => 'username', - ] - ) + // ->add( + // 'agent', + // EntityType::class, + // [ + // 'label' => 'For agent', + // 'required' => true, + // 'class' => User::class, + // 'data' => $this->storage->getToken()->getUser(), + // 'query_builder' => static function (EntityRepository $er) { + // return $er->createQueryBuilder('u')->where('u.enabled = true'); + // }, + // 'attr' => ['class' => 'select2 '], + // 'placeholder' => 'Choose the agent for whom this activity is created', + // 'choice_label' => 'username', + // ] + // ) + ->add('agent', PickUserDynamicType::class, [ + 'multiple' => true, + 'label' => 'For agent', + 'required' => true, + ]) ->add( 'date', ChillDateType::class, diff --git a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig index 0781272a1..09acf9859 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig +++ b/src/Bundle/ChillAsideActivityBundle/src/Resources/views/asideActivity/new.html.twig @@ -1,5 +1,15 @@ {% extends '@ChillMain/Admin/layout.html.twig' %} +{% block js %} + {{ parent() }} + {{ encore_entry_script_tags('mod_pickentity_type') }} +{% endblock %} + +{% block css %} + {{ parent() }} + {{ encore_entry_link_tags('mod_pickentity_type') }} +{% endblock %} + {% block title %} {% include('@ChillMain/CRUD/_new_title.html.twig') %} {% endblock %} @@ -8,4 +18,5 @@ {% embed '@ChillMain/CRUD/_new_content.html.twig' %} {% block content_form_actions_save_and_show %}{% endblock %} {% endembed %} -{% endblock %} \ No newline at end of file +{% endblock %} + From 3656825d2024cf62d7197f9c34aa7c05a862586a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 26 Jan 2022 15:56:10 +0100 Subject: [PATCH 02/46] bug fix in form and controller --- .../ChillAsideActivityBundle/src/Form/AsideActivityFormType.php | 1 - .../ChillPersonBundle/Controller/PersonResourceController.php | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index bfc8e02a6..683adf8da 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -86,7 +86,6 @@ final class AsideActivityFormType extends AbstractType // ] // ) ->add('agent', PickUserDynamicType::class, [ - 'multiple' => true, 'label' => 'For agent', 'required' => true, ]) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php index 6b9b5dc6a..e35e94ac2 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php @@ -150,6 +150,8 @@ final class PersonResourceController extends AbstractController $comment = $form['comment']->getData(); $kind = $form['kind']->getData(); + dump($person); + $personResource->setKind($kind); $personResource->setPerson($person); $personResource->setThirdParty($thirdparty); From b38924cc3db5d78428d0d74f9f0e11032fa42d24 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 26 Jan 2022 16:04:09 +0100 Subject: [PATCH 03/46] Revert "Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles" This reverts commit 58c4e37116511032fc08ba1e1454cf32df5dea48. --- CHANGELOG.md | 1 - .../Resources/views/PersonResource/create.html.twig | 3 +-- .../Resources/views/PersonResource/list.html.twig | 9 ++++++--- .../ChillPersonBundle/translations/messages.fr.yml | 10 +++++----- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f2fb4a22..1b1e466b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ and this project adheres to * [parcours] comments truncated if too long + link added (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/406) * [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382) * [person ressources]: module added -* [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382) ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/create.html.twig index 46ba4ebef..6e05f2d6d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/create.html.twig @@ -1,6 +1,5 @@
-

{{ 'Add a person resource'|trans }}

{% include "@ChillPerson/PersonResource/form.html.twig" %}
@@ -12,4 +11,4 @@ -
+ \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig index d8a67912f..e67f2d79f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig @@ -17,8 +17,7 @@ {% block personcontent %}

{{ 'List of resources'|trans }}

- -{% if personResources|length > 0 %} +{% if personResources is not empty %} {% for resource in personResources %}
@@ -62,7 +61,9 @@ {% if resource.comment.comment is not null %}
-
{{ resource.comment|chill_entity_render_box }}
+
+
{{ resource.comment.comment }}
+
{% endif %} @@ -92,6 +93,8 @@

{{ 'There are no available resources'|trans }}

{% endif %} +

{{ 'Add a person resource'|trans }}

+ {% include "@ChillPerson/PersonResource/create.html.twig" %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index db00540da..6dc1c0b8d 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -225,15 +225,15 @@ Concerned scopes: Services concernés # person resource -person_resources_menu: "Personnes ressources" +person_resources_menu: "Ressources" Person resources: "Ressources de la personne" -Add a person resource: "Ajouter une personne ressource" -edit resource: "Modifier une personne ressource" -Remove resource: "Supprimer une personne ressource" +Add a person resource: "Ajouter une ressource" +edit resource: "Modifier ressource" +Remove resource: "Supprimer ressource" Are you sure you want to remove the resource for "%name%" ?: Étes-vous sûr de vouloir supprimer cette ressource de %name%? The resource has been successfully removed.: "La ressource a été supprimée." List of resources: "Liste des ressources" -There are no available resources: "Aucune personne ressources renseignée" +There are no available resources: "Aucun ressource" no comment found: "Aucun commentaire" Select a type: "Choisissez un type" Select a person: "Choisissez un usager" From b9c2d63a53653ac8731ef67fb9b4a3992b6bbc92 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 11:42:14 +0100 Subject: [PATCH 04/46] mes parcours page created --- .../UserAccompanyingPeriodController.php | 41 +++++++++++ .../Menu/UserMenuBuilder.php | 72 +++++++++++++++++++ .../user_periods_list.html.twig | 25 +++++++ .../ChillPersonBundle/config/routes.yaml | 4 ++ .../translations/messages.fr.yml | 3 + 5 files changed, 145 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php create mode 100644 src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_periods_list.html.twig diff --git a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php new file mode 100644 index 000000000..956849efc --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php @@ -0,0 +1,41 @@ +accompanyingPeriodRepository = $accompanyingPeriodRepository; + } + + public function listAction(Request $request) + { + $userId = $this->getUser()->getId(); + + $accompanyingPeriods = []; + $accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(['user' => $userId]); + + return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [ + 'accompanyingPeriods' => $accompanyingPeriods + ]); + + } +} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php new file mode 100644 index 000000000..9030b9264 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php @@ -0,0 +1,72 @@ +counter = $counter; + $this->tokenStorage = $tokenStorage; + $this->translator = $translator; + $this->authorizationChecker = $authorizationChecker; + } + + public function buildMenu($menuId, MenuItem $menu, array $parameters) + { + if ($this->authorizationChecker->isGranted('ROLE_USER')) { + $menu->addChild('My accompanying periods', [ + 'route' => 'chill_person_accompanying_period_user', + ]) + ->setExtras([ + 'order' => 20, + 'icon' => 'tasks', + ]); + } + } + + public static function getMenuIds(): array + { + return ['user']; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_periods_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_periods_list.html.twig new file mode 100644 index 000000000..12faf739a --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_periods_list.html.twig @@ -0,0 +1,25 @@ +{% extends "@ChillMain/layout.html.twig" %} + +{% set activeRouteKey = 'chill_person_accompanying_period_user_list' %} + +{% block title %}{{ 'Accompanying period list'|trans }}{% endblock title %} + +{% macro recordAction(period) %} +
  • + +
  • +{% endmacro %} + + +{% block content %} + +

    {{ 'Accompanying period list'|trans }}

    + +
    + {% for period in accompanyingPeriods %} + {% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period, 'recordAction': _self.recordAction(period)} %} + {% endfor %} +
    + +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/config/routes.yaml b/src/Bundle/ChillPersonBundle/config/routes.yaml index 13d1c1227..13539f6c2 100644 --- a/src/Bundle/ChillPersonBundle/config/routes.yaml +++ b/src/Bundle/ChillPersonBundle/config/routes.yaml @@ -55,6 +55,10 @@ chill_person_accompanying_period_re_open: path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::reOpenAction +chill_person_accompanying_period_user: + path: /{_locale}/accompanying-periods + controller: Chill\PersonBundle\Controller\UserAccompanyingPeriodController::listAction + chill_person_resource_list: path: /{_locale}/person/{person_id}/resources/list controller: Chill\PersonBundle\Controller\PersonResourceController::listAction diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 90d8da5cf..fe904cec4 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -533,3 +533,6 @@ household_composition: # docgen Linked evaluations: Évaluations associées + +# Accompanying period per user +My accompanying periods: Mes parcours From 14463dcd38afb4d7a29d62cc19e71eaa5075243f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 11:45:03 +0100 Subject: [PATCH 05/46] changelog updated --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1e466b6..d59109a0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,8 @@ and this project adheres to * [parcours] comments truncated if too long + link added (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/406) * [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382) -* [person ressources]: module added +* [person ressources]: module added (same as above?) +* [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408) ## Test releases From d70f8aa712cedf577b67f19687aae7bab8ac1179 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 11:50:26 +0100 Subject: [PATCH 06/46] phpstan fixes --- .../Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php | 2 +- src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php index e5a37c430..bd812e036 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php @@ -55,7 +55,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa $user = $this->userRepository->find($object->getUserId()); return [ - 'comment' => (string) $object->getComment(), + 'comment' => $object->getComment(), 'isNull' => false, 'date' => $this->normalizer->normalize($object->getDate(), $format, array_merge($context, [ 'docgen:expects' => DateTime::class, diff --git a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php index 9030b9264..e7dd210df 100644 --- a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php @@ -16,7 +16,7 @@ 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\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; class UserMenuBuilder implements LocalMenuBuilderInterface { From af3847366b58d0fe5b8125b19a2bd3b244f17132 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 12:33:50 +0100 Subject: [PATCH 07/46] adding age in renderbox and renderstring, implementation of renderbox option in household summary --- .../Resources/views/Entity/person.html.twig | 6 ++++++ .../views/Household/_render_member.html.twig | 1 + .../Templating/Entity/PersonRender.php | 13 ++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index 622318643..b60325bec 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -11,6 +11,7 @@ * addCenter bool * hLevel integer * addDeath bool + * addAgeBadge bool * address_multiline bool * customButtons [ 'before' Twig\Markup, (injected with macro) @@ -40,6 +41,11 @@ {%- endfor -%} {%- endif -%} + {%- if options['addAgeBadge'] -%} + {% if person.age is not null and person.deathDate is null %} + ({{- 'years_old'|trans({ 'age': person.age }) -}}) + {% endif %} + {% endif %} {% endmacro raw %} {% macro label(person, options) %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig index 5b41a15e3..fdd1e0717 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig @@ -14,6 +14,7 @@ 'render': 'label', 'addLink': true, 'addInfo': true, + 'addAgeBadge': true, 'customArea': { 'afterLabel': _self.addHolder(member.holder) } diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 6464500c2..ff239f0d6 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -15,6 +15,7 @@ use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; use Chill\PersonBundle\Entity\Person; use Symfony\Component\Templating\EngineInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; @@ -27,12 +28,16 @@ class PersonRender extends AbstractChillEntityRender private EngineInterface $engine; + private TranslatorInterface $translator; + public function __construct( ConfigPersonAltNamesHelper $configAltNamesHelper, - EngineInterface $engine + EngineInterface $engine, + TranslatorInterface $translator ) { $this->configAltNamesHelper = $configAltNamesHelper; $this->engine = $engine; + $this->translator = $translator; } /** @@ -53,6 +58,7 @@ class PersonRender extends AbstractChillEntityRender 'customButtons' => $options['customButtons'] ?? [], 'customArea' => $options['customArea'] ?? [], 'addDeath' => $options['addDeath'] ?? true, + 'addAgeBadge' => $options['addAgeBadge'] ?? false, ]; return @@ -70,6 +76,11 @@ class PersonRender extends AbstractChillEntityRender */ public function renderString($person, array $options): string { + if (null !== $person->getAge() && $person->getDeathDate() === null) { + return $person->getFirstName() . ' ' . $person->getLastName() + . $this->addAltNames($person, false) . ' (' . $this->translator->trans('years_old', ['age' => $person->getAge()]) . ')'; + } + return $person->getFirstName() . ' ' . $person->getLastName() . $this->addAltNames($person, false); } From 6ef7d9b47b31dc98308ff64e7d96fd8d1ce72f37 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 12:33:50 +0100 Subject: [PATCH 08/46] adding age in renderbox and renderstring, implementation of renderbox option in household summary --- .../Resources/views/Entity/person.html.twig | 6 ++++++ .../views/Household/_render_member.html.twig | 1 + .../Templating/Entity/PersonRender.php | 13 ++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index 622318643..b60325bec 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -11,6 +11,7 @@ * addCenter bool * hLevel integer * addDeath bool + * addAgeBadge bool * address_multiline bool * customButtons [ 'before' Twig\Markup, (injected with macro) @@ -40,6 +41,11 @@ {%- endfor -%} {%- endif -%} + {%- if options['addAgeBadge'] -%} + {% if person.age is not null and person.deathDate is null %} + ({{- 'years_old'|trans({ 'age': person.age }) -}}) + {% endif %} + {% endif %} {% endmacro raw %} {% macro label(person, options) %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig index 5b41a15e3..fdd1e0717 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig @@ -14,6 +14,7 @@ 'render': 'label', 'addLink': true, 'addInfo': true, + 'addAgeBadge': true, 'customArea': { 'afterLabel': _self.addHolder(member.holder) } diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 6464500c2..ff239f0d6 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -15,6 +15,7 @@ use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; use Chill\PersonBundle\Entity\Person; use Symfony\Component\Templating\EngineInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; @@ -27,12 +28,16 @@ class PersonRender extends AbstractChillEntityRender private EngineInterface $engine; + private TranslatorInterface $translator; + public function __construct( ConfigPersonAltNamesHelper $configAltNamesHelper, - EngineInterface $engine + EngineInterface $engine, + TranslatorInterface $translator ) { $this->configAltNamesHelper = $configAltNamesHelper; $this->engine = $engine; + $this->translator = $translator; } /** @@ -53,6 +58,7 @@ class PersonRender extends AbstractChillEntityRender 'customButtons' => $options['customButtons'] ?? [], 'customArea' => $options['customArea'] ?? [], 'addDeath' => $options['addDeath'] ?? true, + 'addAgeBadge' => $options['addAgeBadge'] ?? false, ]; return @@ -70,6 +76,11 @@ class PersonRender extends AbstractChillEntityRender */ public function renderString($person, array $options): string { + if (null !== $person->getAge() && $person->getDeathDate() === null) { + return $person->getFirstName() . ' ' . $person->getLastName() + . $this->addAltNames($person, false) . ' (' . $this->translator->trans('years_old', ['age' => $person->getAge()]) . ')'; + } + return $person->getFirstName() . ' ' . $person->getLastName() . $this->addAltNames($person, false); } From 8d663cdee6fca77d0ae6089ca80e61c507c846b1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 16:18:35 +0100 Subject: [PATCH 09/46] creation of vue component person-text --- .../Resources/public/vuejs/_js/i18n.js | 5 +- .../vuejs/_components/Entity/PersonText.vue | 53 +++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index 1ab8eb29a..c1eac0b06 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -61,14 +61,15 @@ const messages = { woman: "Née le" }, deathdate: "Date de décès", - years_old: "ans", household_without_address: "Le ménage de l'usager est sans adresse", no_data: "Aucune information renseignée", type: { thirdparty: "Tiers", person: "Usager" }, - holder: "Titulaire" + holder: "Titulaire", + years_old: "an | {n} an | {n} ans", + } } }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue new file mode 100644 index 000000000..c9e98c55b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue @@ -0,0 +1,53 @@ + + + From 44d1535bfb48ab39c3a45d0926ccdf024fad6ca5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 16:18:54 +0100 Subject: [PATCH 10/46] style fixes --- .../Resources/public/chill/scss/badge.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/badge.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/badge.scss index 4d213645e..48e3b25ae 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/badge.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/badge.scss @@ -12,6 +12,7 @@ display: block; top: calc(50% - 7px); right: 10px; + line-height: 11px; } } @@ -62,6 +63,11 @@ ul.list-suggest { & span:hover { color: $chill-l-gray; } + .person-text { + span { + padding-left: 0px; + } + } } } &.remove-items { @@ -69,7 +75,7 @@ ul.list-suggest { position: relative; span { display: block; - padding-right: .75rem; + padding-right: 1.75rem; @include remove_link; } } From 8720cc730e5d6ef14a44a8e83a661dd960b2169e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Jan 2022 16:19:19 +0100 Subject: [PATCH 11/46] implementation of person-text --- .../Activity/components/ConcernedGroups.vue | 56 +++--- .../ConcernedGroups/PersonBadge.vue | 20 +- .../components/PersonsAssociated.vue | 22 ++- .../components/Requestor.vue | 11 +- .../components/Resources.vue | 7 +- .../components/Positioning.vue | 9 +- .../_components/Entity/PersonRenderBox.vue | 184 +++++++++--------- 7 files changed, 166 insertions(+), 143 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue index f5057eb25..29efe998d 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue @@ -1,45 +1,47 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index 3ea64bd67..202d5b376 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -27,7 +27,7 @@ :value="p.person.id" />
    @@ -50,9 +50,9 @@
    • - {{ p.text }} -
    • -
    + + +
    @@ -76,12 +76,14 @@ import {mapGetters, mapState} from 'vuex'; import ParticipationItem from "./PersonsAssociated/ParticipationItem.vue"; import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue'; +import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue'; export default { name: 'PersonsAssociated', components: { ParticipationItem, - AddPersons + AddPersons, + PersonText }, data() { return { @@ -110,15 +112,15 @@ export default { ) // filter persons appearing twice in requestor and resources .filter( - (e, index, suggested) => { + (e, index, suggested) => { for (let i = 0; i < suggested.length; i = i+1) { - if (i < index && e.id === suggested[i].id) { - return false - } + if (i < index && e.id === suggested[i].id) { + return false + } } return true; - } + } ) }), ...mapGetters([ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index a5d6791fb..8b13df7aa 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -136,9 +136,9 @@
    • - {{ p.text }} -
    • -
    + + +
    @@ -162,6 +162,8 @@ import PersonRenderBox from '../../_components/Entity/PersonRenderBox.vue'; import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue'; import Confidential from 'ChillMainAssets/vuejs/_components/Confidential.vue'; import { mapState } from 'vuex'; +import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue'; + export default { name: 'Requestor', @@ -170,7 +172,8 @@ export default { OnTheFly, PersonRenderBox, ThirdPartyRenderBox, - Confidential + Confidential, + PersonText }, props: ['isAnonymous'], data() { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue index ed1f85cf3..069e4d590 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue @@ -22,7 +22,7 @@
    • - {{ p.text }} +
    @@ -45,12 +45,15 @@ import { mapState } from 'vuex'; import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue'; import ResourceItem from './Resources/ResourceItem.vue'; +import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue'; + export default { name: 'Resources', components: { AddPersons, - ResourceItem + ResourceItem, + PersonText }, data() { return { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue index 487fb230e..005d46122 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue @@ -6,12 +6,13 @@
    -

    {{ conc.person.text }}

    + +

    @@ -202,24 +202,24 @@ export default { getUrl: function() { return `/fr/person/${this.person.id}/general`; }, - getAge: function() { - // TODO only one abstract function - if(this.person.birthdate && !this.person.deathdate){ - const birthday = new Date(this.person.birthdate.datetime) - const now = new Date() - return (now.getFullYear() - birthday.getFullYear()) - } else if(this.person.birthdate && this.person.deathdate){ - const birthday = new Date(this.person.birthdate.datetime) - const deathdate = new Date(this.person.deathdate.datetime) - return (deathdate.getFullYear() - birthday.getFullYear()) - } else if(!this.person.birthdate && this.person.deathdate.datetime) { - // todo: change this - return "Age unknown" - } else { - // todo: change this - return "Age unknown" - } - }, + // getAge: function() { + // // TODO only one abstract function + // if(this.person.birthdate && !this.person.deathdate){ + // const birthday = new Date(this.person.birthdate.datetime) + // const now = new Date() + // return (now.getFullYear() - birthday.getFullYear()) + // } else if(this.person.birthdate && this.person.deathdate){ + // const birthday = new Date(this.person.birthdate.datetime) + // const deathdate = new Date(this.person.deathdate.datetime) + // return (deathdate.getFullYear() - birthday.getFullYear()) + // } else if(!this.person.birthdate && this.person.deathdate.datetime) { + // // todo: change this + // return "Age unknown" + // } else { + // // todo: change this + // return "Age unknown" + // } + // }, getCurrentHouseholdUrl: function() { let returnPath = this.returnPath ? `?returnPath=${this.returnPath}` : ``; return `/fr/person/household/${this.person.current_household_id}/summary${returnPath}` diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue index d597f5205..0dde47235 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue @@ -21,7 +21,6 @@ export default { for(let i = 0; i < this.person.altNames.length; i++){ return this.person.altNames[i].label } - console.log(this.person.altNames) }, altNameKey: function() { for(let i = 0; i < this.person.altNames.length; i++){ From feaee8a0b10dff745a4086b404e4b79bc0b87ca6 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 28 Jan 2022 10:07:34 +0100 Subject: [PATCH 17/46] a few more implementations in twig templates --- .../Resources/views/Activity/list_recent.html.twig | 2 +- .../list_recent_by_accompanying_period.html.twig | 2 +- .../ChillPersonBundle/Resources/views/Entity/person.html.twig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig index 0f426c5a9..e8be2c49e 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig @@ -48,7 +48,7 @@
  • {{ 'Participants'|trans ~ ' : ' }} {% for p in activity.personsAssociated %} - {{ p|chill_entity_render_box }} + {{ p|chill_entity_render_box({'addAgeBadge': true}) }} {% endfor %}
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig index d45ba40ca..7f2fb0177 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig @@ -31,7 +31,7 @@
  • {{ 'Participants'|trans ~ ' : ' }} {% for p in w.persons %} - {{ p|chill_entity_render_box }} + {{ p|chill_entity_render_box({'addAgeBadge': true}) }} {% endfor %}
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index b60325bec..9bee504a9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -43,7 +43,7 @@ {%- endif -%} {%- if options['addAgeBadge'] -%} {% if person.age is not null and person.deathDate is null %} - ({{- 'years_old'|trans({ 'age': person.age }) -}}) + ({{- 'years_old'|trans({ 'age': person.age }) -}}) {% endif %} {% endif %} {% endmacro raw %} From 5bfdee0c286d8bd32f37a1cdab3b97ab55f710ff Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 28 Jan 2022 11:09:14 +0100 Subject: [PATCH 18/46] corrections review --- .../Controller/PersonResourceController.php | 2 -- .../Controller/UserAccompanyingPeriodController.php | 8 +++++--- src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php | 6 ------ .../Resources/views/PersonResource/list.html.twig | 4 +--- src/Bundle/ChillPersonBundle/config/routes.yaml | 4 ---- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php index 577a271e8..210b507e5 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php @@ -148,8 +148,6 @@ final class PersonResourceController extends AbstractController $comment = $form['comment']->getData(); $kind = $form['kind']->getData(); - dump($person); - $personResource->setKind($kind); $personResource->setPerson($person); $personResource->setThirdParty($thirdparty); diff --git a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php index 956849efc..9c24e127f 100644 --- a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php @@ -15,6 +15,7 @@ namespace Chill\PersonBundle\Controller; use Chill\PersonBundle\Repository\AccompanyingPeriodRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Annotation\Route; class UserAccompanyingPeriodController extends AbstractController { @@ -26,12 +27,13 @@ class UserAccompanyingPeriodController extends AbstractController $this->accompanyingPeriodRepository = $accompanyingPeriodRepository; } + /** + * @Route("/{_locale}/accompanying-periods", name="chill_person_accompanying_period_user") + */ public function listAction(Request $request) { - $userId = $this->getUser()->getId(); - $accompanyingPeriods = []; - $accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(['user' => $userId]); + $accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(['user' => $this->getUser()]); return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [ 'accompanyingPeriods' => $accompanyingPeriods diff --git a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php index e7dd210df..1b86135b8 100644 --- a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php @@ -41,14 +41,8 @@ class UserMenuBuilder implements LocalMenuBuilderInterface public $translator; public function __construct( - CountNotificationTask $counter, - TokenStorageInterface $tokenStorage, - TranslatorInterface $translator, AuthorizationCheckerInterface $authorizationChecker ) { - $this->counter = $counter; - $this->tokenStorage = $tokenStorage; - $this->translator = $translator; $this->authorizationChecker = $authorizationChecker; } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig index 5964cef54..820da9179 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig @@ -52,9 +52,7 @@ {% if resource.comment.comment is not empty %}
    -
    -
    {{ resource.comment.comment }}
    -
    +
    {{ resource.comment|chill_entity_render_box }}
    {% endif %} diff --git a/src/Bundle/ChillPersonBundle/config/routes.yaml b/src/Bundle/ChillPersonBundle/config/routes.yaml index 13539f6c2..13d1c1227 100644 --- a/src/Bundle/ChillPersonBundle/config/routes.yaml +++ b/src/Bundle/ChillPersonBundle/config/routes.yaml @@ -55,10 +55,6 @@ chill_person_accompanying_period_re_open: path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::reOpenAction -chill_person_accompanying_period_user: - path: /{_locale}/accompanying-periods - controller: Chill\PersonBundle\Controller\UserAccompanyingPeriodController::listAction - chill_person_resource_list: path: /{_locale}/person/{person_id}/resources/list controller: Chill\PersonBundle\Controller\PersonResourceController::listAction From 4d1a553474e512ed0b9b9cff3a0dbced1ed0f177 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 28 Jan 2022 11:40:08 +0100 Subject: [PATCH 19/46] =?UTF-8?q?show=20activity=20attendee=20(pr=C3=A9sen?= =?UTF-8?q?ce)=20in=20the=20activity=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/views/Activity/_list_item.html.twig | 11 +++++++++++ .../Resources/views/Activity/show.html.twig | 6 +----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig index 6b2e33dfb..fadf7ff14 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/_list_item.html.twig @@ -41,6 +41,17 @@
    {% endif %} + {% if activity.attendee and t.attendeeVisible %} +
    +

    {{ 'Attendee'|trans }}

    +
    +

    + {{ activity.attendee.name|localize_translatable_string }} +

    +
    +
    + {% endif %} + {% if activity.sentReceived is not empty and t.sentReceivedVisible %}

    {{ 'Sent received'|trans }}

    diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index 546ba99ce..a5e3bd1fd 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -165,11 +165,7 @@
    {{ 'Attendee'|trans }}
    {% if entity.attendee is not null %} - {% if entity.attendee %} - {{ 'present'|trans|capitalize }} - {% else %} - {{ 'not present'|trans|capitalize }} - {% endif %} + {{ entity.attendee.name|localize_translatable_string }} {% else %} {{ 'None'|trans|capitalize }} {% endif %} From 105fe16122711fb7f69917040a6c807a27968460 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 28 Jan 2022 11:40:30 +0100 Subject: [PATCH 20/46] upd CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f2fb4a22..3683260d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to ## Unreleased +* [activity] show activity attendee (présence) in the activity list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/412) +* [activity] admin: change validation rule for social action visible field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/413) * [parcours] comments truncated if too long + link added (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/406) * [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382) * [person ressources]: module added From 646f39b9ed2ef3efc79c3d74b09daf47330ef0c7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 28 Jan 2022 12:15:51 +0100 Subject: [PATCH 21/46] Merge conflicts fixed --- CHANGELOG.md | 19 +- .../Controller/ActivityController.php | 4 +- .../Authorization/ActivityVoterTest.php | 4 + .../Controller/AsideActivityController.php | 2 + .../src/Form/AsideActivityFormType.php | 17 -- src/Bundle/ChillMainBundle/Entity/Address.php | 27 ++- .../Entity/Embeddable/CommentEmbeddable.php | 11 +- .../Entity/ResidentialAddress.php | 166 ++++++++++++++++++ .../Entity/Workflow/EntityWorkflow.php | 1 + .../Entity/Workflow/EntityWorkflowComment.php | 1 + .../Form/Type/ResidentialAddressType.php | 73 ++++++++ .../ResidentialAddressRepository.php | 59 +++++++ .../Resources/public/module/blur/index.js | 36 ++-- .../vuejs/Address/components/AddAddress.vue | 2 + .../components/AddAddress/AddressMore.vue | 4 - .../vuejs/Address/components/EditPane.vue | 23 ++- .../Resources/public/vuejs/Address/i18n.js | 1 + .../public/vuejs/_components/Confidential.vue | 24 +-- .../_components/Entity/AddressRenderBox.vue | 75 ++++++-- .../Resources/views/Entity/address.html.twig | 6 +- .../Normalizer/AddressNormalizer.php | 2 + .../Tests/Export/ExportManagerTest.php | 2 + .../Authorization/AuthorizationHelperTest.php | 3 + .../migrations/Version20220124085957.php | 44 +++++ .../migrations/Version20220125134253.php | 48 +++++ .../translations/messages.fr.yml | 2 + .../ResidentialAddressController.php | 161 +++++++++++++++++ .../Entity/Household/HouseholdComposition.php | 1 + .../ChillPersonBundle/Entity/Person.php | 14 +- .../Entity/Person/PersonResource.php | 1 + .../Menu/PersonMenuBuilder.php | 10 ++ .../Resources/public/vuejs/VisGraph/colors.js | 6 + .../Resources/public/vuejs/VisGraph/store.js | 19 +- .../public/vuejs/VisGraph/vis-network.js | 27 +-- .../views/AccompanyingCourse/index.html.twig | 4 +- .../views/ResidentialAddress/_form.html.twig | 37 ++++ .../views/ResidentialAddress/delete.html.twig | 58 ++++++ .../views/ResidentialAddress/edit.html.twig | 51 ++++++ .../views/ResidentialAddress/list.html.twig | 116 ++++++++++++ .../views/ResidentialAddress/new.html.twig | 29 +++ .../new_pick_kind.html.twig | 49 ++++++ .../AccompanyingPeriodResourceNormalizer.php | 1 + .../AccompanyingPeriodWorkDenormalizer.php | 1 + .../Normalizer/PersonJsonNormalizer.php | 2 + .../Authorization/PersonVoterTest.php | 2 + .../translations/messages.fr.yml | 27 ++- .../Authorization/ReportVoterTest.php | 2 + .../views/Entity/thirdparty.html.twig | 2 +- 48 files changed, 1161 insertions(+), 115 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php create mode 100644 src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php create mode 100644 src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php create mode 100644 src/Bundle/ChillMainBundle/migrations/Version20220124085957.php create mode 100644 src/Bundle/ChillMainBundle/migrations/Version20220125134253.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php create mode 100644 src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/colors.js create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/_form.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/delete.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/edit.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/new.html.twig create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/new_pick_kind.html.twig diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1e466b6..f60770f36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,28 @@ and this project adheres to ## Unreleased + +## Test releases + +### test release 2021-01-28 + +* [person] improve filiations vis graph: disable physics, use chill colors for persons-households-course, increase label of relations, remove labels on household arrows and other improvements (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/286, https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/362) +* [activity] Order activity by date and by id (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/364) +* [main] increase length of 4 Address fields (change to TEXT, no size limits) (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/277) +* [main] Add confidential option for address, in edit and view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/165) +* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377) +* [person] Add residential address entity, form and list for each person +* [aside_activity]: dynamicUserPickerType used (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/399) + + +### test release 2021-01-26 + * [parcours] comments truncated if too long + link added (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/406) * [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382) * [person ressources]: module added +* [parcours] bugfix if deathdate is not defined (eg. for a thirdparty) parcours is still displayed. Gave error before. +* dispatching list -## Test releases ### test release 2022-01-24 diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 2947fda38..3e32edfce 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -256,7 +256,7 @@ final class ActivityController extends AbstractController if ($person instanceof Person) { $this->denyAccessUnlessGranted(ActivityVoter::SEE, $person); $activities = $this->activityACLAwareRepository - ->findByPerson($person, ActivityVoter::SEE, 0, null); + ->findByPerson($person, ActivityVoter::SEE, 0, null, ['date' => 'DESC', 'id' => 'DESC']); $event = new PrivacyEvent($person, [ 'element_class' => Activity::class, @@ -269,7 +269,7 @@ final class ActivityController extends AbstractController $this->denyAccessUnlessGranted(ActivityVoter::SEE, $accompanyingPeriod); $activities = $this->activityACLAwareRepository - ->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE); + ->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE, 0, null, ['date' => 'DESC', 'id' => 'DESC']); $view = 'ChillActivityBundle:Activity:listAccompanyingCourse.html.twig'; } diff --git a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php index b3d8472c6..3ca5aab45 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php @@ -29,9 +29,13 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; final class ActivityVoterTest extends KernelTestCase { use PrepareActivityTrait; + use PrepareCenterTrait; + use PreparePersonTrait; + use PrepareScopeTrait; + use PrepareUserTrait; /** diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php index eee8c7dc8..e5244009e 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php @@ -32,6 +32,8 @@ final class AsideActivityController extends CRUDController { $asideActivity = new AsideActivity(); + $asideActivity->setAgent($this->getUser()); + $duration = $request->query->get('duration', '300'); $duration = DateTime::createFromFormat('U', $duration); $asideActivity->setDuration($duration); diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php index 683adf8da..6ade55d07 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php @@ -14,7 +14,6 @@ namespace Chill\AsideActivityBundle\Form; use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Entity\AsideActivityCategory; use Chill\AsideActivityBundle\Templating\Entity\CategoryRender; -use Chill\MainBundle\Entity\User; use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\ChillTextareaType; use Chill\MainBundle\Form\Type\PickUserDynamicType; @@ -69,22 +68,6 @@ final class AsideActivityFormType extends AbstractType ]; $builder - // ->add( - // 'agent', - // EntityType::class, - // [ - // 'label' => 'For agent', - // 'required' => true, - // 'class' => User::class, - // 'data' => $this->storage->getToken()->getUser(), - // 'query_builder' => static function (EntityRepository $er) { - // return $er->createQueryBuilder('u')->where('u.enabled = true'); - // }, - // 'attr' => ['class' => 'select2 '], - // 'placeholder' => 'Choose the agent for whom this activity is created', - // 'choice_label' => 'username', - // ] - // ) ->add('agent', PickUserDynamicType::class, [ 'label' => 'For agent', 'required' => true, diff --git a/src/Bundle/ChillMainBundle/Entity/Address.php b/src/Bundle/ChillMainBundle/Entity/Address.php index 070d40468..0e6cd549b 100644 --- a/src/Bundle/ChillMainBundle/Entity/Address.php +++ b/src/Bundle/ChillMainBundle/Entity/Address.php @@ -42,10 +42,16 @@ class Address */ private $buildingName; + /** + * @ORM\Column(type="boolean") + * @Groups({"write"}) + */ + private bool $confidential = false; + /** * @var string|null * - * @ORM\Column(type="string", length=16, nullable=true) + * @ORM\Column(type="string", length=255, nullable=true) * @Groups({"write"}) */ private $corridor; @@ -78,7 +84,7 @@ class Address /** * @var string|null * - * @ORM\Column(type="string", length=16, nullable=true) + * @ORM\Column(type="string", length=255, nullable=true) * @Groups({"write"}) */ private $flat; @@ -86,7 +92,7 @@ class Address /** * @var string|null * - * @ORM\Column(type="string", length=16, nullable=true) + * @ORM\Column(type="string", length=255, nullable=true) * @Groups({"write"}) */ private $floor; @@ -143,7 +149,7 @@ class Address /** * @var string|null * - * @ORM\Column(type="string", length=16, nullable=true) + * @ORM\Column(type="string", length=255, nullable=true) * @Groups({"write"}) */ private $steps; @@ -192,6 +198,7 @@ class Address return (new Address()) ->setAddressReference($original->getAddressReference()) ->setBuildingName($original->getBuildingName()) + ->setConfidential($original->getConfidential()) ->setCorridor($original->getCorridor()) ->setCustoms($original->getCustoms()) ->setDistribution($original->getDistribution()) @@ -229,6 +236,11 @@ class Address return $this->buildingName; } + public function getConfidential(): bool + { + return $this->confidential; + } + public function getCorridor(): ?string { return $this->corridor; @@ -369,6 +381,13 @@ class Address return $this; } + public function setConfidential(bool $confidential): self + { + $this->confidential = $confidential; + + return $this; + } + public function setCorridor(?string $corridor): self { $this->corridor = $corridor; diff --git a/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php b/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php index 51b8978a0..61ebce10b 100644 --- a/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php +++ b/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php @@ -20,10 +20,9 @@ use Doctrine\ORM\Mapping as ORM; class CommentEmbeddable { /** - * @var string * @ORM\Column(type="text", nullable=true) */ - private $comment; + private ?string $comment = null; /** * @var DateTime @@ -39,10 +38,7 @@ class CommentEmbeddable */ private $userId; - /** - * @return string - */ - public function getComment() + public function getComment(): ?string { return $this->comment; } @@ -68,9 +64,6 @@ class CommentEmbeddable return empty($this->getComment()); } - /** - * @param string $comment - */ public function setComment(?string $comment) { $this->comment = $comment; diff --git a/src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php b/src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php new file mode 100644 index 000000000..7763ea9d5 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Entity/ResidentialAddress.php @@ -0,0 +1,166 @@ +comment = new CommentEmbeddable(); + } + + public function getAddress(): ?Address + { + return $this->address; + } + + public function getComment(): CommentEmbeddable + { + return $this->comment; + } + + public function getEndDate(): ?DateTimeImmutable + { + return $this->endDate; + } + + public function getHostPerson(): ?Person + { + return $this->hostPerson; + } + + public function getHostThirdParty(): ?ThirdParty + { + return $this->hostThirdParty; + } + + public function getId(): ?int + { + return $this->id; + } + + public function getPerson(): ?Person + { + return $this->person; + } + + public function getStartDate(): ?DateTimeImmutable + { + return $this->startDate; + } + + public function setAddress(?Address $address): self + { + $this->address = $address; + + return $this; + } + + public function setComment(CommentEmbeddable $comment): self + { + $this->comment = $comment; + + return $this; + } + + public function setEndDate(?DateTimeImmutable $endDate): self + { + $this->endDate = $endDate; + + return $this; + } + + public function setHostPerson(?Person $hostPerson): self + { + $this->hostPerson = $hostPerson; + + return $this; + } + + public function setHostThirdParty(?ThirdParty $hostThirdParty): self + { + $this->hostThirdParty = $hostThirdParty; + + return $this; + } + + public function setPerson(?Person $person): self + { + $this->person = $person; + + return $this; + } + + public function setStartDate(DateTimeImmutable $startDate): self + { + $this->startDate = $startDate; + + return $this; + } +} diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php index b56435f5d..0d7142e9f 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php @@ -37,6 +37,7 @@ use function count; class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface { use TrackCreationTrait; + use TrackUpdateTrait; /** diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowComment.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowComment.php index b041a5aa3..9f4e7f096 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowComment.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowComment.php @@ -24,6 +24,7 @@ use Doctrine\ORM\Mapping as ORM; class EntityWorkflowComment implements TrackCreationInterface, TrackUpdateInterface { use TrackCreationTrait; + use TrackUpdateTrait; /** diff --git a/src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php b/src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php new file mode 100644 index 000000000..0ebe47fef --- /dev/null +++ b/src/Bundle/ChillMainBundle/Form/Type/ResidentialAddressType.php @@ -0,0 +1,73 @@ +add('startDate', DateType::class, [ + 'required' => true, + 'input' => 'datetime_immutable', + 'widget' => 'single_text', + ]) + ->add('endDate', DateType::class, [ + 'required' => false, + 'input' => 'datetime_immutable', + 'widget' => 'single_text', + ]) + ->add('comment', CommentType::class, [ + 'required' => false, + ]); + + if ('person' === $options['kind']) { + $builder + ->add('hostPerson', PickPersonDynamicType::class, [ + 'label' => 'Person', + ]); + } + + if ('thirdparty' === $options['kind']) { + $builder + ->add('hostThirdParty', PickThirdpartyDynamicType::class, [ + 'label' => 'Third party', + ]); + } + + if ('address' === $options['kind']) { + $builder + ->add('address', PickAddressType::class, [ + 'required' => false, + 'label' => 'Address', + 'use_valid_from' => false, + 'use_valid_to' => false, + ]); + } + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => ResidentialAddress::class, + 'kind' => null, + ]); + } +} diff --git a/src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php b/src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php new file mode 100644 index 000000000..05cdfdf6c --- /dev/null +++ b/src/Bundle/ChillMainBundle/Repository/ResidentialAddressRepository.php @@ -0,0 +1,59 @@ +createQueryBuilder('r') + ->andWhere('r.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('r.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?ResidentialAddress + { + return $this->createQueryBuilder('r') + ->andWhere('r.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js index 6e3b75f2b..1d66d25e6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js @@ -1,21 +1,19 @@ require('./blur.scss'); -var toggleBlur = function(e){ - - var btn = e.target; - - btn.previousElementSibling.classList.toggle("blur"); - btn.classList.toggle("fa-eye"); - btn.classList.toggle("fa-eye-slash"); - -} - -var infos = document.getElementsByClassName("confidential"); -for(var i=0; i < infos.length; i++){ - infos[i].insertAdjacentHTML('beforeend', ''); -} - -var toggles = document.getElementsByClassName("toggle"); -for(var i=0; i < toggles.length; i++){ - toggles[i].addEventListener("click", toggleBlur); -} \ No newline at end of file +document.querySelectorAll('.confidential').forEach(function (el) { + let i = document.createElement('i'); + const classes = ['fa', 'fa-eye', 'toggle']; + i.classList.add(...classes); + el.appendChild(i); + const toggleBlur = function(e) { + for (let child of el.children) { + if (!child.classList.contains('toggle')) { + child.classList.toggle('blur'); + } + } + i.classList.toggle('fa-eye'); + i.classList.toggle('fa-eye-slash'); + } + i.addEventListener('click', toggleBlur); + toggleBlur(); +}); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue index 1f62269de..2ca73b92c 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -562,6 +562,7 @@ export default { this.entity.loaded.cities = []; this.entity.loaded.countries = []; + this.entity.selected.confidential = this.context.edit ? this.entity.address.confidential : false; this.entity.selected.isNoAddress = (this.context.edit && this.entity.address.text === '') ? true : false; this.entity.selected.country = this.context.edit ? this.entity.address.country : {}; @@ -593,6 +594,7 @@ export default { { console.log('apply changes'); let newAddress = { + 'confidential': this.entity.selected.confidential, 'isNoAddress': this.entity.selected.isNoAddress, 'street': this.entity.selected.isNoAddress ? '' : this.entity.selected.address.street, 'streetNumber': this.entity.selected.isNoAddress ? '' : this.entity.selected.address.streetNumber, diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue index 1216871ab..93a64ad19 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue @@ -6,7 +6,6 @@ @@ -15,7 +14,6 @@ @@ -24,7 +22,6 @@ @@ -33,7 +30,6 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue index 486d28e73..5279880bc 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue @@ -17,12 +17,22 @@
    +
    + + +
    + :value="value" /> @@ -118,7 +128,8 @@ export default { emits: ['getCities', 'getReferenceAddresses'], data() { return { - value: false + value: false, + valueConfidential: false, } }, computed: { @@ -134,6 +145,14 @@ export default { addressMap() { return this.entity.addressMap; }, + isConfidential: { + set(value) { + this.entity.selected.confidential = value; + }, + get() { + return this.entity.selected.confidential; + } + }, isNoAddress: { set(value) { console.log('isNoAddress value', value); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js index 98f31cbd3..28670f56c 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js @@ -18,6 +18,7 @@ const addressMessages = { other_address: 'Autre adresse', create_address: 'Adresse inconnue. Cliquez ici pour créer une nouvelle adresse', isNoAddress: 'Pas d\'adresse complète', + isConfidential: 'Adresse confidentielle', street: 'Nom de rue', streetNumber: 'Numéro', floor: 'Étage', diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue index efdf62926..0a34c4123 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue @@ -1,22 +1,26 @@ -