diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue index e0f8e7f3c..e671ce7ad 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue @@ -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 diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js index bf9d894d5..5172d8074 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.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',