New button to redo gradation
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
parent
cd500afbd5
commit
5599a94f18
3 changed files with 39 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)); }}
|
||||
>
|
||||
|
|
|
|||
Reference in a new issue