mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-22 22:38:24 +02:00
Add continue button for the final tournament
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -32,6 +32,10 @@ function exportDraw(tid) {
|
||||
sockets[tid].send(JSON.stringify({'type': 'export'}))
|
||||
}
|
||||
|
||||
function continueFinal(tid) {
|
||||
sockets[tid].send(JSON.stringify({'type': 'continue_final'}))
|
||||
}
|
||||
|
||||
function showNotification(title, body, timeout = 5000) {
|
||||
let notif = new Notification(title, {'body': body, 'icon': "/static/tfjm.svg"})
|
||||
if (timeout)
|
||||
@ -151,6 +155,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
div.classList.add('d-none')
|
||||
}
|
||||
|
||||
function updateContinueVisibility(visible) {
|
||||
let div = document.getElementById(`continue-${tournament.id}`)
|
||||
if (visible)
|
||||
div.classList.remove('d-none')
|
||||
else
|
||||
div.classList.add('d-none')
|
||||
}
|
||||
|
||||
function updatePoules(round, poules) {
|
||||
let roundList = document.getElementById(`recap-${tournament.id}-round-list`)
|
||||
let poolListId = `recap-${tournament.id}-round-${round}-pool-list`
|
||||
@ -508,6 +520,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
case 'export_visibility':
|
||||
updateExportVisibility(data.visible)
|
||||
break
|
||||
case 'continue_visibility':
|
||||
updateContinueVisibility(data.visible)
|
||||
break
|
||||
case 'set_poules':
|
||||
updatePoules(data.round, data.poules)
|
||||
break
|
||||
|
Reference in New Issue
Block a user