mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
visgraph, fix details
This commit is contained in:
parent
b904e33d9b
commit
f92b4b0ea3
@ -239,15 +239,12 @@ export default {
|
|||||||
}
|
}
|
||||||
let node = data.nodes[0]
|
let node = data.nodes[0]
|
||||||
|
|
||||||
// test
|
|
||||||
//this.countLinksByNode(node)
|
|
||||||
|
|
||||||
let nodeType = splitId(node, 'type')
|
let nodeType = splitId(node, 'type')
|
||||||
switch (nodeType) {
|
switch (nodeType) {
|
||||||
case 'person':
|
case 'person':
|
||||||
let person = this.nodes.filter(n => n.id === node)[0]
|
let person = this.nodes.filter(n => n.id === node)[0]
|
||||||
console.log('@@@@@@ event on selected Node', person.id)
|
console.log('@@@@@@ event on selected Node', person.id)
|
||||||
if (person.label === null) {
|
if (person.folded === true) {
|
||||||
this.$store.commit('unfoldPerson', person)
|
this.$store.commit('unfoldPerson', person)
|
||||||
this.forceUpdateComponent()
|
this.forceUpdateComponent()
|
||||||
}
|
}
|
||||||
@ -268,15 +265,9 @@ export default {
|
|||||||
break
|
break
|
||||||
|
|
||||||
default:
|
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() {
|
forceUpdateComponent() {
|
||||||
//console.log('!! forceUpdateComponent !!')
|
//console.log('!! forceUpdateComponent !!')
|
||||||
|
@ -106,7 +106,7 @@ const store = createStore({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
//console.log('array', array.map(item => item.person.id))
|
//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
|
return withFolded
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -223,6 +223,9 @@ const store = createStore({
|
|||||||
* @param person
|
* @param person
|
||||||
*/
|
*/
|
||||||
fetchInfoForPerson({ dispatch }, 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) {
|
if (null !== person.current_household_id) {
|
||||||
dispatch('fetchHouseholdForPerson', person)
|
dispatch('fetchHouseholdForPerson', person)
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ const getAge = (birthdate) => {
|
|||||||
*/
|
*/
|
||||||
const getHouseholdLabel = (member) => {
|
const getHouseholdLabel = (member) => {
|
||||||
let position = member.position.label.fr
|
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
|
return position + holder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user