From 34a1242ed9ecacbce3d3e01fdbc8ca94060254bd Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 4 Jul 2024 08:32:28 +0200 Subject: [PATCH] new: [front:scores] Added task depedency icon --- exercise.py | 3 +++ src/components/TheScores.vue | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/exercise.py b/exercise.py index 2b110f4..850cccd 100644 --- a/exercise.py +++ b/exercise.py @@ -140,11 +140,14 @@ def get_exercises(): tasks = [] for inject in exercise['injects']: score = db.EXERCISES_STATUS[exercise['exercise']['uuid']]['tasks'][inject['uuid']]['score'] + requirements = db.INJECT_REQUIREMENTS_BY_INJECT_UUID[inject['uuid']] tasks.append( { "name": inject['name'], "uuid": inject['uuid'], + "description": inject.get('description', ''), "score": score, + "requirements": requirements, } ) exercises.append( diff --git a/src/components/TheScores.vue b/src/components/TheScores.vue index 64ca7ec..6002694 100644 --- a/src/components/TheScores.vue +++ b/src/components/TheScores.vue @@ -2,7 +2,7 @@ import { ref, computed } from "vue"; import { active_exercises as exercises, progresses, setCompletedState } from "@/socket"; import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' - import { faCheck, faTimes, faGraduationCap, faMedal } from '@fortawesome/free-solid-svg-icons' + import { faCheck, faTimes, faGraduationCap, faMedal, faHourglassHalf } from '@fortawesome/free-solid-svg-icons' const collapsed_panels = ref([]) @@ -95,7 +95,7 @@ + + (+{{ task.score }})