qa: Fix display for standalone exercices

This commit is contained in:
nemunaire 2024-09-18 12:31:58 +02:00
parent 0bf367bd3b
commit 1f295c3411
3 changed files with 5 additions and 0 deletions

View File

@ -83,6 +83,8 @@
<td>
{#if $exercicesIdx.length == 0 && $themesIdx.length == 0}
<Spinner size="sm" />
{:else if !$themesIdx[$exercicesIdx[todo.id_exercice].id_theme]}
Défis indépendants
{:else}
<a href="themes/{$exercicesIdx[todo.id_exercice].id_theme}">
{$themesIdx[$exercicesIdx[todo.id_exercice].id_theme].name}

View File

@ -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;

View File

@ -102,6 +102,8 @@
<td>
{#if $exercicesIdx.length == 0 && $themesIdx.length == 0}
<Spinner size="sm" />
{:else if !$themesIdx[$exercicesIdx[todo.id_exercice].id_theme]}
Défis indépendants
{:else}
<a href="themes/{$exercicesIdx[todo.id_exercice].id_theme}">
{$themesIdx[$exercicesIdx[todo.id_exercice].id_theme].name}