From 4dd9bc11237e7af3543108c43d92fe62a532eb73 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 14:22:20 +0100 Subject: [PATCH 01/43] doc generation: do not set required fields for mainPerson, person1, person2 --- .../Service/DocGenerator/AccompanyingPeriodContext.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php index fc19b6590..ddbc66f27 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php @@ -165,6 +165,7 @@ class AccompanyingPeriodContext implements }, 'multiple' => false, 'expanded' => true, + 'required' => false, 'label' => $options[$key . 'Label'], ]); } From 692343aae427786be4095aa8c23156a1d4956ba7 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 14:24:12 +0100 Subject: [PATCH 02/43] doc generation: add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge --- .../Service/DocGenerator/AccompanyingPeriodContext.php | 2 +- .../ChillPersonBundle/Templating/Entity/PersonRender.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php index ddbc66f27..96db9c2bd 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php @@ -161,7 +161,7 @@ class AccompanyingPeriodContext implements 'class' => Person::class, 'choices' => $persons, 'choice_label' => function (Person $p) { - return $this->personRender->renderString($p, []); + return $this->personRender->renderString($p, ['addAge' => true]); }, 'multiple' => false, 'expanded' => true, diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 0898bc32a..05b7e46c9 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -83,6 +83,13 @@ class PersonRender extends AbstractChillEntityRender . $this->addAltNames($person, false) . ' (' . $this->translator->trans('years_old', ['age' => $person->getAge()]) . ')'; } + if (null !== $person->getDeathDate() && $options['addAge']) { + return $person->getFirstName() . ' ' . $person->getLastName() + . ' (‡)' + . $this->addAltNames($person, false); + } + + return $person->getFirstName() . ' ' . $person->getLastName() . $this->addAltNames($person, false); } From c19099e76c14f36866680bed0ea14ff32ea9c5db Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 14:28:37 +0100 Subject: [PATCH 03/43] upd CHANGELOG --- CHANGELOG.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e765829..c66f238af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,10 @@ and this project adheres to ## Unreleased -* [person] accompanying course work: fix on-the-fly update of thirdParty +* [doc-generator] do not set required fields for mainPerson, person1, person2 (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement#456) +* [doc-generation] add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/370) + +* [person] accompanying course work: fix on-the-fly update of thirdParty * [on-the-fly] close modal only after validation * [person] correct thirdparty PATCH url + add email and altnames in AddPerson and serializer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/433) * change order for accompanying course work list @@ -34,7 +37,7 @@ and this project adheres to * [parcours]: validation + message for closing parcours adjusted. * [household]: household composition double edit button replaced by a delete action (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/426) [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413 -[homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. +[homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. * [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) @@ -42,7 +45,7 @@ and this project adheres to * [workflow][notification] improve how notifications and workflows are 'attached' to entities: contextual list, counter, buttons and vue modal * [AddAddress] disable multiselect search, and rely only on most pertinent Cities and Street computed backend * [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413 -* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. +* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. ### test release 2021-01-31 @@ -91,7 +94,7 @@ and this project adheres to * [popover] add popover html popup mechanism (used by workflow breadcrumb) * [templates] improve updatedBy macro in item metadatas * [parcours]: bug fix when comment is pinned all other comments remain in the collection (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/385) -* [workflow] +* [workflow] * add My workflow section with my opened subscriptions * apply workflow on documents, accompanyingCourseWork and Evaluations * [wopi-link] a new vue component allow to open wopi link in a fullscreen chill-themed modal From 1f5d529d333e452f32dfee927c8327b40f4b225d Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 14:30:31 +0100 Subject: [PATCH 04/43] php code fix --- src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 05b7e46c9..c01476b2e 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -89,7 +89,6 @@ class PersonRender extends AbstractChillEntityRender . $this->addAltNames($person, false); } - return $person->getFirstName() . ' ' . $person->getLastName() . $this->addAltNames($person, false); } From 50b7df1f4ade75d122fe89477db1d0fb51af84ca Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 11 Feb 2022 15:16:28 +0100 Subject: [PATCH 05/43] adding thirdparty info --- .../views/PersonResource/list.html.twig | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig index 62b9701ec..9b0586779 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/list.html.twig @@ -14,6 +14,25 @@ {{ encore_entry_link_tags('mod_pickentity_type') }} {% endblock %} +{% macro rowCustomButtons(tp) %} + {% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %} +
  • + +
  • + {% endif %} + {% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %} +
  • + +
  • + {% endif %} +{% endmacro %} + {% block personcontent %}

    {{ 'List of resources'|trans }}

    @@ -25,18 +44,27 @@
    {% if resource.person is not null %} -
    - +
    + {{ resource.person|chill_entity_render_box() }} + {# {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, targetEntity: { name: 'person', id: resource.person.id }, buttonText: resource.person|chill_entity_render_string, isDead: resource.person.deathdate is not null } %} - + #}
    {% elseif resource.thirdparty is not null %} -
    +
    + {{ resource.thirdparty|chill_entity_render_box({ + 'render': 'bloc', + 'showContacts': false, + 'addLink': false, + 'isConfidential': (resource.thirdparty.contactDataAnonymous ? true : false) + }) }} +
    + {#
    {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, @@ -45,7 +73,7 @@ parent: resource.thirdparty.parent } %} -
    +
    #} {% else %}
    {{ resource.freetext }} From eee38e95775d2009db2d9dc1ab5487d0bda07c02 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 15:18:54 +0100 Subject: [PATCH 06/43] remove isDead from insert vue on the fly as dead sign (obele) is included in personRender->renderString --- .../Resources/views/OnTheFly/_insert_vue_onthefly.html.twig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig b/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig index 16e9cbf02..bbc5f20db 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig @@ -11,7 +11,6 @@ * buttonText string * displayBadge boolean (default: false) replace button by badge, need to define buttonText for content * parent object (optional) pass parent context of the targetEntity (used for course resource comment) - * isDead boolean (default: false) is the person dead #} Date: Fri, 11 Feb 2022 15:49:49 +0100 Subject: [PATCH 07/43] activity: can click through the cross icon for removing person in concerned group --- .../vuejs/Activity/components/ConcernedGroups/PersonBadge.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue index 0a611e217..11b8063a3 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue @@ -1,7 +1,7 @@