Allow admins to delete suggestions in Reveal

This commit is contained in:
2026-01-29 01:58:59 +01:00
parent af84fc50d4
commit a89ea5874b
2 changed files with 12 additions and 7 deletions

View File

@@ -155,7 +155,8 @@ function renderAllSuggestions() {
if (!list) return;
list.innerHTML = "";
const allowEdit = !!state.me?.isAdmin;
state.allSuggestions.forEach((s) => list.appendChild(buildCard(s, { showAuthor: true, allowEdit })));
const allowDelete = !!state.me?.isAdmin && (state.phase === "Reveal" || state.phase === "Suggest");
state.allSuggestions.forEach((s) => list.appendChild(buildCard(s, { showAuthor: true, allowEdit, allowDelete })));
}
function renderVotes() {