From 34e1a9b7482d1e648379c575b560abce33576418 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 18 Aug 2021 16:22:38 +0200 Subject: [PATCH] address added to personrenderbox w/ ShowAddress. Adapted to include a multiline option --- .../vuejs/Address/components/ShowAddress.vue | 22 ++++++++++-- .../Resources/public/vuejs/_js/i18n.js | 8 +++++ .../_components/Entity/AddressRenderBox.vue | 2 +- .../_components/Entity/PersonRenderBox.vue | 35 +++++++++---------- 4 files changed, 45 insertions(+), 22 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddress.vue index 786f0dce6..45a5f9fb1 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddress.vue @@ -1,5 +1,5 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index 3964a85fe..e60ce5f8a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -63,6 +63,14 @@ const messages = { thirdparty: "un nouveau tiers professionnel" }, }, + renderbox: { + person: "Person", + birthday: { + man: "Né le", + woman: "Née le" + } , + no_information: "Pas d'information" + } } }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue index e90242d15..daee4177f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/AddressRenderBox.vue @@ -2,7 +2,7 @@
  • - + 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 75566a996..4e177da21 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -35,7 +35,7 @@ - Person + {{ $t('renderbox.person') }} {{ person.id }} @@ -43,9 +43,10 @@

    - + +

    @@ -102,15 +96,20 @@ // import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue'; import {dateToISO} from 'ChillMainAssets/chill/js/date.js'; import AddressRenderBox from './AddressRenderBox.vue'; +import ShowAddress from 'ChillMainAssets/vuejs/Address/components/ShowAddress.vue'; export default { name: "PersonRenderBox", components: { - AddressRenderBox + AddressRenderBox, + ShowAddress }, props: ['person', 'options'], computed: { getGender: function() { + return this.person.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man'; + }, + getGenderIcon: function() { return this.person.gender == 'woman' ? 'fa-venus' : this.person.gender == 'man' ? 'fa-mars' : 'fa-neuter'; }, birthdate: function(){