Show edit on own cards during voting; include playerId in listings
This commit is contained in:
@@ -78,6 +78,7 @@ export function signatureSuggestions(list) {
|
||||
return JSON.stringify(
|
||||
list.map((s) => [
|
||||
s.id,
|
||||
s.playerId,
|
||||
s.name,
|
||||
s.genre,
|
||||
s.description,
|
||||
|
||||
@@ -136,9 +136,12 @@ export function renderVotes() {
|
||||
state.myVotes.map((v) => [v.suggestionId, v.score]),
|
||||
);
|
||||
state.allSuggestions.forEach((s) => {
|
||||
const canEdit = !!state.me?.isAdmin || s.playerId === state.me?.id;
|
||||
const lockTitle = state.phase !== "Suggest" && !state.me?.isAdmin;
|
||||
const li = buildCard(s, {
|
||||
showAuthor: true,
|
||||
allowEdit: !!state.me?.isAdmin,
|
||||
allowEdit: canEdit,
|
||||
lockTitle,
|
||||
});
|
||||
const hasVote = Object.prototype.hasOwnProperty.call(votesMap, s.id);
|
||||
const current = hasVote ? votesMap[s.id] : 5; // start neutral when no prior vote
|
||||
|
||||
Reference in New Issue
Block a user