mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
vue_visgraph: improve household links (edges)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { createStore } from 'vuex'
|
||||
import { getHouseholdByPerson, getCoursesByPerson, getRelationshipByPerson } from './api'
|
||||
import { adapt2vis } from './vis-network'
|
||||
import { adapt2vis, getHouseholdLabel, getHouseholdWidth } from './vis-network'
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production'
|
||||
|
||||
@@ -139,8 +139,8 @@ const store = createStore({
|
||||
* @param Household household
|
||||
*/
|
||||
addLinkFromPersonsToHousehold({ commit }, household) {
|
||||
const members = household.members.filter(v => household.current_members_id.includes(v.id))
|
||||
members.forEach(m => {
|
||||
const currentMembers = household.members.filter(v => household.current_members_id.includes(v.id))
|
||||
currentMembers.forEach(m => {
|
||||
//console.log('-> addLink from person', m.person.id, 'to household', m.person.current_household_id)
|
||||
commit('addLink', {
|
||||
from: `${m.person.type}_${m.person.id}`,
|
||||
@@ -148,9 +148,9 @@ const store = createStore({
|
||||
id: `p${m.person.id}-h${m.person.current_household_id}`,
|
||||
arrows: 'from',
|
||||
color: 'pink',
|
||||
font: { color: 'pink' },
|
||||
label: 'enfant',
|
||||
////group: 'link_person_household',
|
||||
font: { color: '#D04A60' },
|
||||
label: getHouseholdLabel(m),
|
||||
width: getHouseholdWidth(m),
|
||||
})
|
||||
})
|
||||
|
||||
@@ -203,9 +203,8 @@ const store = createStore({
|
||||
id: `p${p.person.id}-c`+ course.id.split('_')[2],
|
||||
arrows: 'to',
|
||||
color: 'orange',
|
||||
font: { color: 'orange' },
|
||||
font: { color: 'darkorange' },
|
||||
label: 'concerné',
|
||||
//group: 'link_person_course',
|
||||
})
|
||||
})
|
||||
},
|
||||
|
Reference in New Issue
Block a user