mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
person can be added to filiation graph and relationship created
This commit is contained in:
parent
c7caa2ba76
commit
8d5c66dc40
@ -180,24 +180,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addNewPersons({ selected, modal }) {
|
||||
console.log('@@@ CLICK button addNewPersons', selected);
|
||||
// selected.forEach(function(item) {
|
||||
// this.$store.dispatch('addPerson', item)
|
||||
// .catch(({name, violations}) => {
|
||||
// if (name === 'ValidationException' || name === 'AccessException') {
|
||||
// violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||
// } else {
|
||||
// this.$toast.open({message: violations})
|
||||
// }
|
||||
// });
|
||||
// }, this
|
||||
// );
|
||||
// this.$refs.addPersons.resetSearch(); // to cast child method
|
||||
// modal.showModal = false;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['nodes', 'edges',
|
||||
// not used 'isInWhitelist', 'isHouseholdLoading', 'isCourseLoaded', 'isRelationshipLoaded', 'isPersonLoaded', 'isExcludedNode', 'countLinksByNode', 'getParticipationsByCourse', 'getMembersByHousehold', 'getPersonsGroup',
|
||||
@ -278,7 +260,22 @@ export default {
|
||||
this.link = document.getElementById('exportCanvasBtn')
|
||||
},
|
||||
methods: {
|
||||
|
||||
addNewPersons({ selected, modal }) {
|
||||
// console.log('@@@ CLICK button addNewPersons', selected);
|
||||
selected.forEach(function(item) {
|
||||
this.$store.dispatch('addPerson', item.result)
|
||||
.catch(({name, violations}) => {
|
||||
if (name === 'ValidationException' || name === 'AccessException') {
|
||||
violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||
} else {
|
||||
this.$toast.open({message: violations})
|
||||
}
|
||||
});
|
||||
}, this
|
||||
);
|
||||
this.$refs.addPersons.resetSearch(); // to cast child method
|
||||
modal.showModal = false;
|
||||
},
|
||||
initGraph() {
|
||||
this.container = document.getElementById('visgraph')
|
||||
// Instanciate vis objects in separate window variables, see vis-network.js
|
||||
|
@ -1,5 +1,11 @@
|
||||
const visMessages = {
|
||||
fr: {
|
||||
add_persons: {
|
||||
title: "Ajouter des usagers",
|
||||
suggested_counter: "Pas de résultats | 1 résultat | {count} résultats",
|
||||
selected_counter: " 1 sélectionné | {count} sélectionnés",
|
||||
search_some_persons: "Rechercher des personnes..",
|
||||
},
|
||||
visgraph: {
|
||||
Course: 'Parcours',
|
||||
Household: 'Ménage',
|
||||
|
Loading…
x
Reference in New Issue
Block a user