use pick dynamic user type for reassigning + layout stuffs

This commit is contained in:
2022-05-02 15:37:23 +02:00
parent 0ec859e345
commit 8113fddcb2
7 changed files with 92 additions and 79 deletions

View File

@@ -66,9 +66,18 @@ export default {
translatedListOfTypes() {
let trans = [];
this.types.forEach(t => {
trans.push(appMessages.fr.pick_entity[t].toLowerCase());
if (this.$props.multiple) {
trans.push(appMessages.fr.pick_entity[t].toLowerCase());
} else {
trans.push(appMessages.fr.pick_entity[t + '_one'].toLowerCase());
}
})
return appMessages.fr.pick_entity.modal_title + trans.join(', ');
if (this.$props.multiple) {
return appMessages.fr.pick_entity.modal_title + trans.join(', ');
} else {
return appMessages.fr.pick_entity.modal_title_one + trans.join(', ');
}
}
},
methods: {
@@ -79,15 +88,10 @@ export default {
);
this.$refs.addPersons.resetSearch(); // to cast child method
modal.showModal = false;
console.log(this.picked)
},
removeEntity(entity) {
console.log('remove entity', entity);
this.$emit('removeEntity', entity);
}
},
mounted() {
console.log(this.picked);
}
}
</script>

View File

@@ -11,6 +11,10 @@ const appMessages = {
user: 'Utilisateurs',
person: 'Usagers',
thirdparty: 'Tiers',
modal_title_one: 'Indiquer un ',
user_one: 'Utilisateur',
thirdparty_one: 'Tiers',
person_one: 'Usager',
}
}
}