vue_accourse: adding current_household link on associated_persons

This commit is contained in:
2021-09-06 15:05:08 +02:00
parent 1262d8cc16
commit 93c08f7e18
5 changed files with 37 additions and 12 deletions

View File

@@ -44,8 +44,15 @@
<ul class="list-content fa-ul">
<li v-if="person.current_household_address">
<i class="fa fa-li fa-map-marker"></i>
<address-render-box :address="person.current_household_address" :isMultiline="isMultiline"></address-render-box>
<i class="fa fa-li fa-map-marker"></i>
<address-render-box :address="person.current_household_address" :isMultiline="isMultiline"></address-render-box>
<a :href="getCurrentHouseholdUrl" :title="$t('persons_associated.show_household_number', {id: person.current_household_id})">
<span class="badge rounded-pill bg-chill-beige">
<i class="fa fa-fw fa-home"></i>
<!--{{ $t('persons_associated.show_household') }}-->
</span>
</a>
<br>
</li>
<li v-else-if="options.addNoData">
<i class="fa fa-li fa-map-marker"></i>
@@ -116,7 +123,7 @@ export default {
components: {
AddressRenderBox
},
props: ['person', 'options', 'render'],
props: ['person', 'options', 'render', 'returnPath'],
computed: {
getGender: function() {
return this.person.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
@@ -153,6 +160,9 @@ export default {
},
getUrl() {
return `/fr/person/${this.person.id}/general`;
},
getCurrentHouseholdUrl() {
return `/fr/person/household/${this.person.current_household_id}/summary?returnPath=${this.returnPath}`
}
}
}