Cosmetic update: smaller date column. Anti slugginsness update

This commit is contained in:
Greg 2025-05-11 11:18:53 +02:00
parent af150d6214
commit f8f9d778b5

View File

@ -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);