mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
visgraph: fix POST response (create link)
This commit is contained in:
parent
4d08f3583e
commit
e7900b8b21
@ -111,6 +111,7 @@ import { mapState, mapGetters } from "vuex"
|
|||||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal'
|
import Modal from 'ChillMainAssets/vuejs/_components/Modal'
|
||||||
import VueMultiselect from 'vue-multiselect'
|
import VueMultiselect from 'vue-multiselect'
|
||||||
import { getRelationsList, postRelationship } from "./api";
|
import { getRelationsList, postRelationship } from "./api";
|
||||||
|
import { adapt2vis } from "./vis-network";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
@ -309,9 +310,10 @@ export default {
|
|||||||
return postRelationship(
|
return postRelationship(
|
||||||
this.getPerson(this.modal.data.from), this.getPerson(this.modal.data.to), this.relation, this.reverse
|
this.getPerson(this.modal.data.from), this.getPerson(this.modal.data.to), this.relation, this.reverse
|
||||||
)
|
)
|
||||||
.then(response => new Promise(resolve => {
|
.then(relationship => new Promise(resolve => {
|
||||||
console.log('', response)
|
console.log('post response', relationship)
|
||||||
modal.showModal = false
|
this.$store.dispatch('addLinkFromRelationship', adapt2vis(relationship))
|
||||||
|
this.modal.showModal = false
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
resolve()
|
resolve()
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user