mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
minor changes, and cleaning code
This commit is contained in:
parent
7dc9021eca
commit
7230fd9c07
@ -1,6 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<test></test>
|
|
||||||
|
|
||||||
<banner></banner>
|
<banner></banner>
|
||||||
<sticky-nav></sticky-nav>
|
<sticky-nav></sticky-nav>
|
||||||
|
|
||||||
@ -26,7 +24,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import test from 'ChillPersonAssets/vuejs/VisGraph/components/test'
|
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import Banner from './components/Banner.vue';
|
import Banner from './components/Banner.vue';
|
||||||
import StickyNav from './components/StickyNav.vue';
|
import StickyNav from './components/StickyNav.vue';
|
||||||
@ -44,7 +41,6 @@ import Confirm from './components/Confirm.vue';
|
|||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
components: {
|
components: {
|
||||||
test,
|
|
||||||
Banner,
|
Banner,
|
||||||
StickyNav,
|
StickyNav,
|
||||||
OriginDemand,
|
OriginDemand,
|
||||||
|
@ -115,7 +115,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import test from './components/test'
|
|
||||||
import vis from 'vis-network/dist/vis-network'
|
import vis from 'vis-network/dist/vis-network'
|
||||||
import { mapState, mapGetters } from "vuex"
|
import { mapState, mapGetters } from "vuex"
|
||||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal'
|
import Modal from 'ChillMainAssets/vuejs/_components/Modal'
|
||||||
@ -126,7 +125,6 @@ import { splitId } from "./vis-network";
|
|||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
components: {
|
components: {
|
||||||
test,
|
|
||||||
Modal,
|
Modal,
|
||||||
VueMultiselect
|
VueMultiselect
|
||||||
},
|
},
|
||||||
@ -159,12 +157,10 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['nodes', 'edges',
|
...mapGetters(['nodes', 'edges',
|
||||||
// not used
|
// not used 'isInWhitelist', 'isHouseholdLoading', 'isCourseLoaded', 'isRelationshipLoaded', 'isPersonLoaded', 'isExcludedNode', 'countLinksByNode', 'getParticipationsByCourse', 'getMembersByHousehold', 'getPersonsGroup',
|
||||||
'isInWhitelist', 'isHouseholdLoading', 'isCourseLoaded', 'isRelationshipLoaded', 'isPersonLoaded', 'isExcludedNode', 'countLinksByNode', 'getParticipationsByCourse', 'getMembersByHousehold', 'getPersonsGroup',
|
|
||||||
]),
|
]),
|
||||||
...mapState(['households', 'courses', 'excludedNodesIds', 'persons',
|
...mapState(['persons', 'households', 'courses', 'excludedNodesIds', 'updateHack',
|
||||||
// not used
|
// not used 'links', 'relationships', 'whitelistIds', 'personLoadedIds', 'householdLoadingIds', 'courseLoadedIds', 'relationshipLoadedIds',
|
||||||
'links', 'relationships', 'whitelistIds', 'personLoadedIds', 'householdLoadingIds', 'courseLoadedIds', 'relationshipLoadedIds',
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
visgraph_data() {
|
visgraph_data() {
|
||||||
@ -333,7 +329,7 @@ export default {
|
|||||||
this.refreshNetwork
|
this.refreshNetwork
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Control Layers
|
/// control Layers
|
||||||
toggleLayer(value) {
|
toggleLayer(value) {
|
||||||
let id = value.target.value
|
let id = value.target.value
|
||||||
console.log('@@@@@@ toggle Layer', id)
|
console.log('@@@@@@ toggle Layer', id)
|
||||||
@ -358,42 +354,35 @@ export default {
|
|||||||
/// control Modal
|
/// control Modal
|
||||||
addRelationshipModal(edgeData) {
|
addRelationshipModal(edgeData) {
|
||||||
//console.log('==- addRelationshipModal', edgeData)
|
//console.log('==- addRelationshipModal', edgeData)
|
||||||
this.modal.data.from = edgeData.from
|
this.modal = {
|
||||||
this.modal.data.to = edgeData.to
|
data: { from: edgeData.from, to: edgeData.to },
|
||||||
this.modal.action = 'create'
|
action: 'create',
|
||||||
this.modal.title = 'visgraph.add_relationship_link'
|
showModal: true,
|
||||||
this.modal.button.class = 'btn-create'
|
title: 'visgraph.add_relationship_link',
|
||||||
this.modal.button.text = 'action.create'
|
button: { class: 'btn-create', text: 'action.create' }
|
||||||
this.modal.showModal = true
|
}
|
||||||
},
|
},
|
||||||
editRelationshipModal(edgeData) {
|
editRelationshipModal(edgeData) {
|
||||||
this.modal.data = edgeData
|
//console.log('==- editRelationshipModal', edgeData)
|
||||||
this.relation = this.modal.data.relation
|
this.modal = {
|
||||||
this.reverse = this.modal.data.reverse
|
data: edgeData,
|
||||||
//console.log('==- editRelationshipModal', this.modal.data)
|
action: 'edit',
|
||||||
this.modal.action = 'edit'
|
showModal: true,
|
||||||
this.modal.title = 'visgraph.edit_relationship_link'
|
title: 'visgraph.edit_relationship_link',
|
||||||
this.modal.button.class = 'btn-edit'
|
button: { class: 'btn-edit', text: 'action.edit' }
|
||||||
this.modal.button.text = 'action.edit'
|
}
|
||||||
this.modal.showModal = true
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// form
|
// form
|
||||||
resetForm() {
|
resetForm() {
|
||||||
console.log('==- reset Form')
|
this.modal = {
|
||||||
this.modal.data = {
|
data: { type: 'relationship', from: null, to: null, relation: null, reverse: false },
|
||||||
type: 'relationship',
|
action: null,
|
||||||
from: null,
|
title: null,
|
||||||
to: null,
|
button: { class: null, text: null, }
|
||||||
relation: null,
|
|
||||||
reverse: false
|
|
||||||
}
|
}
|
||||||
this.modal.action = null
|
console.log('==- reset Form', this.modal.data)
|
||||||
this.modal.title = null
|
|
||||||
this.modal.button.class = null
|
|
||||||
this.modal.button.text = null
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getRelationsList() {
|
getRelationsList() {
|
||||||
//console.log('fetch relationsList')
|
//console.log('fetch relationsList')
|
||||||
return getRelationsList().then(relations => new Promise(resolve => {
|
return getRelationsList().then(relations => new Promise(resolve => {
|
||||||
@ -414,7 +403,7 @@ export default {
|
|||||||
// actions
|
// actions
|
||||||
createRelationship() {
|
createRelationship() {
|
||||||
this.displayHelpMessage = true
|
this.displayHelpMessage = true
|
||||||
this.listenPersonFlag = 'step1'
|
this.listenPersonFlag = 'step1' // toggle listener in create link mode
|
||||||
console.log(' @@> switch listener to create link mode:', this.listenPersonFlag)
|
console.log(' @@> switch listener to create link mode:', this.listenPersonFlag)
|
||||||
},
|
},
|
||||||
dropRelationship() {
|
dropRelationship() {
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<template>
|
|
||||||
<VueMultiselect
|
|
||||||
name="selectLama"
|
|
||||||
id="selectLama"
|
|
||||||
:options="lamas"
|
|
||||||
v-model="lama">
|
|
||||||
</VueMultiselect>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
id="checked"
|
|
||||||
v-model="checked"
|
|
||||||
/> test
|
|
||||||
<h3>{{ checked }} {{ lama }}</h3>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import VueMultiselect from 'vue-multiselect'
|
|
||||||
export default {
|
|
||||||
name: "test",
|
|
||||||
components: {
|
|
||||||
VueMultiselect
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
checked: false,
|
|
||||||
lamas: ['pomme', 'poire', 'banane'],
|
|
||||||
lama: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
checked: {
|
|
||||||
set(value) {
|
|
||||||
this.checked = value
|
|
||||||
},
|
|
||||||
get() {
|
|
||||||
return this.checked
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lama: {
|
|
||||||
get() {
|
|
||||||
return this.lama
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.lama = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -328,7 +328,7 @@ const store = createStore({
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 6) Add each distinct course
|
* 6) Add each distinct course (a person can have multiple courses)
|
||||||
* @param object
|
* @param object
|
||||||
* @param courses
|
* @param courses
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user