mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
comment logs
This commit is contained in:
parent
c7e88b3924
commit
fceab958bb
@ -157,7 +157,7 @@ export default {
|
||||
this.goals.hiddenField.value = '';
|
||||
this.results.hiddenField.value = '';
|
||||
|
||||
console.log(this.actions.hiddenField, this.goals.hiddenField, this.results.hiddenField);
|
||||
//console.log(this.actions.hiddenField, this.goals.hiddenField, this.results.hiddenField);
|
||||
},
|
||||
methods: {
|
||||
async getSocialActionsList() {
|
||||
@ -169,7 +169,7 @@ export default {
|
||||
* @param value
|
||||
*/
|
||||
selectAction(value) {
|
||||
console.log('----'); console.log('select action', value.id);
|
||||
//console.log('----'); console.log('select action', value.id);
|
||||
let children = this.getChildrensFromParent(value);
|
||||
this.addSelectedElement('actions', children);
|
||||
|
||||
@ -187,7 +187,7 @@ export default {
|
||||
},
|
||||
|
||||
unselectAction(value) {
|
||||
console.log('----'); console.log('unselect action', value.id);
|
||||
//console.log('----'); console.log('unselect action', value.id);
|
||||
getGoalByAction(value.id).then(response => new Promise((resolve, reject) => {
|
||||
[ this.goals.options, this.goals.value ] = this.removeElementInData('goals', response.results);
|
||||
resolve();
|
||||
@ -203,7 +203,7 @@ export default {
|
||||
* @param value
|
||||
*/
|
||||
selectGoal(value) {
|
||||
console.log('----'); console.log('select goal', value.id);
|
||||
//console.log('----'); console.log('select goal', value.id);
|
||||
getResultByGoal(value.id).then(response => new Promise((resolve, reject) => {
|
||||
this.addElementInData('results', response.results);
|
||||
resolve();
|
||||
@ -211,7 +211,7 @@ export default {
|
||||
},
|
||||
|
||||
unselectGoal(value) {
|
||||
console.log('----'); console.log('unselect goal', value.id);
|
||||
//console.log('----'); console.log('unselect goal', value.id);
|
||||
getResultByGoal(value.id).then(response => new Promise((resolve, reject) => {
|
||||
[ this.results.options, this.results.value ] = this.removeElementInData('results', response.results);
|
||||
resolve();
|
||||
@ -223,11 +223,11 @@ export default {
|
||||
* @param value
|
||||
*/
|
||||
selectResult(value) {
|
||||
console.log('----'); console.log('select result', value.id);
|
||||
//console.log('----'); console.log('select result', value.id);
|
||||
},
|
||||
|
||||
unselectResult(value) {
|
||||
console.log('----'); console.log('unselect result', value.id);
|
||||
//console.log('----'); console.log('unselect result', value.id);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -239,7 +239,7 @@ export default {
|
||||
if (null === value.parent) {
|
||||
let excludeParent = this.actions.options.filter(o => o.parent !== null);
|
||||
let children = excludeParent.filter(o => o.parent.id === value.id);
|
||||
console.log("get childrens", children.map(e => e.id));
|
||||
//console.log("get childrens", children.map(e => e.id));
|
||||
return children;
|
||||
}
|
||||
return [];
|
||||
@ -261,7 +261,7 @@ export default {
|
||||
}
|
||||
})
|
||||
if (dump.length > 0) {
|
||||
console.log('push ' + dump.length + ' elems in', target, dump);
|
||||
//console.log('push ' + dump.length + ' elems in', target, dump);
|
||||
}
|
||||
},
|
||||
|
||||
@ -284,7 +284,7 @@ export default {
|
||||
}
|
||||
})
|
||||
if (dump.length > 0) {
|
||||
console.log('remove ' + dump.length + ' elems from ' + target + ' options', dump);
|
||||
//console.log('remove ' + dump.length + ' elems from ' + target + ' options', dump);
|
||||
}
|
||||
return [ data.options, data.value ];
|
||||
},
|
||||
@ -309,7 +309,7 @@ export default {
|
||||
}
|
||||
});
|
||||
if (dump.length > 0) {
|
||||
console.log('add ' + dump.length + ' selected elems in', target, dump);
|
||||
//console.log('add ' + dump.length + ' selected elems in', target, dump);
|
||||
}
|
||||
},
|
||||
|
||||
@ -325,7 +325,7 @@ export default {
|
||||
|
||||
// remove from selected
|
||||
data.value = data.value.filter(e => e.id !== elem.id);
|
||||
console.log('remove ' + elem.id + ' from selected ' + target);
|
||||
//console.log('remove ' + elem.id + ' from selected ' + target);
|
||||
|
||||
// remove from hiddenField
|
||||
this.rebuildHiddenFieldValues(target);
|
||||
@ -343,9 +343,9 @@ export default {
|
||||
*/
|
||||
unselectToNextField(target, elem) {
|
||||
if (target === 'goals') {
|
||||
console.log('!!!! target is goal: unselect goal', elem.id);
|
||||
//console.log('!!!! target is goal: unselect goal', elem.id);
|
||||
this.unselectGoal(elem);
|
||||
console.log('!!!! done');
|
||||
//console.log('!!!! done');
|
||||
}
|
||||
},
|
||||
|
||||
@ -355,12 +355,12 @@ export default {
|
||||
*/
|
||||
rebuildHiddenFieldValues(target) {
|
||||
let data = this[target];
|
||||
console.log('rebuild hiddenFields ' + target + ' values :');
|
||||
//console.log('rebuild hiddenFields ' + target + ' values :');
|
||||
data.hiddenField.value = ''; // reset
|
||||
data.value.forEach(elem => {
|
||||
data.hiddenField.value = this.addIdToValue(data.hiddenField.value, elem.id);
|
||||
})
|
||||
console.log(data.hiddenField);
|
||||
//console.log(data.hiddenField);
|
||||
},
|
||||
|
||||
addIdToValue(string, id) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user