mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix loading of evaluations
This commit is contained in:
@@ -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'],
|
||||
|
@@ -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 {
|
||||
|
@@ -98,7 +98,7 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
||||
return $this->translatableStringHelper->localize($e->getTitle());
|
||||
},
|
||||
'multiple' => true,
|
||||
'expanded' => true,
|
||||
'attr' => ['class' => 'select2'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user