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

@@ -33,7 +33,7 @@ import AddressRenderBox from "ChillMainAssets/vuejs/_components/Entity/AddressRe
export default {
name: "ButtonLocation",
components: {
import AddressRenderBox from,
AddressRenderBox,
Modal,
},
props: ['person'],

View File

@@ -9,7 +9,8 @@
addAge : false,
hLevel : 3,
}"
:person="participation.person">
:person="participation.person"
:returnPath="getAccompanyingCourseReturnPath">
<template v-slot:record-actions>
<ul class="record_actions">
@@ -40,11 +41,17 @@
<li>
<button v-if="!participation.endDate"
class="btn btn-sm btn-remove"
v-bind:title="$t('action.remove')"
v-bind:title="$t('persons_associated.leave_course')"
@click.prevent="$emit('close', participation)">
</button>
<button v-else
class="btn btn-sm btn-remove disabled"></button>
class="btn btn-sm btn-secondary"
:title="$t('persons_associated.date_start_to_end', {
start: $d(participation.startDate.datetime, 'short'),
end: $d(participation.endDate.datetime, 'short')
})">
<i class="fa fa-fw fa-info"></i>
</button>
</li>
</ul>
@@ -86,6 +93,9 @@ export default {
return true;
}
return false;
},
getAccompanyingCourseReturnPath() {
return `fr/parcours/${this.$store.state.accompanyingCourse.id}/edit#section-10`;
}
}
}
@@ -93,10 +103,7 @@ export default {
/*
* dates of participation
*
* :title="$t('persons_associated.date_start_to_end', {
* start: $d(participation.startDate.datetime, 'short'),
* end: $d(participation.endDate.datetime, 'short')
* })"
*
*
* <tr>
* <td><span v-if="participation.startDate">

View File

@@ -42,6 +42,9 @@ const appMessages = {
enddate: "Date de sortie",
add_persons: "Ajouter des usagers",
date_start_to_end: "Participation du {start} au {end}",
leave_course: "L'usager quitte le parcours",
show_household_number: "Voir le ménage n° {id}",
show_household: "Voir le ménage"
},
requestor: {
title: "Demandeur",