From a35d45630839c335dfddaabed6899edd721c2225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 4 Jun 2025 16:54:44 +0200 Subject: [PATCH 1/6] Fix participant condition in list_with_period.html.twig Updated the condition to properly handle cases where the first participation's person is not the current person. --- .../Resources/views/Person/list_with_period.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7d06c51c3..670ce2ec7 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 @@ -96,7 +96,7 @@ {% endif %} - {% if acp.currentParticipations|length > 1 %} + {% if acp.currentParticipations|length > 1 or (acp.currentParticipations|first).person is not same as person %}

From fca10ada717b84bfe9dce44ddb36c7a1f3592ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 4 Jun 2025 16:54:58 +0200 Subject: [PATCH 2/6] Fix translation keys and participant pluralization in list_with_period.html.twig Updated French translations for "Participants" and improved pluralization handling in accompanying_period keys. Modified list_with_period.html.twig to dynamically translate "Participants" based on the count of current participations. --- .changes/unreleased/Fixed-20250604-165550.yaml | 6 ++++++ .../Resources/views/Person/list_with_period.html.twig | 2 +- .../translations/messages+intl-icu.fr.yaml | 8 ++++++++ src/Bundle/ChillPersonBundle/translations/messages.fr.yml | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Fixed-20250604-165550.yaml diff --git a/.changes/unreleased/Fixed-20250604-165550.yaml b/.changes/unreleased/Fixed-20250604-165550.yaml new file mode 100644 index 000000000..0544c9402 --- /dev/null +++ b/.changes/unreleased/Fixed-20250604-165550.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Display the list of participant in the results, even if there is only one participant and that the search result display the requestor +time: 2025-06-04T16:55:50.107852336+02:00 +custom: + Issue: "390" + SchemaChange: No schema change 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 670ce2ec7..41bc51864 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 @@ -100,7 +100,7 @@

- {{ 'Participants'|trans }} + {{ 'accompanying_period.Participants_without_count'|trans({count: acp.currentParticipations|length}) }}

diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index 830e21d2d..6e42a362b 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -13,6 +13,14 @@ Requestor: >- neutral {Demandeur·euse} } +accompanying_period: + Participants_without_count: >- + {count, plural, + =0 {Participant} + =1 {Participant} + other {Participants} + } + person: from_the: depuis le And himself: >- diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 9bce912a0..0f62e4f5b 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -208,7 +208,7 @@ Pediod closing form is not valid: Le formulaire n'est pas valide Accompanying user: Accompagnant No accompanying user: Aucun accompagnant No data given: Pas d'information -Participants: Usagers impliquées +Participants: Usagers impliqués Create an accompanying course: Créer un parcours Accompanying courses of users: Parcours des utilisateurs This accompanying course is still a draft: Ce parcours est encore à l'état brouillon. From c2842148c6b28cb075f693a5e214cad4de15d4ec Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 17 Jun 2025 19:26:23 +0200 Subject: [PATCH 3/6] Improve UX with better labeling in person resource form --- .changes/unreleased/UX-20250617-192650.yaml | 6 ++++++ .../ChillPersonBundle/Form/PersonResourceType.php | 10 ++++------ .../Resources/views/PersonResource/form.html.twig | 12 ++++++------ .../ChillPersonBundle/translations/messages.fr.yml | 4 ++++ 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 .changes/unreleased/UX-20250617-192650.yaml diff --git a/.changes/unreleased/UX-20250617-192650.yaml b/.changes/unreleased/UX-20250617-192650.yaml new file mode 100644 index 000000000..810758b10 --- /dev/null +++ b/.changes/unreleased/UX-20250617-192650.yaml @@ -0,0 +1,6 @@ +kind: UX +body: Improve labeling of fields in person resource creation form +time: 2025-06-17T19:26:50.599703116+02:00 +custom: + Issue: "" + SchemaChange: No schema change diff --git a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php index 2063b0e21..1412733bc 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php @@ -16,10 +16,8 @@ use Chill\MainBundle\Form\Type\CommentType; use Chill\PersonBundle\Entity\Person\PersonResource; use Chill\PersonBundle\Entity\Person\PersonResourceKind; use Chill\PersonBundle\Form\Type\PickPersonDynamicType; -use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Chill\PersonBundle\Templating\Entity\ResourceKindRender; use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType; -use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; use Doctrine\ORM\EntityRepository; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; @@ -29,7 +27,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class PersonResourceType extends AbstractType { - public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly TranslatorInterface $translator) {} public function buildForm(FormBuilderInterface $builder, array $options) { @@ -52,13 +50,13 @@ final class PersonResourceType extends AbstractType }, ]) ->add('person', PickPersonDynamicType::class, [ - 'label' => 'Usager', + 'label' => $this->translator->trans('person_resource.person_non_prof'), ]) ->add('thirdparty', PickThirdpartyDynamicType::class, [ - 'label' => 'Tiers', + 'label' => $this->translator->trans('person_resource.thirdparty_prof'), ]) ->add('freetext', ChillTextareaType::class, [ - 'label' => 'Description libre', + 'label' => $this->translator->trans('person_resource.freetext'), 'required' => false, ]) ->add('comment', CommentType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig index 9bda2856b..5542074fa 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig @@ -10,28 +10,28 @@
{% if resource is defined and resource.person is not null %} - + {% else %} - + {% endif %}
{% if resource is defined and resource.thirdparty is not null %} - + {% else %} - + {% endif %}
{% if resource is defined and resource.freeText is not null %} - + {% else %} - + {% endif %}
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 9bce912a0..94e6083ca 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -265,6 +265,10 @@ no comment found: "Aucun commentaire" Select a type: "Choisissez un type" Select a person: "Choisissez un usager" Kind: "Type" +person_resource: + person_non_prof: "Usager/ Tiers non-professionnel" + thirdparty_prof: "Tiers professionnel" + freetext: "Description libre" # pickAPersonType From ec957a2fe39e43ef7bf4fbca3efc4ed2270df4bd Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 17 Jun 2025 19:26:23 +0200 Subject: [PATCH 4/6] Improve UX with better labeling in person resource form --- .changes/unreleased/UX-20250617-192650.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/UX-20250617-192650.yaml diff --git a/.changes/unreleased/UX-20250617-192650.yaml b/.changes/unreleased/UX-20250617-192650.yaml new file mode 100644 index 000000000..810758b10 --- /dev/null +++ b/.changes/unreleased/UX-20250617-192650.yaml @@ -0,0 +1,6 @@ +kind: UX +body: Improve labeling of fields in person resource creation form +time: 2025-06-17T19:26:50.599703116+02:00 +custom: + Issue: "" + SchemaChange: No schema change From 606435a6b33057f085f5dbe77c921d28df594721 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Jul 2025 14:42:54 +0200 Subject: [PATCH 5/6] Pipeline corrections --- .../Controller/ActivityReasonController.php | 1 - .../vuejs/_components/Entity/UserRenderBoxBadge.vue | 8 ++++---- .../vuejs/AccompanyingCourse/components/StickyNav.vue | 2 +- .../components/FormEvaluation.vue | 3 ++- .../vuejs/_components/AccompanyingPeriod/SetReferrer.vue | 2 +- .../src/Resources/public/module/pending/index.ts | 2 -- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php index 0167273c5..7512b21ed 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php @@ -17,7 +17,6 @@ use Chill\ActivityBundle\Repository\ActivityReasonRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * ActivityReason controller. diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue index 4645f322d..63c43c37f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Entity/UserRenderBoxBadge.vue @@ -1,11 +1,11 @@