mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
condition on persons to see button location
This commit is contained in:
parent
17dd52c3dc
commit
2d2bb117ca
@ -13,7 +13,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<button-location
|
<button-location
|
||||||
v-if="!participation.endDate">
|
v-if="hasCurrentHouseholdAddress">
|
||||||
</button-location>
|
</button-location>
|
||||||
<li>
|
<li>
|
||||||
<on-the-fly
|
<on-the-fly
|
||||||
@ -60,5 +60,14 @@ export default {
|
|||||||
},
|
},
|
||||||
props: ['participation'],
|
props: ['participation'],
|
||||||
emits: ['remove', 'close'],
|
emits: ['remove', 'close'],
|
||||||
|
computed: {
|
||||||
|
hasCurrentHouseholdAddress() {
|
||||||
|
if ( !this.participation.endDate
|
||||||
|
&& this.participation.person.current_household_address !== null ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<button-location
|
<button-location
|
||||||
v-if="resource.resource.type === 'person'">
|
v-if="hasCurrentHouseholdAddress">
|
||||||
</button-location>
|
</button-location>
|
||||||
<li>
|
<li>
|
||||||
<on-the-fly
|
<on-the-fly
|
||||||
@ -60,6 +60,15 @@ export default {
|
|||||||
ButtonLocation
|
ButtonLocation
|
||||||
},
|
},
|
||||||
props: ['resource'],
|
props: ['resource'],
|
||||||
emits: ['remove']
|
emits: ['remove'],
|
||||||
|
computed: {
|
||||||
|
hasCurrentHouseholdAddress() {
|
||||||
|
if ( !this.resource.resource.type === 'person'
|
||||||
|
&& this.resource.resource.current_household_address !== null ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user