diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue index 4653f9280..08de455b8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue @@ -239,15 +239,12 @@ export default { } let node = data.nodes[0] - // test - //this.countLinksByNode(node) - let nodeType = splitId(node, 'type') switch (nodeType) { case 'person': let person = this.nodes.filter(n => n.id === node)[0] console.log('@@@@@@ event on selected Node', person.id) - if (person.label === null) { + if (person.folded === true) { this.$store.commit('unfoldPerson', person) this.forceUpdateComponent() } @@ -268,15 +265,9 @@ export default { break default: - throw 'this node type is undefined' + throw 'event is undefined for this type of node' } }) - - /* - window.network.on('selectEdge', (data) => { - console.log('######## event onSelectEdge ########', data) - }) - */ }, forceUpdateComponent() { //console.log('!! forceUpdateComponent !!') diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/store.js index a4fa91458..12305aa9d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/store.js @@ -106,7 +106,7 @@ const store = createStore({ } }) //console.log('array', array.map(item => item.person.id)) - console.log('get FoldedPersons', withFolded.map(f => f.id)) + console.log('get withFoldedPersons', withFolded.map(f => f.id)) return withFolded }, @@ -223,6 +223,9 @@ const store = createStore({ * @param person */ fetchInfoForPerson({ dispatch }, person) { + // TODO enfants hors ménages + // example: household 61 + // console.log(person.text, 'household', person.current_household_id) if (null !== person.current_household_id) { dispatch('fetchHouseholdForPerson', person) } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js index 21e488188..672f4839e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js @@ -211,7 +211,7 @@ const getAge = (birthdate) => { */ const getHouseholdLabel = (member) => { let position = member.position.label.fr - let holder = member.holder ? ` (${visMessages.fr.visgraph.Holder})` : '' + let holder = member.holder ? ` ${visMessages.fr.visgraph.Holder}` : '' return position + holder }