mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
cleaning
This commit is contained in:
parent
b392bc9e65
commit
bfca6d2afc
@ -82,10 +82,8 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-3"><!--
|
<div class="my-3">
|
||||||
-->
|
|
||||||
<VueMultiselect
|
<VueMultiselect
|
||||||
:value="relation"
|
|
||||||
id="relation"
|
id="relation"
|
||||||
label="title"
|
label="title"
|
||||||
track-by="id"
|
track-by="id"
|
||||||
@ -96,6 +94,7 @@
|
|||||||
:searchable="true"
|
:searchable="true"
|
||||||
:options="relations"
|
:options="relations"
|
||||||
v-model="relation"
|
v-model="relation"
|
||||||
|
:value="relation"
|
||||||
>
|
>
|
||||||
</VueMultiselect>
|
</VueMultiselect>
|
||||||
</div>
|
</div>
|
||||||
@ -108,10 +107,6 @@
|
|||||||
>
|
>
|
||||||
<label class="form-check-label" for="reverse">{{ $t('visgraph.reverse_relation') }}</label>
|
<label class="form-check-label" for="reverse">{{ $t('visgraph.reverse_relation') }}</label>
|
||||||
</div>
|
</div>
|
||||||
<!--pre class="debug">
|
|
||||||
modal.data
|
|
||||||
{{ modal.data }}
|
|
||||||
</pre-->
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -147,8 +142,6 @@ export default {
|
|||||||
container: '',
|
container: '',
|
||||||
checkedLayers: [],
|
checkedLayers: [],
|
||||||
relations: [],
|
relations: [],
|
||||||
//relation: null,
|
|
||||||
//reverse: false,
|
|
||||||
displayHelpMessage: false,
|
displayHelpMessage: false,
|
||||||
listenPersonFlag: 'normal',
|
listenPersonFlag: 'normal',
|
||||||
newEdgeData: {},
|
newEdgeData: {},
|
||||||
@ -218,9 +211,11 @@ export default {
|
|||||||
return this.checkedLayers
|
return this.checkedLayers
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
toggleIdPerson() {
|
toggleIdPerson() {
|
||||||
|
console.log('toggleIdPerson')
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
relation: {
|
relation: {
|
||||||
get() {
|
get() {
|
||||||
@ -239,8 +234,6 @@ export default {
|
|||||||
this.modal.data.reverse = value
|
this.modal.data.reverse = value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -394,24 +387,13 @@ export default {
|
|||||||
this.modal.data = edgeData
|
this.modal.data = edgeData
|
||||||
this.relation = this.modal.data.relation
|
this.relation = this.modal.data.relation
|
||||||
this.reverse = this.modal.data.reverse
|
this.reverse = this.modal.data.reverse
|
||||||
console.log('==- editRelationshipModal', this.modal.data, this.relation, this.reverse)
|
console.log('==- editRelationshipModal', this.modal.data)
|
||||||
this.modal.action = 'edit'
|
this.modal.action = 'edit'
|
||||||
this.modal.title = 'visgraph.edit_relationship_link'
|
this.modal.title = 'visgraph.edit_relationship_link'
|
||||||
this.modal.button.class = 'btn-edit'
|
this.modal.button.class = 'btn-edit'
|
||||||
this.modal.button.text = 'action.edit'
|
this.modal.button.text = 'action.edit'
|
||||||
this.modal.showModal = true
|
this.modal.showModal = true
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
deleteRelationshipModal(edgeData) {
|
|
||||||
this.modal.data = edgeData
|
|
||||||
console.log('==- deleteRelationshipModal', edgeData)
|
|
||||||
this.modal.action = 'delete'
|
|
||||||
this.modal.title = 'visgraph.delete_relationship_link'
|
|
||||||
this.modal.button.class = 'btn-delete'
|
|
||||||
this.modal.button.text = 'action.delete'
|
|
||||||
this.modal.showModal = true
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
|
|
||||||
resetForm() {
|
resetForm() {
|
||||||
console.log('==- reset Form')
|
console.log('==- reset Form')
|
||||||
|
@ -136,7 +136,7 @@ const getRelationsList = () => {
|
|||||||
* @returns {Promise<Response>}
|
* @returns {Promise<Response>}
|
||||||
*/
|
*/
|
||||||
const postRelationship = (relationship) => {
|
const postRelationship = (relationship) => {
|
||||||
console.log(relationship)
|
//console.log(relationship)
|
||||||
return postFetch(
|
return postFetch(
|
||||||
`/api/1.0/relations/relationship.json`,
|
`/api/1.0/relations/relationship.json`,
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ const postRelationship = (relationship) => {
|
|||||||
* @returns {Promise<Response>}
|
* @returns {Promise<Response>}
|
||||||
*/
|
*/
|
||||||
const patchRelationship = (relationship) => {
|
const patchRelationship = (relationship) => {
|
||||||
console.log(relationship)
|
//console.log(relationship)
|
||||||
let linkType = splitId(relationship.id, 'link')
|
let linkType = splitId(relationship.id, 'link')
|
||||||
let id = splitId(linkType, 'id')
|
let id = splitId(linkType, 'id')
|
||||||
return patchFetch(
|
return patchFetch(
|
||||||
@ -176,7 +176,7 @@ const patchRelationship = (relationship) => {
|
|||||||
* @returns {Promise<Response>}
|
* @returns {Promise<Response>}
|
||||||
*/
|
*/
|
||||||
const deleteRelationship = (relationship) => {
|
const deleteRelationship = (relationship) => {
|
||||||
console.log(relationship)
|
//console.log(relationship)
|
||||||
let linkType = splitId(relationship.id, 'link')
|
let linkType = splitId(relationship.id, 'link')
|
||||||
let id = splitId(linkType, 'id')
|
let id = splitId(linkType, 'id')
|
||||||
return deleteFetch(
|
return deleteFetch(
|
||||||
|
@ -71,7 +71,7 @@ const store = createStore({
|
|||||||
//console.log(link.id, state.excludedNodesIds.indexOf(splitId(link.id, 'link')))
|
//console.log(link.id, state.excludedNodesIds.indexOf(splitId(link.id, 'link')))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(array.length, array.map(i => i.id))
|
console.log('count links', array.length, array.map(i => i.id))
|
||||||
return array.length
|
return array.length
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -120,9 +120,8 @@ const store = createStore({
|
|||||||
mutations: {
|
mutations: {
|
||||||
addPerson(state, [person, options]) {
|
addPerson(state, [person, options]) {
|
||||||
let debug = ''
|
let debug = ''
|
||||||
/// Debug mode ~ display person_id on visgraph
|
/// Debug mode: uncomment to display person_id on visgraph
|
||||||
// uncomment
|
//debug = `\nid ${person.id}`
|
||||||
debug = `\nid ${person.id}`
|
|
||||||
person.group = person.type
|
person.group = person.type
|
||||||
person._id = person.id
|
person._id = person.id
|
||||||
person.id = `person_${person.id}`
|
person.id = `person_${person.id}`
|
||||||
|
@ -266,7 +266,8 @@ const getRelationshipTitle = (relationship) => {
|
|||||||
* @param position
|
* @param position
|
||||||
* @returns string|integer
|
* @returns string|integer
|
||||||
*/
|
*/
|
||||||
const splitId = (id, position) => { console.log(id, position)
|
const splitId = (id, position) => {
|
||||||
|
//console.log(id, position)
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 'type': // return 'accompanying_period'
|
case 'type': // return 'accompanying_period'
|
||||||
return /(.+)_/.exec(id)[1]
|
return /(.+)_/.exec(id)[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user