From 4a9f49d8674dc0a14a09d6314ceb680db1fb8352 Mon Sep 17 00:00:00 2001 From: Maxime MERRIEN <48253852+A709197@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:50:09 +0100 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20affichage=20des=20d=C3=A9rogations?= =?UTF-8?q?=20originales=20dans=20l'onglet=20pr=C3=A9vu=20(#185)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/EtablissementController.php | 3 ++- .../etablissement/avis-derogations-etablissement.phtml | 5 +++++ phpstan-baseline.neon | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/application/controllers/EtablissementController.php b/application/controllers/EtablissementController.php index 3818fd1f6..a3b7bd596 100755 --- a/application/controllers/EtablissementController.php +++ b/application/controllers/EtablissementController.php @@ -657,7 +657,8 @@ public function effectifsDegagementsEtablissementEditAction(): void public function avisDerogationsEtablissementAction(): void { $this->_helper->layout->setLayout('etablissement'); - $this->view->assign('historiqueAvisDerogations', $this->serviceEtablissement->getHistorique($this->_request->id)['AVIS_DEROGATIONS'] ?? []); + $this->view->assign('historiqueAvisDerogations', $this->serviceEtablissement->getHistorique($this->getRequest()->getParam('id'))['AVIS_DEROGATIONS'] ?? []); + $this->view->assign('derogationsOriginales', $this->serviceEtablissement->getDescriptifs($this->getRequest()->getParam('id'))['derogations']); } public function retablirEtablissementAction(): void diff --git a/application/views/scripts/etablissement/avis-derogations-etablissement.phtml b/application/views/scripts/etablissement/avis-derogations-etablissement.phtml index bd58de9be..92fda53f4 100644 --- a/application/views/scripts/etablissement/avis-derogations-etablissement.phtml +++ b/application/views/scripts/etablissement/avis-derogations-etablissement.phtml @@ -4,3 +4,8 @@ "array" => $this->historiqueAvisDerogations )); ?> + +derogationsOriginales && '' !== $this->derogationsOriginales): ?> +