From 1f295c3411dcbfa1d32fa515ba30931f908a732e Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 18 Sep 2024 12:31:58 +0200 Subject: [PATCH] qa: Fix display for standalone exercices --- qa/ui/src/lib/components/MyTodo.svelte | 2 ++ qa/ui/src/lib/stores/todo.js | 1 + qa/ui/src/routes/teams/[tid]/+page.svelte | 2 ++ 3 files changed, 5 insertions(+) diff --git a/qa/ui/src/lib/components/MyTodo.svelte b/qa/ui/src/lib/components/MyTodo.svelte index e6134047..581a566a 100644 --- a/qa/ui/src/lib/components/MyTodo.svelte +++ b/qa/ui/src/lib/components/MyTodo.svelte @@ -83,6 +83,8 @@ {#if $exercicesIdx.length == 0 && $themesIdx.length == 0} + {:else if !$themesIdx[$exercicesIdx[todo.id_exercice].id_theme]} + Défis indépendants {:else} {$themesIdx[$exercicesIdx[todo.id_exercice].id_theme].name} diff --git a/qa/ui/src/lib/stores/todo.js b/qa/ui/src/lib/stores/todo.js index cc24082d..81ab8757 100644 --- a/qa/ui/src/lib/stores/todo.js +++ b/qa/ui/src/lib/stores/todo.js @@ -16,6 +16,7 @@ export function createTodosStore(team) { refresh: async () => { const list = await getQATodo(team); + list.map((e) => e.id += 10000000); list.push(...await getQAWork(team)); update((m) => list); return list; diff --git a/qa/ui/src/routes/teams/[tid]/+page.svelte b/qa/ui/src/routes/teams/[tid]/+page.svelte index 50f2c7cf..19ab4c45 100644 --- a/qa/ui/src/routes/teams/[tid]/+page.svelte +++ b/qa/ui/src/routes/teams/[tid]/+page.svelte @@ -102,6 +102,8 @@ {#if $exercicesIdx.length == 0 && $themesIdx.length == 0} + {:else if !$themesIdx[$exercicesIdx[todo.id_exercice].id_theme]} + Défis indépendants {:else} {$themesIdx[$exercicesIdx[todo.id_exercice].id_theme].name}