From 2d230683547b246cb740af25be4b8674d01b5773 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 18 Feb 2022 17:07:53 +0100 Subject: [PATCH 01/16] start to display profession/fonction of thirdparty --- .../public/vuejs/_components/Entity/ThirdPartyRenderBox.vue | 3 +++ .../Serializer/Normalizer/ThirdPartyNormalizer.php | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index fb466f929..92e2915fd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -22,6 +22,8 @@ +

{{ thirdparty.profession }}

+

@@ -111,6 +113,7 @@ export default { props: ['thirdparty', 'options'], computed: { isMultiline: function() { + console.log('thirdparty', this.thirdparty) if (this.options.isMultiline){ return this.options.isMultiline } else { diff --git a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php index 6ffcc2dea..6cb37a8c6 100644 --- a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php +++ b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php @@ -45,6 +45,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf 'isChild' => $thirdParty->isChild(), 'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context), 'civility' => $this->normalizer->normalize($thirdParty->getCivility(), $format, $context), + 'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context), 'contactDataAnonymous' => $thirdParty->isContactDataAnonymous(), ]; } From 874c90e0e0bfc553ccd5e88532d4fc82c3655b3f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 18 Feb 2022 17:07:53 +0100 Subject: [PATCH 02/16] start to display profession/fonction of thirdparty --- .../public/vuejs/_components/Entity/ThirdPartyRenderBox.vue | 3 +++ .../Serializer/Normalizer/ThirdPartyNormalizer.php | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index fb466f929..92e2915fd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -22,6 +22,8 @@ +

{{ thirdparty.profession }}

+

@@ -111,6 +113,7 @@ export default { props: ['thirdparty', 'options'], computed: { isMultiline: function() { + console.log('thirdparty', this.thirdparty) if (this.options.isMultiline){ return this.options.isMultiline } else { diff --git a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php index 6ffcc2dea..6cb37a8c6 100644 --- a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php +++ b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php @@ -45,6 +45,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf 'isChild' => $thirdParty->isChild(), 'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context), 'civility' => $this->normalizer->normalize($thirdParty->getCivility(), $format, $context), + 'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context), 'contactDataAnonymous' => $thirdParty->isContactDataAnonymous(), ]; } From 292d56cfbee17df09bfec3058b0655bc411db9c9 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 21 Feb 2022 16:38:55 +0100 Subject: [PATCH 03/16] email added to person renderbox --- .../public/vuejs/_components/Entity/PersonRenderBox.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index dd26db217..ad722faa3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -102,6 +102,15 @@

{{ $t('renderbox.no_data') }}

+
  • + + {{ person.email }} +
  • +
  • + +

    {{ $t('renderbox.no_data') }}

    +
  • +
  • From 5d530aaae95081cefdf050a55061f6a29a9f19c3 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 22 Feb 2022 15:04:53 +0100 Subject: [PATCH 04/16] Fix confidential toggle bug --- .../public/vuejs/_components/Confidential.vue | 16 +------ .../_components/Entity/AddressRenderBox.vue | 2 +- .../Entity/ThirdPartyRenderBox.vue | 42 +++++++++++-------- 3 files changed, 27 insertions(+), 33 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue index 0a34c4123..3961a43cd 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue @@ -1,6 +1,6 @@ - @@ -94,6 +93,7 @@ export default { return this.isMultiline === true ? "multiline" : ""; }, isConfidential() { + console.log(this.address.confidential) return this.address.confidential; } } diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 92e2915fd..d93566de7 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -44,25 +44,31 @@ +
  • + +

    {{ p[0].toUpperCase() + p.slice(1).toLowerCase() }}

    +
  • - - - +
    + + + +
    • From 262bb13b6c5dc722c4d4d752e2381933e0747238 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 22 Feb 2022 15:05:43 +0100 Subject: [PATCH 05/16] Adding fonction in personrenderbox --- .../Entity/ThirdPartyProfession.php | 4 +-- .../Entity/ThirdPartyRenderBox.vue | 24 ++++++++++++----- .../Normalizer/ThirdPartyNormalizer.php | 27 ++++++++++++++++--- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php index 1963b34a7..eb852f367 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php @@ -30,13 +30,13 @@ class ThirdPartyProfession * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") - * @Serializer\Groups({"docgen:read"}) + * @Serializer\Groups({"read", "docgen:read"}) */ private ?int $id = null; /** * @ORM\Column(type="json") - * @Serializer\Groups({"docgen:read"}) + * @Serializer\Groups({"read", "docgen:read"}) */ private array $name = []; diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index d93566de7..6b2ba3218 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -22,8 +22,6 @@ -

      {{ thirdparty.profession }}

      -

      @@ -96,10 +94,8 @@ From daab42109b69065699608325dd0168fd04ba5e05 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 22 Feb 2022 15:07:40 +0100 Subject: [PATCH 07/16] style adjustment --- .../public/vuejs/_components/Entity/ThirdPartyRenderBox.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 6b2ba3218..6693d36eb 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -154,7 +154,7 @@ export default { .list-item { &::after { - content: "|"; + content: " | "; } &:last-child::after { content: "" From fd0ca3b29d7c49680608f162995c115e93cf0f9e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 22 Feb 2022 15:07:40 +0100 Subject: [PATCH 08/16] =?UTF-8?q?style=20adjustment=20+=20if=20contact=20d?= =?UTF-8?q?isplay=20qualit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/Entity/ThirdPartyRenderBox.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 6b2ba3218..78253b43f 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -124,13 +124,17 @@ export default { return !(this.thirdparty.parent === null || this.thirdparty.parent === undefined); }, getProfession() { - let profession = [] - - if (this.thirdparty.category) { - profession = this.thirdparty.category.map((category) => category.text); + if (this.hasParent) { + console.log('im here') + let profession = [] + profession.push(this.thirdparty.profession.name.fr) + return profession; + } + + if (!this.hasParent && this.thirdparty.category) { + return this.thirdparty.category.map((category) => category.text); } - return profession } /* TODO need backend normalizer to serve children without circular reference hasChildren() { @@ -154,7 +158,7 @@ export default { .list-item { &::after { - content: "|"; + content: " | "; } &:last-child::after { content: "" From cc4dfdb042ca806883bd5b9d2cc4949689314793 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 22 Feb 2022 15:24:14 +0100 Subject: [PATCH 09/16] style adjustment --- .../public/vuejs/_components/AddPersons/TypeThirdParty.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue index ddda65f35..536112986 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue @@ -100,7 +100,7 @@ export default { .profession { font-weight: 800; color: black; - font-style: normal; + font-style: normal !important; } } } From fffed6e3f6434e8337c08fcf0a6f97dd55dc9097 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 23 Feb 2022 10:24:01 +0100 Subject: [PATCH 10/16] Attempt to add on-the-fly for parent badge Error: failed to resolve component on-the-fly --- .../vuejs/OnTheFly/components/OnTheFly.vue | 39 +++++++++---------- .../Entity/ThirdPartyRenderBox.vue | 34 ++++++++++------ 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue index b03b98b23..e50c2a41f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -1,11 +1,11 @@ @@ -44,10 +44,10 @@ ref="castThirdparty">
      -

      {{ $t('onthefly.resource_comment_title') }}

      -
      - {{ parent.comment }} -
      +

      {{ $t('onthefly.resource_comment_title') }}

      +
      + {{ parent.comment }} +
      @@ -104,12 +104,11 @@ export default { }, computed: { hasResourceComment() { - //console.log('hasResourceComment', this.parent); - return (typeof this.parent !== 'undefined' && this.parent !== null) - && this.action === 'show' - && this.parent.type === 'accompanying_period_resource' - && (this.parent.comment !== null && this.parent.comment !== '') - ; + return (typeof this.parent !== 'undefined' && this.parent !== null) + && this.action === 'show' + && this.parent.type === 'accompanying_period_resource' + && (this.parent.comment !== null && this.parent.comment !== '') + ; }, classAction() { switch (this.action) { diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 78253b43f..0149fc5d6 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -34,18 +34,27 @@
        -
      • - - {{ $t('child_of') }} - {{ thirdparty.parent.text }} -
      • -
      • {{ p[0].toUpperCase() + p.slice(1).toLowerCase() }}

      • +
      • + + {{ $t('child_of') }} + + + {{ thirdparty.parent.text}} + +
      • +
      @@ -96,10 +105,12 @@ import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue'; import Confidential from 'ChillMainAssets/vuejs/_components/Confidential.vue'; import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue'; +// import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue'; export default { name: "ThirdPartyRenderBox", components: { + // OnTheFly, AddressRenderBox, Confidential, BadgeEntity, @@ -124,17 +135,16 @@ export default { return !(this.thirdparty.parent === null || this.thirdparty.parent === undefined); }, getProfession() { + let profession = [] if (this.hasParent) { - console.log('im here') - let profession = [] profession.push(this.thirdparty.profession.name.fr) return profession; } if (!this.hasParent && this.thirdparty.category) { - return this.thirdparty.category.map((category) => category.text); + profession = this.thirdparty.category.map((category) => category.text); } - + return profession; } /* TODO need backend normalizer to serve children without circular reference hasChildren() { From 0601fa014276f357712cf50300395442e6f78a4f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 23 Feb 2022 10:24:24 +0100 Subject: [PATCH 11/16] changelog updated --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53f2a855a..324e30ba4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ and this project adheres to * [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435) * [parcours]: Order social activities and only display most recent three in parcours resumé (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/481) * [parcours / addresses]: launch an event when a person change address (either through changing household or because the household is associated to a new address). If the person is localising a course, the course location go back to a temporarily address. +* [thirdparty]: address/phonenumber/email/fonction displayed in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/401) +* [thirdparty_contact]: in search results the 'qualité' is displayed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/465) +* [bug]: fix confidential toggle of address in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/460) ## Test releases From d486f2ddfc9a70b5294a7dbc19a3d1908f4a4ddd Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 23 Feb 2022 10:46:25 +0100 Subject: [PATCH 12/16] fix styling of confidential toggle button in renderboxes --- .../ChillMainBundle/Resources/public/module/blur/blur.scss | 5 +++++ .../Resources/public/vuejs/_components/Confidential.vue | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss b/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss index ec96289de..b56609d85 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/blur/blur.scss @@ -1,10 +1,15 @@ .confidential{ display: flex; + position: relative; } .toggle{ margin-left: 30px; margin-top: 5px; cursor: pointer; + position: absolute; + bottom: 0px; + right: 10px; + z-index: 5; } .blur { -webkit-filter: blur(5px); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue index 3961a43cd..3d237a2d4 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Confidential.vue @@ -29,6 +29,5 @@ export default { From c416f1ef6dde180ce32ca84c223f3d74d0af988f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 25 Feb 2022 13:58:17 +0100 Subject: [PATCH 13/16] fix bug to resolve onthefly component within thirdparty renderbox --- .../vuejs/OnTheFly/components/OnTheFly.vue | 2 +- .../Entity/ThirdPartyRenderBox.vue | 23 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue index e50c2a41f..40b59a86a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -1,7 +1,7 @@