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
|
|
@ -1521,10 +1521,12 @@ button.calendar-filters-close { display: none; }
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.3rem 0.5rem;
|
gap: 0.3rem 0.5rem;
|
||||||
margin-top: 0.35rem;
|
margin: 0.35rem 0 0.6rem;
|
||||||
font-size: 0.8rem;
|
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; }
|
.rehearsal-accepted-by .avatar-sm { width: 1.3rem; height: 1.3rem; font-size: 0.65rem; }
|
||||||
|
|
||||||
.vote-badge {
|
.vote-badge {
|
||||||
|
|
|
||||||
|
|
@ -309,8 +309,9 @@ function openModal(date, slot, visible, concert, rehearsal) {
|
||||||
currentModalDate = { date, slot };
|
currentModalDate = { date, slot };
|
||||||
const proposeBtn = document.getElementById('modal-propose-rehearsal-btn');
|
const proposeBtn = document.getElementById('modal-propose-rehearsal-btn');
|
||||||
const availabilitySection = document.getElementById('modal-availability-section');
|
const availabilitySection = document.getElementById('modal-availability-section');
|
||||||
|
const rehearsalAccepted = rehearsal && rehearsal.votes.some((v) => v.vote === 'accept');
|
||||||
if (slot) {
|
if (slot) {
|
||||||
availabilitySection.style.display = '';
|
availabilitySection.style.display = rehearsalAccepted ? 'none' : '';
|
||||||
proposeBtn.style.display = '';
|
proposeBtn.style.display = '';
|
||||||
const alreadyProposed = state.rehearsals.some((r) => isoDate(new Date(r.startsAt)) === isoDate(date));
|
const alreadyProposed = state.rehearsals.some((r) => isoDate(new Date(r.startsAt)) === isoDate(date));
|
||||||
proposeBtn.disabled = alreadyProposed;
|
proposeBtn.disabled = alreadyProposed;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue