diff --git a/CHANGELOG.md b/CHANGELOG.md index a8dc101748dd65a68a8ba9bb811342f92e88bf11..656743b7b5a68963b7a27a01a1f7166553d918c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +## [1.7.11] - 2020-10-16 +### Changement +- Correctif bug utilisateur archivé visible dans la liste "Ma collectivité" #295 +- Dans le bilan chapitre 4.1 le nombre de domaine est désormais calculé +- Correctif sur la liste des plans d'actions qui affiche bien les actions de protections non planifiées et non appliquées + ## [1.7.10] - 2020-10-12 ### Changement - Correctif des cases à cocher (Mesures de sécurité et confidentialité) lors de la modification d'un traitement. diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index af933c87cc09ea993cf6acb0f841d94da03ad57c..0367f42794f5d92a065eb4a13157f857b8ef22ee 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,5 +1,5 @@ parameters: - app.version: 1.7.10 + app.version: 1.7.11 framework: secret: '%env(APP_SECRET)%' diff --git a/src/Domain/Registry/Controller/MesurementController.php b/src/Domain/Registry/Controller/MesurementController.php index ca5362f8b784db98ff161a5ed0da1508ead8d8fe..07a15f27b93612bba5b4369dfc4880a1644236bf 100644 --- a/src/Domain/Registry/Controller/MesurementController.php +++ b/src/Domain/Registry/Controller/MesurementController.php @@ -191,12 +191,9 @@ class MesurementController extends CRUDController public function actionPlanAction() { $request = $this->requestStack->getCurrentRequest(); - // Since we have to display planified & not-applied mesurement, filter - $criteria = $this->getRequestCriteria($request); - $criteria = $criteria + ['status' => MesurementStatusDictionary::STATUS_NOT_APPLIED]; return $this->render('Registry/Mesurement/action_plan.html.twig', [ - 'totalItem' => $this->repository->count($criteria), + 'totalItem' => $this->repository->count($this->getRequestCriteria($request)), 'route' => $this->router->generate('registry_mesurement_list_datatables', ['action_plan' => true]), ]); } @@ -302,7 +299,9 @@ class MesurementController extends CRUDController } if ($request->query->getBoolean('action_plan')) { + // Since we have to display planified & not-applied mesurement, filter $criteria['planificationDate'] = 'null'; + $criteria['status'] = MesurementStatusDictionary::STATUS_NOT_APPLIED; } return $criteria; diff --git a/src/Domain/Reporting/Generator/Word/MaturityGenerator.php b/src/Domain/Reporting/Generator/Word/MaturityGenerator.php index 5ce2dbff0c6499acf126ee0f377c40163302e8ac..2dabaacfa6e51936512e0b504345c7cd44868f99 100644 --- a/src/Domain/Reporting/Generator/Word/MaturityGenerator.php +++ b/src/Domain/Reporting/Generator/Word/MaturityGenerator.php @@ -40,13 +40,33 @@ class MaturityGenerator extends AbstractGenerator implements ImpressionGenerator public function addGlobalOverview(Section $section, array $data): void { if (empty($data)) { + $section->addTextBreak(2); + $section->addText("Aucune évaluation de la mise en conformité n'a pour l'heure été effectuée.", ['italic' => true]); + return; } + $maturityList = []; + $domainsName = []; + if (isset($data['old'])) { + foreach ($data['old']->getMaturity() as $maturity) { + $maturityList[$maturity->getDomain()->getPosition()]['old'] = $maturity->getScore(); + if (!isset($domainsName[$maturity->getDomain()->getPosition()])) { + $domainsName[$maturity->getDomain()->getPosition()] = $maturity->getDomain()->getName(); + } + } + } + foreach ($data['new']->getMaturity() as $maturity) { + $maturityList[$maturity->getDomain()->getPosition()]['new'] = $maturity->getScore(); + if (!isset($domainsName[$maturity->getDomain()->getPosition()])) { + $domainsName[$maturity->getDomain()->getPosition()] = $maturity->getDomain()->getName(); + } + } + $section->addTitle('Évaluation de la mise en conformité', 2); - $section->addText('Afin de répondre aux objectifs du RGPD, la gestion des données à caractère personnel est structurée en 6 domaines.'); - $section->addText('Chacun des 6 domaines a été évalué par la collectivité selon l’échelle de maturité ci-après.'); + $section->addText('Afin de répondre aux objectifs du RGPD, la gestion des données à caractère personnel est structurée en ' . \count($domainsName) . ' domaines.'); + $section->addText('Chacun des ' . \count($domainsName) . ' domaines a été évalué par la collectivité selon l’échelle de maturité ci-après.'); $table = $section->addTable($this->tableStyle); $row = $table->addRow(200, ['valign' => 'center']); @@ -87,60 +107,39 @@ class MaturityGenerator extends AbstractGenerator implements ImpressionGenerator $serie2 = []; // Radar - if (empty($data)) { - $section->addTextBreak(2); - $section->addText("Aucune évaluation de la mise en conformité n'a pour l'heure été effectuée.", ['italic' => true]); - } else { - $maturityList = []; - $domainsName = []; - if (isset($data['old'])) { - foreach ($data['old']->getMaturity() as $maturity) { - $maturityList[$maturity->getDomain()->getPosition()]['old'] = $maturity->getScore(); - if (!isset($domainsName[$maturity->getDomain()->getPosition()])) { - $domainsName[$maturity->getDomain()->getPosition()] = $maturity->getDomain()->getName(); - } - } - } - foreach ($data['new']->getMaturity() as $maturity) { - $maturityList[$maturity->getDomain()->getPosition()]['new'] = $maturity->getScore(); - if (!isset($domainsName[$maturity->getDomain()->getPosition()])) { - $domainsName[$maturity->getDomain()->getPosition()] = $maturity->getDomain()->getName(); - } - } - \ksort($maturityList); - \ksort($domainsName); + \ksort($maturityList); + \ksort($domainsName); - foreach ($maturityList as $score) { - if (isset($score['old'])) { - $serie2[] = $score['old'] / 10; - } - $serie1[] = $score['new'] / 10; + foreach ($maturityList as $score) { + if (isset($score['old'])) { + $serie2[] = $score['old'] / 10; } - // Display - $section->addTitle("Résultat de l'évaluation du {$data['new']->getCreatedAt()->format('d/m/Y')}", 2); + $serie1[] = $score['new'] / 10; + } + // Display + $section->addTitle("Résultat de l'évaluation du {$data['new']->getCreatedAt()->format('d/m/Y')}", 2); - $chart = $section->addChart( - 'radar', - $domainsName, - $serie1, - [ - 'height' => Converter::cmToEmu(11), - 'width' => Converter::cmToEmu(15), - '3d' => true, - ] - ); - if (!empty($serie2)) { - $chart->addSeries(\array_keys($maturityList), $serie2, $data['old']->getCreatedAt()->format('d/m/Y')); - } - $table = $section->addTable(['unit' => TblWidth::PERCENT, 'width' => 5000]); - $row = $table->addRow(); - if (!empty($serie2)) { - $cell = $row->addCell(2500); - $cell->addText(" {$data['old']}", ['color' => 'b30000']); - } + $chart = $section->addChart( + 'radar', + $domainsName, + $serie1, + [ + 'height' => Converter::cmToEmu(11), + 'width' => Converter::cmToEmu(15), + '3d' => true, + ] + ); + if (!empty($serie2)) { + $chart->addSeries(\array_keys($maturityList), $serie2, $data['old']->getCreatedAt()->format('d/m/Y')); + } + $table = $section->addTable(['unit' => TblWidth::PERCENT, 'width' => 5000]); + $row = $table->addRow(); + if (!empty($serie2)) { $cell = $row->addCell(2500); - $cell->addText("{$data['new']}", ['align' => 'right', 'color' => '3c8dbc']); + $cell->addText("{$data['old']}", ['color' => 'b30000']); } + $cell = $row->addCell(2500); + $cell->addText("{$data['new']}", ['align' => 'right', 'color' => '3c8dbc']); } /** diff --git a/templates/User/Profile/collectivity_show.html.twig b/templates/User/Profile/collectivity_show.html.twig index ef0ddcd64675ac2b14c501f760c3759291c79507..5d3bdd1dbd4be7475082dd3faad88e982940c0fe 100644 --- a/templates/User/Profile/collectivity_show.html.twig +++ b/templates/User/Profile/collectivity_show.html.twig @@ -386,7 +386,7 @@ </tr> </thead> <tbody> - {% for user in object.users %} + {% for user in object.users|filter(u => u.deletedAt is null) %} <tr> <td>{{ user.firstName }}</td> <td>{{ user.lastName }}</td>