mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: not show avalaibility when rehersal is accepted
This commit is contained in:
parent
f61deeac22
commit
4e2983dddd
2 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue