mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
accourse associated_persons: display alert warning if persons without household
This commit is contained in:
parent
e99a371f3a
commit
3a6a0da1dd
@ -30,6 +30,29 @@
|
|||||||
</add-persons>
|
</add-persons>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="participationWithoutHousehold.length > 0" class="alert alert-warning no-household">
|
||||||
|
<i class="fa fa-warning fa-2x"></i>
|
||||||
|
<div class="floatbutton bottom"><div class="box">
|
||||||
|
<div class="action">
|
||||||
|
<button class="btn btn-update">{{ $t('persons_associated.update_household') }}</button>
|
||||||
|
</div>
|
||||||
|
<p class="mb-3">{{ $t('persons_associated.person_without_household_warning') }}</p>
|
||||||
|
<div class="form-check" v-for="p in participationWithoutHousehold">
|
||||||
|
<input type="checkbox"
|
||||||
|
class="form-check-input"
|
||||||
|
v-model="hasNoHousehold"
|
||||||
|
:id="p.person.id"
|
||||||
|
:value="p.person.id" />
|
||||||
|
<label class="form-check-label" for="hasNoHousehold">
|
||||||
|
{{ p.person.text }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -65,6 +88,9 @@ export default {
|
|||||||
},
|
},
|
||||||
counter() {
|
counter() {
|
||||||
return this.currentParticipations.length;
|
return this.currentParticipations.length;
|
||||||
|
},
|
||||||
|
participationWithoutHousehold() {
|
||||||
|
return this.currentParticipations.filter(p => p.person.current_household_id === null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -88,3 +114,29 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
div#accompanying-course {
|
||||||
|
div.vue-component {
|
||||||
|
& > div.alert {
|
||||||
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
|
div.no-household {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
& > i {
|
||||||
|
flex-basis: 1.5em; flex-grow: 0; flex-shrink: 0;
|
||||||
|
padding-top: 0.2em;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
& > div {
|
||||||
|
flex-basis: auto;
|
||||||
|
div.action {
|
||||||
|
button.btn-update {
|
||||||
|
margin-right: 2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -47,7 +47,9 @@ const appMessages = {
|
|||||||
sure_description: "Une fois confirmé, il ne sera pas possible de faire marche arrière ! La sortie reste cependant consignée dans l'historique du parcours.",
|
sure_description: "Une fois confirmé, il ne sera pas possible de faire marche arrière ! La sortie reste cependant consignée dans l'historique du parcours.",
|
||||||
ok: "Oui, l'usager quitte le parcours",
|
ok: "Oui, l'usager quitte le parcours",
|
||||||
show_household_number: "Voir le ménage (n° {id})",
|
show_household_number: "Voir le ménage (n° {id})",
|
||||||
show_household: "Voir le ménage"
|
show_household: "Voir le ménage",
|
||||||
|
person_without_household_warning: "Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.",
|
||||||
|
update_household: "Modifier l'appartenance",
|
||||||
},
|
},
|
||||||
requestor: {
|
requestor: {
|
||||||
title: "Demandeur",
|
title: "Demandeur",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user