diff --git a/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue b/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue
index f1fb6c84b..04d563782 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue
+++ b/src/Bundle/ChillDocGeneratorBundle/Resources/public/vuejs/_components/PickTemplate.vue
@@ -17,7 +17,7 @@
@@ -48,6 +48,7 @@ export default {
required: true,
},
templates: {
+ type: Array,
required: true,
},
// beforeMove execute "something" before
@@ -73,7 +74,11 @@ export default {
return true;
},
getDescription() {
- return this.templates.find(t => t.id === this.template).description || '';
+ let desc = this.templates.find(t => t.id === this.template);
+ if (null === desc) {
+ return '';
+ }
+ return desc.description || '';
},
},
methods: {
diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
index de9433558..cc918c1db 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
@@ -69,7 +69,7 @@ class AccompanyingPeriodWorkEvaluationApiController
$paginator->setItemsPerPage(count($evaluations));
return new JsonResponse($this->serializer->serialize(
- new Collection($evaluations, $paginator),
+ new Collection(array_values($evaluations), $paginator),
'json',
[
AbstractNormalizer::GROUPS => ['read'],
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js
index 21ec4b168..a46a0e221 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js
@@ -58,7 +58,11 @@ const store = createStore({
return state.thirdParties.length > 0;
},
getTemplatesAvailablesForEvaluation: (state) => (evaluation) => {
- return state.templatesAvailablesForEvaluation.get(evaluation.id) || [];
+ if (state.templatesAvailablesForEvaluation.has(evaluation.id)) {
+ return state.templatesAvailablesForEvaluation.get(evaluation.id);
+ }
+
+ return [];
},
buildPayload(state) {
return {
@@ -171,7 +175,6 @@ const store = createStore({
};
g.id = tmpIndex() -1
state.goalsPicked.push(g);
- //console.log('goals picked ids', state.goalsPicked.map(g => g.id))
},
removeGoal(state, goal) {
state.goalsPicked = state.goalsPicked.filter(g => g.id !== goal.id);
@@ -369,7 +372,6 @@ const store = createStore({
return makeFetch('PUT', url, payload)
.then(data => {
- console.log('data received', data);
if (typeof(callback) !== 'undefined') {
return callback(data);
} else {
diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php
index b68921abf..918b68dc1 100644
--- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php
+++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php
@@ -98,7 +98,7 @@ class AccompanyingPeriodWorkEvaluationContext implements
return $this->translatableStringHelper->localize($e->getTitle());
},
'multiple' => true,
- 'expanded' => true,
+ 'attr' => ['class' => 'select2'],
]);
}
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index db00540da..2d6ff4c1e 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -530,3 +530,6 @@ household_composition:
Currently no composition: Aucune composition famiale renseignée.
Add a composition: Ajouter une composition familiale
Update composition: Modifier la composition familiale
+
+# docgen
+Linked evaluations: Évaluations associées