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