diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Household/Household.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Household/Household.vue
index df421a8e8..def7e6971 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Household/Household.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Household/Household.vue
@@ -11,11 +11,14 @@
-
+
{{ $t('current_members') }}:
-
+
- ,
+
+ {{ $t('holder') }}
+
+ ,
@@ -85,6 +88,7 @@ const i18n = {
"no_current_address": "Sans adresse actuellement",
"new_household": "Nouveau ménage",
"no_members_yet": "Aucun membre actuellement",
+ "holder": "titulaire",
}
}
}
@@ -99,10 +103,28 @@ export default {
},
i18n,
methods: {
- current_members() {
- return this.household.members.filter(m => this.household.current_members_id.includes(m.id));
+ hasCurrentMembers() {
+ return this.household.current_members_id.length > 0;
},
- current_members_length() {
+ currentMembers() {
+ return this.household.members.filter(m => this.household.current_members_id.includes(m.id))
+ .sort((a, b) => {
+ if (a.position.ordering < b.position.ordering) {
+ return -1;
+ }
+ if (a.position.ordering > b.position.ordering) {
+ return 1;
+ }
+ if (a.holder && !b.holder) {
+ return -1;
+ }
+ if (!a.holder && b.holder) {
+ return 1;
+ }
+ return 0;
+ });
+ },
+ currentMembersLength() {
return this.household.current_members_id.length;
},
isHouseholdNew() {