Add address to widget add persons

This commit is contained in:
Julien Fastré 2021-06-30 07:50:43 +02:00
parent 028c3e0c31
commit 802125edc6

View File

@ -7,6 +7,10 @@
<span class="birthday" v-if="hasBirthdate"> <span class="birthday" v-if="hasBirthdate">
{{ $d(item.result.birthdate.datetime, 'short') }} {{ $d(item.result.birthdate.datetime, 'short') }}
</span> </span>
<span class="location" v-if="hasAddress">
{{ item.result.current_household_address.text }} -
{{ item.result.current_household_address.postcode.name }}
</span>
</div> </div>
<div class="right_actions"> <div class="right_actions">
@ -29,12 +33,15 @@ import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
export default { export default {
name: 'SuggestionPerson', name: 'SuggestionPerson',
components: { components: {
OnTheFly OnTheFly,
}, },
props: ['item'], props: ['item'],
computed: { computed: {
hasBirthdate() { hasBirthdate() {
return this.item.result.birthdate !== null; return this.item.result.birthdate !== null;
},
hasAddress() {
return this.item.result.current_household_address !== null;
} }
} }
} }