Fix household link in parcours banner

This commit is contained in:
Julie Lenaerts 2025-02-05 18:09:34 +01:00
parent 096466e79e
commit dacaaea235
2 changed files with 10 additions and 4 deletions

View File

@ -0,0 +1,6 @@
kind: Fixed
body: Fix household link in the parcours banner
time: 2025-02-05T18:09:16.862642565+01:00
custom:
Issue: ""
SchemaChange: No schema change

View File

@ -25,10 +25,10 @@
:class="{ household: pk > -1, 'no-household': pk === -1 }"
:key="h.id"
>
<a v-if="pk !== -1" :href="householdLink(h)">
<a v-if="pk !== -1" :href="householdLink(pk)">
<i
class="fa fa-home fa-fw text-light"
:title="$t('persons_associated.show_household_number', { id: h })"
:title="$t('persons_associated.show_household_number', { id: pk })"
></i>
</a>
<span v-for="person in persons" class="me-1" :key="person.id">
@ -87,8 +87,8 @@ export default {
personsByHousehold() {
const households = new Map();
this.accompanyingCourse.participations
.filter((p) => p.endDate === null)
.map((p) => p.person)
.filter((part) => part.endDate === null)
.map((part) => part.person)
.forEach((person) => {
if (!households.has(person.current_household_id || -1)) {
households.set(person.current_household_id || -1, []);