Implement standings freezing
This commit is contained in:
@@ -24,6 +24,16 @@ function publishHtml() {
|
||||
close_modal();
|
||||
}
|
||||
|
||||
function freeze() {
|
||||
api.put(`tour/${tour_id}/standings/${activeRound}`, {}
|
||||
).then(resp => {
|
||||
if (resp.ok) {
|
||||
document.location.reload();
|
||||
}
|
||||
else throw "freeze error"
|
||||
}).catch(err => showError(err));
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
new Tablesort($('#standings-table')[0]);
|
||||
$('.criterium').on('click', e => {
|
||||
@@ -86,4 +96,7 @@ onLoad(() => {
|
||||
$('.publish-html').on('click', e => {
|
||||
publishHtml();
|
||||
});
|
||||
$('#freeze').on('click', e => {
|
||||
freeze()
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user