From 602a99af6d7877ccebc4277e59a12b96059f68a6 Mon Sep 17 00:00:00 2001
From: AuroreC <chayrouse@datakode.fr>
Date: Tue, 23 Aug 2022 10:58:21 +0200
Subject: [PATCH] =?UTF-8?q?plan=20d'action=20ne=20fonctionne=20pas=20quand?=
 =?UTF-8?q?=20on=20met=20du=203=20partout=20=C3=A0=20l'=C3=A9tape=202=20va?=
 =?UTF-8?q?lidation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Evaluations/Single/Components/Step4/PlanAction.vue         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/resources/js/components/Evaluations/Single/Components/Step4/PlanAction.vue b/resources/js/components/Evaluations/Single/Components/Step4/PlanAction.vue
index 111e5473..dc91a1ff 100644
--- a/resources/js/components/Evaluations/Single/Components/Step4/PlanAction.vue
+++ b/resources/js/components/Evaluations/Single/Components/Step4/PlanAction.vue
@@ -41,7 +41,8 @@ export default {
         },
         isOneLevelExpected () {
             // Il faut au moins un expected_level dans le plan d'action
-            return this.evaluation.measure_levels.find(ml => ml.expected_level)
+            let isOneMeasureAvailable = this.evaluation.measure_levels.find(ml => ml.actual_level !== 3) 
+            return isOneMeasureAvailable ? this.evaluation.measure_levels.find(ml => ml.expected_level > ml.actual_level) : true
         }
     },
     methods : {
-- 
GitLab