update: better colors for calendar light mode and see rejected rehersal in calendar
Some checks failed
CI/CD / test (push) Has been cancelled
CI/CD / build-and-push (push) Has been cancelled

This commit is contained in:
Nathan FONTEYNE 2026-08-11 11:59:38 +02:00
parent a3d62200ce
commit d0e9dfb62e
4 changed files with 55 additions and 18 deletions

View file

@ -106,6 +106,7 @@ function concertLinksHtml(concert) {
function rehearsalStatusLabel(r) {
if (r.status === 'confirmed') return 'Répétition confirmée';
if (r.status === 'rejected') return 'Répétition refusée';
const accepted = r.votes.filter((v) => v.vote === 'accept').length;
return `Suggestion de répétition (${accepted}/${r.confirmThreshold} votes)`;
}
@ -216,10 +217,14 @@ function renderCalendar() {
const rehearsal = rehearsalsByDate.get(isoDate(date));
if (rehearsal) {
const isConfirmed = rehearsal.status === 'confirmed';
cell.classList.add('has-rehearsal', isConfirmed ? 'rehearsal-confirmed' : 'rehearsal-suggested');
const statusTitles = {
confirmed: 'Répétition confirmée',
rejected: 'Répétition refusée',
suggested: 'Répétition proposée (en attente de votes)',
};
cell.classList.add('has-rehearsal', `rehearsal-${rehearsal.status}`);
const badge = document.createElement('span');
badge.title = isConfirmed ? 'Répétition confirmée' : 'Répétition proposée (en attente de votes)';
badge.title = statusTitles[rehearsal.status] || statusTitles.suggested;
badge.textContent = '🎸';
badges.appendChild(badge);
}
@ -522,7 +527,7 @@ function rehearsalRowTemplate(r) {
return `
<div class="rehearsal-row" data-rehearsal-id="${r.id}">
<div>
<span class="vote-badge ${r.status === 'confirmed' ? 'accept' : ''}">${escapeHtml(rehearsalStatusLabel(r))}</span>
<span class="vote-badge rehearsal-status-${r.status}">${escapeHtml(rehearsalStatusLabel(r))}</span>
<div class="card-title">${formatDatetime(r.startsAt)} ${formatTime(r.endsAt)}</div>
<div class="card-subtitle">${r.location ? `${escapeHtml(r.location)} · ` : ''}Proposée par ${escapeHtml(r.proposedByName)}</div>
${rehearsalAcceptedByHtml(r)}