diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue index bfde741ac..1a95c8743 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue @@ -85,7 +85,7 @@ export default { case 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork': return `/fr/person/accompanying-period/work/${n.relatedEntityId}/show` case 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument': - return `/fr/notification/${n.id}/show` // to the notification + return `/fr/person/accompanying-period/work/evaluation/document/${n.relatedEntityId}/show` // to the notification case 'Chill\\MainBundle\\Entity\\Workflow\\EntityWorkflow': return `/fr/main/workflow/${n.relatedEntityId}/show` default: diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js index 587f06fa9..c4c97e5c6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js @@ -46,7 +46,7 @@ const appMessages = { the_course: "le parcours", the_action: "l'action", the_evaluation: "l'évaluation", - the_evaluation_document: "le document de l'évaluation", + the_evaluation_document: "le document", the_task: "la tâche", the_workflow: "le workflow", StartDate: "Date d'ouverture", diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php new file mode 100644 index 000000000..9d5dd1fbc --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php @@ -0,0 +1,55 @@ +security = $security; + } + + /** + * @Route( + * "{_locale}/person/accompanying-period/work/evaluation/document/{id}/show", + * name="chill_person_accompanying_period_work_evaluation_document_show", + * methods={"GET"} + * ) + */ + public function showAccompanyingCourseWork(AccompanyingPeriodWorkEvaluationDocument $document): Response + { + $em = $this->getDoctrine()->getManager(); + + /** @var AccompanyingPeriodWorkEvaluation $evaluation */ + $evaluation = $em->getRepository(AccompanyingPeriodWorkEvaluation::class)->find($document->getAccompanyingPeriodWorkEvaluation()); + + /** @var AccompanyingPeriodWork $work */ + $work = $em->getRepository(AccompanyingPeriodWork::class)->find($evaluation->getAccompanyingPeriodWork()); + + return $this->redirectToRoute( + $this->security->isGranted(AccompanyingPeriodWorkVoter::UPDATE)? + 'chill_person_accompanying_period_work_edit' : 'chill_person_accompanying_period_work_show', [ + 'id' => $work->getId() + ]); + } +} \ No newline at end of file