qa: Autorefresh myExercices + add button to trigger manual refresh

This commit is contained in:
nemunaire 2022-11-07 13:44:29 +01:00
parent 3049989ac6
commit 0ffa126950
2 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@
let my_exercices = [];
let my_exercicesP = update_exercices()
setInterval(() => my_exercicesP = update_exercices(), 62000);
async function update_exercices() {
const view = await getQAView();
@ -43,6 +44,12 @@
</script>
<div class={className}>
<button
class="btn btn-dark float-end"
on:click|preventDefault={() => my_exercicesP = update_exercices()}
>
</button>
<h3>Vos étapes</h3>
{#await my_exercicesP}
<div class="text-center">

View File

@ -28,6 +28,12 @@
</script>
<div class={className}>
<button
class="btn btn-dark float-end"
on:click|preventDefault={() => { todos.refresh(); exo_doneP = getExerciceTested(); }}
>
</button>
<h3>Étapes à tester et valider</h3>
{#await todos.refresh()}
<div class="text-center">