diff --git a/qa/ui/src/lib/stores/exercices.js b/qa/ui/src/lib/stores/exercices.js index 135d1277..910ec591 100644 --- a/qa/ui/src/lib/stores/exercices.js +++ b/qa/ui/src/lib/stores/exercices.js @@ -44,6 +44,7 @@ export const exercicesByTheme = derived( const exercices_idx = { }; for (const e of $exercices) { + if (!e.id_theme) e.id_theme = 0; if (!exercices_idx[e.id_theme]) { exercices_idx[e.id_theme] = [] } diff --git a/qa/ui/src/routes/teams/[tid]/+page.svelte b/qa/ui/src/routes/teams/[tid]/+page.svelte index 69ca3125..50f2c7cf 100644 --- a/qa/ui/src/routes/teams/[tid]/+page.svelte +++ b/qa/ui/src/routes/teams/[tid]/+page.svelte @@ -141,7 +141,7 @@ bind:value={newTodo} > {#each Object.keys($exercicesByTheme) as thid} - + {#each $exercicesByTheme[thid] as exercice (exercice.id)} {/each} @@ -171,7 +171,9 @@ bind:value={newThemeTodo} > {#each Object.keys($exercicesByTheme) as thid} - + {#if thid != "0"} + + {/if} {/each}