From b30078dba56502e05ff8cf1eb5c1d58933314565 Mon Sep 17 00:00:00 2001 From: Harald Mack Date: Wed, 18 Dec 2024 21:22:08 +0100 Subject: [PATCH] reset recommendation to 3 level system to avoid inconsistencies --- .../lib/components/ChildrenFeedback.svelte | 46 +------------------ .../src/mondey_backend/routers/scores.py | 12 ++--- 2 files changed, 7 insertions(+), 51 deletions(-) diff --git a/frontend/src/lib/components/ChildrenFeedback.svelte b/frontend/src/lib/components/ChildrenFeedback.svelte index 0ebf36b1..cf984a0a 100644 --- a/frontend/src/lib/components/ChildrenFeedback.svelte +++ b/frontend/src/lib/components/ChildrenFeedback.svelte @@ -60,20 +60,10 @@ let currentSessionIndices = $state([0, intervalSize]); let relevant_sessionkeys = $state([] as number[]); const milestonePresentation = [ { icon: CheckCircleSolid, color: "green", text: $_("milestone.recommendOk") }, - { - icon: EyeSolid, - color: "green", - text: $_("milestone.recommendOkWithCaveat"), - }, - { - icon: BellActiveSolid, - color: "orange", - text: $_("milestone.recommendWatch"), - }, { icon: ExclamationCircleSolid, color: "orange", - text: $_("milestone.recommendWatchWithCaveat"), + text: $_("milestone.recommendWatch"), }, { icon: CloseCircleSolid, @@ -240,7 +230,7 @@ let promise = $state(setup()); {#snippet evaluation(aid: number, milestone_or_group: MilestonePublic | MilestoneGroupPublic | undefined, value: number, isMilestone: boolean, withText: boolean = false)}
- {#if value === 2} + {#if value === 1}
@@ -251,17 +241,6 @@ let promise = $state(setup());

{$_("milestone.recommendOk")}

{/if}
- {:else if value === 1} -
- - - {milestone_or_group?.text[$locale as string].title} - -
- {#if withText} -

{$_("milestone.recommendOkWithCaveat")}

- {/if} -
{:else if value === 0}
@@ -283,27 +262,6 @@ let promise = $state(setup()); {/if} - {:else if value === -1} -
- - - {milestone_or_group?.text[$locale as string].title} - -
- {#if withText} -

{$_("milestone.recommendWatchWithCaveat")}

- {/if} -
- {#if isMilestone} - - - - {milestone_or_group?.text[$locale as string].help} - - - {/if} {:else}
diff --git a/mondey_backend/src/mondey_backend/routers/scores.py b/mondey_backend/src/mondey_backend/routers/scores.py index 25b9fa9f..60aaa673 100644 --- a/mondey_backend/src/mondey_backend/routers/scores.py +++ b/mondey_backend/src/mondey_backend/routers/scores.py @@ -22,17 +22,15 @@ class TrafficLight(Enum): """ Enum for the trafficlight feedback. - Includes -2 for red, -1 for overall yellow but with red minimum score (yellowWithCaveat), 0 for yellow, and 1 for green with yellow minimum score (greenWithCaveat). 2 is green overall. + Includes -1 for red, 0 for yellow and 1 is green overall. - Invalid is -3 and is included for edge cases like no data. + Invalid is -2 and is included for edge cases like no data. """ - invalid = -3 - red = -2 - yellowWithCaveat = -1 + invalid = -2 + red = -1 yellow = 0 - greenWithCaveat = 1 - green = 2 + green = 1 def compute_feedback_simple(