From 7b280c9962a26dc1f510cdb23a86d79580b80112 Mon Sep 17 00:00:00 2001 From: evarisk-kilyan Date: Fri, 4 Oct 2024 12:02:35 +0200 Subject: [PATCH] #3983 [Dashboard] fix: reorder graphs --- class/digiriskdolibarrdashboard.class.php | 2 +- class/riskanalysis/risk.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/class/digiriskdolibarrdashboard.class.php b/class/digiriskdolibarrdashboard.class.php index a63aada67..4a0f0c37a 100644 --- a/class/digiriskdolibarrdashboard.class.php +++ b/class/digiriskdolibarrdashboard.class.php @@ -52,12 +52,12 @@ public function load_dashboard(array $moreParams = []): array { $dashboardDatas = [ ['type' => 'RiskAssessmentDocument', 'classPath' => '/digiriskdolibarrdocuments/riskassessmentdocument.class.php'], + ['type' => 'Risk', 'classPath' => '/riskanalysis/risk.class.php'], ['type' => 'Accident', 'classPath' => '/accident.class.php'], ['type' => 'Evaluator', 'classPath' => '/evaluator.class.php'], ['type' => 'DigiriskResources', 'classPath' => '/digiriskresources.class.php'], ['type' => 'DigiriskElement', 'classPath' => '/digiriskelement.class.php'], ['type' => 'SaturneTask', 'classPath' => '/../../saturne/class/task/saturnetask.class.php'], - ['type' => 'Risk', 'classPath' => '/riskanalysis/risk.class.php'], ['type' => 'TicketDashboard', 'classPath' => '/ticketdashboard.class.php'] ]; foreach ($dashboardDatas as $dashboardData) { diff --git a/class/riskanalysis/risk.class.php b/class/riskanalysis/risk.class.php index 8b7cd6d43..a8f6031fa 100644 --- a/class/riskanalysis/risk.class.php +++ b/class/riskanalysis/risk.class.php @@ -632,7 +632,7 @@ public function load_dashboard(): array $getRisksByDangerCategories = $this->getRisksByDangerCategories($dangerCategories, $riskByDangerCategoriesAndRiskAssessments); $getRiskListsByDangerCategories = $this->getRiskListsByDangerCategories($dangerCategories, $riskByDangerCategoriesAndRiskAssessments, $filter, 'risk'); - $array['graphs'] = [$getRisksByCotation, $getRisksByDangerCategoriesAndCriticality, $getRisksByDangerCategories]; + $array['graphs'] = [$getRisksByDangerCategoriesAndCriticality, $getRisksByDangerCategories, $getRisksByCotation]; $array['lists'] = [$getRiskListsByDangerCategories]; return $array;