diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
index 3ef3b3390..feee033e4 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
@@ -27,8 +27,7 @@
Résultats
-
-
+
{{ $t('results_without_objective') }}
@@ -37,6 +36,38 @@
+
+
+
+
+
+
+ {{ g.title.fr }}
+
+
+
+
+
+
+
+
+
+
+ -
+
+ {{ g.title.fr }}
+
+
+
+
+
+ {{ $t('add_objective') }}
+
+
+
+
@@ -106,12 +137,14 @@ export default {
data() {
return {
editor: ClassicEditor,
+ showAddObjective: false,
};
},
computed: {
...mapState([
'work',
'resultsForAction',
+ 'goalsPicked',
]),
...mapGetters([
'hasResultsForAction',
@@ -142,6 +175,26 @@ export default {
this.$store.mutate('setNote', note);
}
},
+ availableForCheckGoal() {
+ let pickedIds = this.$store.state.goalsPicked.map(g => g.id);
+ console.log('pickeds goals id', pickedIds);
+ console.log(this.$store.state.goalsForAction);
+
+ return this.$store.state.goalsForAction.filter(g => !pickedIds.includes(g.id));
+ },
+ },
+ methods: {
+ toggleAddObjective() {
+ this.showAddObjective = !this.showAddObjective;
+ },
+ addGoal(g) {
+ console.log('add Goal', g);
+ this.$store.commit('addGoal', g);
+ },
+ removeGoal(g) {
+ console.log('remove goal', g);
+ this.$store.commit('removeGoal', g);
+ },
}
};
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 ed86724d2..d56a287a8 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/_components/AddResult.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/_components/AddResult.vue
@@ -1,5 +1,5 @@
-
+
-
@@ -20,38 +20,62 @@
{{ $t('add_a_result') }}
+
+
+ {{ $t('goal_has_ho_result') }}
+
+