diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index a46aa052d..bb10dc9b5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -319,7 +319,7 @@ export default { ]), startDate: { get() { - console.log('get start date', this.$store.state.startDate); + //console.log('get start date', this.$store.state.startDate); return dateToISO(this.$store.state.startDate); }, set(v) { @@ -328,7 +328,7 @@ export default { }, endDate: { get() { - console.log('get end date', this.$store.state.endDate); + //console.log('get end date', this.$store.state.endDate); return dateToISO(this.$store.state.endDate); }, set(v) { @@ -345,20 +345,20 @@ export default { }, availableForCheckGoal() { let pickedIds = this.$store.state.goalsPicked.map(g => g.goal.id); - console.log('pickeds goals id', pickedIds); - console.log(this.$store.state.goalsForAction); + //console.log('pickeds goals id', pickedIds); + //console.log(this.$store.state.goalsForAction); return this.$store.state.goalsForAction.filter(g => !pickedIds.includes(g.id)); }, personsPicked: { get() { let s = this.$store.state.personsPicked.map(p => p.id); - console.log('persons picked', s); + //console.log('persons picked', s); return s; }, set(v) { - console.log('persons picked', v); + //console.log('persons picked', v); this.$store.commit('setPersonsPickedIds', v); } }, @@ -368,34 +368,34 @@ export default { this.showAddObjective = !this.showAddObjective; }, addGoal(g) { - console.log('add Goal', g); + //console.log('add Goal', g); this.$store.commit('addGoal', g); }, removeGoal(g) { - console.log('remove goal', g); + //console.log('remove goal', g); this.$store.commit('removeGoal', g); }, toggleAddEvaluation() { this.showAddEvaluation = !this.showAddEvaluation; }, setHandlingThirdParty({selected, modal}) { - console.log('setHandlingThirdParty', selected); + //console.log('setHandlingThirdParty', selected); this.$store.commit('setHandlingThirdParty', selected.shift().result); this.$refs.handlingThirdPartyPicker.resetSearch(); modal.showModal = false; }, removeHandlingThirdParty() { - console.log('removeHandlingThirdParty'); + //console.log('removeHandlingThirdParty'); this.$store.commit('setHandlingThirdParty', null); }, addThirdParties({selected, modal}) { - console.log('addThirdParties', selected); + //console.log('addThirdParties', selected); this.$store.commit('addThirdParties', selected.map(r => r.result)); this.$refs.thirdPartyPicker.resetSearch(); modal.showModal = false; }, removeThirdParty(t) { - console.log('remove third party', t); + //console.log('remove third party', t); this.$store.commit('removeThirdParty', t); }, submit() { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue index 15f65742a..7ea6de0c6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue @@ -63,7 +63,7 @@ export default { availableForCheckEvaluations() { let pickedIds = this.$store.state.evaluationsPicked.map(e => e.id); - //console.log('picked ids', pickedIds); + ////console.log('picked ids', pickedIds); return this.$store.state.evaluationsForAction.filter(e => !pickedIds.includes(e.id)); } @@ -73,12 +73,12 @@ export default { this.isExpanded = !this.isExpanded; }, addEvaluation(e) { - //console.log('addEvaluation', e); + ////console.log('addEvaluation', e); this.$store.commit('addEvaluationPicked', e); return; }, removeEvaluation(e) { - //console.log('removeEvaluation', e); + ////console.log('removeEvaluation', e); this.$store.commit('removeEvaluationPicked', e); return; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue index ed314eedf..83880ddda 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddResult.vue @@ -66,9 +66,9 @@ export default { throw Error(`this.destination is not implemented: ${this.destination}`); }, pickedResults() { - console.log('get checked'); - console.log('this.destination', this.destination); - console.log('this.goal', this.goal); + //console.log('get checked'); + //console.log('this.destination', this.destination); + //console.log('this.goal', this.goal); if (this.destination === 'action') { return this.$store.state.resultsPicked; } else if (this.destination === 'goal') { @@ -78,16 +78,16 @@ export default { throw Error(`this.destination is not implemented: ${this.destination}`); }, availableForCheckResults() { - console.log('availableForCheckResults'); - console.log('this.destination', this.destination); - console.log('this.goal', this.goal); + //console.log('availableForCheckResults'); + //console.log('this.destination', this.destination); + //console.log('this.goal', this.goal); if (this.destination === 'action') { let pickedIds = this.$store.state.resultsPicked.map(r => r.id); - console.log('picked ids', pickedIds); + //console.log('picked ids', pickedIds); return this.$store.state.resultsForAction.filter(r => !pickedIds.includes(r.id)); } else if (this.destination === 'goal') { - console.log('results picked for goal', this.$store.getters.resultsPickedForGoal(this.goal)); + //console.log('results picked for goal', this.$store.getters.resultsPickedForGoal(this.goal)); let pickedIds = this.$store.getters.resultsPickedForGoal(this.goal).map(r => r.id); return this.$store.getters.resultsForGoal(this.goal).filter(r => !pickedIds.includes(r.id)); @@ -101,7 +101,7 @@ export default { this.isExpanded = !this.isExpanded; }, addResult(r) { - console.log('addResult', r); + //console.log('addResult', r); if (this.destination === 'action') { this.$store.commit('addResultPicked', r); return; @@ -112,7 +112,7 @@ export default { throw Error(`this.destination is not implemented: ${this.destination}`); }, removeResult(r) { - console.log('removeresult', r); + //console.log('removeresult', r); if (this.destination === 'action') { this.$store.commit('removeResultPicked', r); return; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 01628b363..4dcc79524 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -5,7 +5,7 @@ import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js'; const debug = process.env.NODE_ENV !== 'production'; -console.log(window.accompanyingCourseWork); +//console.log(window.accompanyingCourseWork); const store = createStore({ strict: debug, @@ -102,21 +102,21 @@ const store = createStore({ state.endDate = date; }, setResultsForAction(state, results) { - console.log('set results for action', results); + //console.log('set results for action', results); state.resultsForAction = results; }, setResultsForGoal(state, { goal, results }) { - console.log('set results for goal', results); + //console.log('set results for goal', results); state.goalsForAction.push(goal); for (let i in results) { let r = results[i]; r.goalId = goal.id; - console.log('adding result', r); + //console.log('adding result', r); state.resultsForGoal.push(r); } }, setEvaluationsForAction(state, results) { - console.log('set evaluations for action', results); + //console.log('set evaluations for action', results); state.evaluationsForAction = results; }, addResultPicked(state, result) { @@ -139,10 +139,10 @@ const store = createStore({ }, addResultForGoalPicked(state, { goal, result}) { let found = state.goalsPicked.find(g => g.goal.id === goal.id); - console.log('adResultForGoalPicked'); - console.log('found', found); - console.log('goal', goal); - console.log('result', result); + //console.log('adResultForGoalPicked'); + //console.log('found', found); + //console.log('goal', goal); + //console.log('result', result); if (found === undefined) { return; @@ -160,7 +160,7 @@ const store = createStore({ found.results = found.results.filter(r => r.id !== result.id); }, setPersonsPickedIds(state, ids) { - console.log('persons ids', ids); + //console.log('persons ids', ids); state.personsPicked = state.personsReachables .filter(p => ids.includes(p.id)) }, @@ -171,11 +171,11 @@ const store = createStore({ state.handlingThirdParty = thirdParty; }, addThirdParties(state, thirdParties) { - console.log('addThirdParties', thirdParties); + //console.log('addThirdParties', thirdParties); // filter to remove existing thirdparties let ids = state.thirdParties.map(t => t.id); let unexistings = thirdParties.filter(t => !ids.includes(t.id)); - console.log('unexisting third parties', unexistings); + //console.log('unexisting third parties', unexistings); for (let i in unexistings) { state.thirdParties.push(unexistings[i]); } @@ -185,7 +185,7 @@ const store = createStore({ .filter(t => t.id !== thirdParty.id); }, setErrors(state, errors) { - console.log('handling errors', errors); + //console.log('handling errors', errors); state.errors = errors; }, setIsPosting(state, st) { @@ -194,13 +194,13 @@ const store = createStore({ }, actions: { getReachablesGoalsForAction({ getters, commit, dispatch }) { - console.log('getReachablesGoalsForAction'); + //console.log('getReachablesGoalsForAction'); let socialActionId = getters.socialAction.id, url = `/api/1.0/person/social-work/goal/by-social-action/${socialActionId}.json` ; - console.log(url); + //console.log(url); window .fetch( @@ -219,12 +219,12 @@ const store = createStore({ }); }, getReachablesResultsForGoal({ commit }, goal) { - console.log('getReachablesResultsForGoal'); + //console.log('getReachablesResultsForGoal'); let url = `/api/1.0/person/social-work/result/by-goal/${goal.id}.json` ; - console.log(url); + //console.log(url); window.fetch(url) .then(response => { @@ -235,18 +235,18 @@ const store = createStore({ throw { m: 'Error while retriving results for goal', s: response.status, b: response.body }; }) .then(data => { - console.log('data'); + //console.log('data'); commit('setResultsForGoal', { goal, results: data.results }); }); }, getReachablesResultsForAction({ getters, commit }) { - console.log('getReachablesResultsForAction'); + //console.log('getReachablesResultsForAction'); let socialActionId = getters.socialAction.id, url = `/api/1.0/person/social-work/result/by-social-action/${socialActionId}.json` ; - console.log(url); + //console.log(url); window.fetch(url) .then(response => { @@ -257,12 +257,12 @@ const store = createStore({ throw { m: 'Error while retriving results for social action', s: response.status, b: response.body }; }) .then(data => { - console.log('data retrived', data); + //console.log('data retrived', data); commit('setResultsForAction', data.results); }); }, getReachablesEvaluationsForAction({ getters, commit }) { - console.log('getReachablesEvaluationsForAction'); + //console.log('getReachablesEvaluationsForAction'); let socialActionId = getters.socialAction.id, url = `/api/1.0/person/social-work/evaluation/by-social-action/${socialActionId}.json` @@ -275,7 +275,7 @@ const store = createStore({ throw { m: 'Error while retriving evaluations for social action', s: response.status, b: response.body }; }) .then(data => { - console.log('data retrived', data); + //console.log('data retrived', data); commit('setEvaluationsForAction', data.results); }); }, @@ -286,7 +286,7 @@ const store = createStore({ errors = [] ; - console.log('action submitting', payload, url); + //console.log('action submitting', payload, url); commit('setIsPosting', true); window.fetch(url, {