From 1c3c2be176ddc14df8222613dee76e49086e5c60 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Dec 2021 14:10:23 +0100 Subject: [PATCH 1/3] actions list: display badges as clickable onthefly modal --- .../listByAccompanyingCourse.html.twig | 9 +++++--- .../AccompanyingCourseWork/index.html.twig | 22 ++++++++++--------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig index 07aed8686..215b7bb55 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig @@ -92,8 +92,11 @@ %}
- - {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': accompanyingCourse, 'with_display': 'row', 'entity': calendar } %} + {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with { + 'context': accompanyingCourse, + 'with_display': 'row', + 'entity': calendar + } %}
{% if calendar.comment.comment is not empty %} @@ -123,4 +126,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig index 844b2d611..eb885d50a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig @@ -65,11 +65,12 @@
{% for p in w.persons %} - - {{ p|chill_entity_render_box({ - 'render': 'raw', - 'addAltNames': false - }) }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'person', id: p.id }, + buttonText: p|chill_entity_render_string + } %} {% endfor %}
@@ -82,11 +83,12 @@

{{ 'Thirdparty handling'|trans }}

- - {{ w.handlingThierParty|chill_entity_render_box({ - 'render': 'raw', - 'addAltNames': false - }) }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'thirdparty', id: w.handlingThierParty.id }, + buttonText: w.handlingThierParty|chill_entity_render_string + } %}
From 94ec165c4c84f534180368bc0e9eb36588e53217 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Dec 2021 14:23:33 +0100 Subject: [PATCH 2/3] accompanyingCourse list: display badges as clickable onthefly modal --- CHANGELOG.md | 7 +++-- .../views/AccompanyingPeriod/_list.html.twig | 29 +++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bef98f3e1..20a25edc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,10 +24,13 @@ and this project adheres to * [visgraph] improve and fix bugs on vis-network relationship graph * [bugfix] posting of birth- and deathdate through api fixed. * [suggestions] improve suggestions lists -* [badge-entity] design coherency between badge-person and 3 kinds of badge-thirdparty +* [badge-entity] design coherency between pills badge-person and 3 kinds of badge-thirdparty * [AddPersons] suggestions row are clickable, not only checkbox * [activity] improve show/new/edit templates, fix SEE and SEE_DETAILS acl -* [activity][calendar] concerned groups items are clickable with on-the-fly modal, create specific badge for TMS column +* [badges] create specific badge for TMS, and make person/thirdparty badges clickable with on-the-fly modal in : + * concerned groups items (activity, calendar) + * accompanyingCourseWork lists + * accompanyingCourse lists ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig index af8657e28..ebfbed604 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig @@ -66,10 +66,22 @@

{{ 'Requestor'|trans({'gender': null }) }}

{% if accompanying_period.requestorPerson is not null %} - {{ accompanying_period.requestorPerson|chill_entity_render_string }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'person', id: accompanying_period.requestorPerson.id }, + buttonText: accompanying_period.requestorPerson|chill_entity_render_string + } %} + {% endif %} {% if accompanying_period.requestorThirdParty is not null %} - {{ accompanying_period.requestorThirdParty|chill_entity_render_string }} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'thirdparty', id: accompanying_period.requestorThirdParty.id }, + buttonText: accompanying_period.requestorThirdParty|chill_entity_render_string + } %} + {% endif %}
@@ -80,13 +92,12 @@

{{ 'Participants'|trans }}

{% for p in accompanying_period.getCurrentParticipations %} - - - {{ p.person|chill_entity_render_string }} - - {# or in renderbox mode - {{ p.person|chill_entity_render_box({'render': 'label', 'addAltNames': false, 'addLink': true, 'hLevel': 5 }) }} - #} + + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: 'person', id: p.person.id }, + buttonText: p.person|chill_entity_render_string + } %} {% endfor %}
From 3592434623b0796576d9814bafa8a4c65f5932b9 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Dec 2021 15:37:12 +0100 Subject: [PATCH 3/3] onthefly create thirdparty: use badge-entity for radio buttons label --- .../vuejs/_components/OnTheFly/ThirdParty.vue | 30 +++++++------------ .../views/ThirdParty/update.html.twig | 2 +- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index 2d540530d..dc9025886 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -26,17 +26,19 @@
@@ -97,26 +99,16 @@ import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue'; import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress'; import { getThirdparty } from '../../_api/OnTheFly'; - -const i18n = { - messages: { - fr: { - tparty: { - contact: "Personne physique", - company: "Personne morale" - } - } - } -}; +import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue'; export default { name: "OnTheFlyThirdParty", props: ['id', 'type', 'action'], components: { ThirdPartyRenderBox, - AddAddress + AddAddress, + BadgeEntity }, - i18n, data() { return { //context: {}, <-- diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig index 75e165270..2d9c39002 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig @@ -12,7 +12,7 @@ {% block crud_content_header %}

{{ 'Update third party %name%'|trans({ '%name%': thirdParty.name }) }} - {{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}