From 4592be3a8de014751f03f17b22d72c41282829b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 14 Jun 2022 16:34:41 +0200 Subject: [PATCH 1/2] improve syntax for the js fix --- .../Resources/public/vuejs/_components/OnTheFly/Person.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue index 799bc3caf..4f8909233 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue @@ -333,10 +333,10 @@ export default { addQueryItem(field, queryItem) { switch (field) { case 'lastName': - this.person.lastName ? this.person.lastName += ` ${queryItem}` : this.person.lastName = queryItem; + this.person.lastName = this.person.lastName ? this.person.lastName += ` ${queryItem}` : queryItem; break; case 'firstName': - this.person.firstName ? this.person.firstName += ` ${queryItem}` : this.person.firstName = queryItem; + this.person.firstName = this.person.firstName ? this.person.firstName += ` ${queryItem}` : queryItem; break; } }, From f339cf56d67239e7cb01cd2bb02d7277bc7f82b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 14 Jun 2022 21:24:28 +0200 Subject: [PATCH 2/2] notify the referrer from an activity page or list --- .../Resources/views/Activity/list.html.twig | 30 +++++++++++++++---- .../Resources/views/Activity/show.html.twig | 27 +++++++++++++++-- 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index f8b68eabd..79c946f17 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -2,12 +2,30 @@ {% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %} {% if no_action is not defined or no_action == false %}
  • - - - {{ 'notification.Notify'|trans }} + {% set showGroup = activity.accompanyingPeriod is not null and activity.accompanyingPeriod.hasUser and activity.accompanyingPeriod.user is not same as(app.user) %} +
    + {% if showGroup %} + + + {% else %} + + {{ 'notification.Notify'|trans }} + + {% endif %} +
  • {% endif %} {% if context == 'person' and activity.accompanyingPeriod is not empty %} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index bf4c5c7b6..49e71bfad 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -217,9 +217,30 @@
  • - - {{ 'notification.Notify'|trans }} - + {% set showGroup = entity.accompanyingPeriod is not null and entity.accompanyingPeriod.hasUser and entity.accompanyingPeriod.user is not same as(app.user) %} +
    + {% if showGroup %} + + + {% else %} + + {{ 'notification.Notify'|trans }} + + {% endif %} +
  • {% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}