Fix several bugs and race conditions.

This commit is contained in:
Oleksandr Kozachuk
2025-06-04 10:46:51 +02:00
parent eb9b29d301
commit c66772fd67
2 changed files with 40 additions and 31 deletions
+5 -5
View File
@@ -828,11 +828,11 @@
if (idea.start_time && idea.end_time) {
const s = new Date(idea.start_time).toLocaleDateString('nb-NO', {
hour: '2-digit', minute: '2-digit', hour12: false
});
}).replace(/ /g, ' ');
const e = new Date(idea.end_time).toLocaleDateString('nb-NO', {
hour: '2-digit', minute: '2-digit', hour12: false
});
timeCell = `<td>${s}${e}</td>`;
}).replace(/ /g, '&nbsp;');
timeCell = `<td>${s}<br/>→&nbsp;${e}</td>`;
} else if (idea.start_time) {
const s = new Date(idea.start_time).toLocaleDateString('nb-NO', {
hour: '2-digit', minute: '2-digit', hour12: false
@@ -848,8 +848,8 @@
}
html += `<tr>`
+ `<td><strong>${idea.name}</strong><br><small>${idea.description}</small></td>`
+ timeCell;
+ `<td><strong>${idea.name}</strong><br><small>${linkify(idea.description)}</small></td>`
+ timeCell;
allVoters.forEach(voter => {
html += `<td class="vote-cell">${idea.voters.includes(voter) ? '✓' : ''}</td>`;
});