diff --git a/static/app.js b/static/app.js index 3bd6200..24efd2b 100644 --- a/static/app.js +++ b/static/app.js @@ -76,6 +76,7 @@ function renderTable() { if (rowIdx === closestIdx) tr.id = 'current-match-row'; // Date cell const dateTd = document.createElement('td'); + dateTd.classList.add('date-col'); if (date === '29/05/25' || date === '25/12/25') { const strong = document.createElement('strong'); strong.innerText = date; @@ -110,6 +111,19 @@ function renderTable() { } else if (data.attendance[key] === 'no') { delete data.attendance[key]; } + // Immediately update the cell UI + if (data.attendance[key] === true) { + td.innerText = 'Yes'; + td.classList.add('yes'); + td.classList.remove('no'); + } else if (data.attendance[key] === 'no') { + td.innerText = 'No'; + td.classList.add('no'); + td.classList.remove('yes'); + } else { + td.innerText = ''; + td.classList.remove('yes', 'no'); + } saveData(); }; tr.appendChild(td);