add workflow on evaluationdocument in UI

This commit is contained in:
2022-02-27 02:38:08 +01:00
parent af0d7765ff
commit a9694da557
16 changed files with 244 additions and 66 deletions

View File

@@ -49,6 +49,15 @@ class AccompanyingPeriodWorkEvaluationNormalizer implements ContextAwareNormaliz
[self::IGNORE_EVALUATION => spl_object_hash($object)]
));
// due to bug: https://api-platform.com/docs/core/serialization/#collection-relation
// and also: https://github.com/symfony/symfony/issues/36965
// we have to rewrite the documents as a collection
$initial['documents'] = $this->normalizer->normalize(
$object->getDocuments()->getValues(),
$format,
$context
);
// then, we add normalization for things which are not into the entity
$initial['workflows_availables'] = $this->metadataExtractor->availableWorkflowFor(