{#await work then w}
<
{w.title}
{#if $user && $user.is_admin}
edit = false} />
Notes
{#await w.getGrades()}
Chargement des notes …
{:then grades}
Login
Note
Commentaire
Date de la note
{#if !grades}
Aucune note n'a encore été envoyée pour ce travail.
{:else} {#each grades as grade, gid (grade.id)}
{grade.login}
{grade.score}
{#if grade.comment}{grade.comment}{:else}-{/if}
{grade.date}
{/each} {/if}
{/await}
{:else} {#await getScore(w)}
{:then grade}
Note finale :
{grade.score}
{#if grade.comment}– {grade.comment}{/if}
{:catch error}
{error.message}
{/await} {/if} {/await}