New button to redo gradation
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
nemunaire 2023-03-06 13:13:04 +01:00
commit 5599a94f18
3 changed files with 39 additions and 0 deletions

View file

@ -28,4 +28,16 @@ export class Grade {
}
}
}
async redoGradation() {
const res = await fetch(`api/works/${this.id_work}/grades/${this.id}/traces`, {
method: 'POST',
headers: {'Accept': 'application/json'},
});
if (res.status == 200) {
return await res.json();
} else {
throw new Error((await res.json()).errmsg);
}
}
}

View file

@ -145,6 +145,13 @@
</a>
<button
class="btn btn-sm btn-success mr-1"
title="Relancer la notation"
on:click={() => { grade.redoGradation(); }}
>
<i class="bi bi-arrow-clockwise"></i>
</button>
<button
class="btn btn-sm btn-danger mr-1"
title="Supprimer la note"
on:click={() => { grade.delete().then(() => refresh_grades(w)); }}
>