diff --git a/public/css/style.css b/public/css/style.css index fa03533..5dba1f7 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1521,10 +1521,12 @@ button.calendar-filters-close { display: none; } align-items: center; flex-wrap: wrap; gap: 0.3rem 0.5rem; - margin-top: 0.35rem; + margin: 0.35rem 0 0.6rem; font-size: 0.8rem; } +.modal-section .rehearsal-actions { margin-top: 0.5rem; } + .rehearsal-accepted-by .avatar-sm { width: 1.3rem; height: 1.3rem; font-size: 0.65rem; } .vote-badge { diff --git a/public/js/calendar.js b/public/js/calendar.js index 0cfe1bd..5a0755d 100644 --- a/public/js/calendar.js +++ b/public/js/calendar.js @@ -309,8 +309,9 @@ function openModal(date, slot, visible, concert, rehearsal) { currentModalDate = { date, slot }; const proposeBtn = document.getElementById('modal-propose-rehearsal-btn'); const availabilitySection = document.getElementById('modal-availability-section'); + const rehearsalAccepted = rehearsal && rehearsal.votes.some((v) => v.vote === 'accept'); if (slot) { - availabilitySection.style.display = ''; + availabilitySection.style.display = rehearsalAccepted ? 'none' : ''; proposeBtn.style.display = ''; const alreadyProposed = state.rehearsals.some((r) => isoDate(new Date(r.startsAt)) === isoDate(date)); proposeBtn.disabled = alreadyProposed;