feat: implement attendance tracking UI with dynamic table rendering and data persistence
This commit is contained in:
parent
7bda34913f
commit
d8c5448bc5
@ -25,15 +25,7 @@ function renderTable() {
|
|||||||
headRow.appendChild(document.createElement('th')).innerText = 'Date';
|
headRow.appendChild(document.createElement('th')).innerText = 'Date';
|
||||||
data.players.forEach((name, i) => {
|
data.players.forEach((name, i) => {
|
||||||
const th = document.createElement('th');
|
const th = document.createElement('th');
|
||||||
const input = document.createElement('input');
|
th.innerText = name;
|
||||||
input.type = 'text';
|
|
||||||
input.value = name;
|
|
||||||
input.onchange = e => {
|
|
||||||
data.players[i] = e.target.value;
|
|
||||||
saveData();
|
|
||||||
renderTable();
|
|
||||||
};
|
|
||||||
th.appendChild(input);
|
|
||||||
headRow.appendChild(th);
|
headRow.appendChild(th);
|
||||||
});
|
});
|
||||||
// Guest column
|
// Guest column
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user