mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: different colors for suggested rehersal and validated rehersal
This commit is contained in:
parent
b056af78ac
commit
a3d62200ce
10 changed files with 102 additions and 24 deletions
|
|
@ -12,6 +12,7 @@ router.get(
|
|||
asyncHandler(async (req, res) => {
|
||||
const [rehearsals, settings] = await Promise.all([rehearsalsRepo.findUpcoming(), calendarRepo.getSlotSettings()]);
|
||||
const threshold = settings.rehearsalConfirmThreshold;
|
||||
const hostUserId = settings.rehearsalHostUserId;
|
||||
res.json(
|
||||
rehearsals.map((r) => ({
|
||||
id: r.id,
|
||||
|
|
@ -21,8 +22,10 @@ router.get(
|
|||
proposedBy: r.proposed_by,
|
||||
proposedByName: r.proposed_by_name,
|
||||
votes: r.votes,
|
||||
status: computeRehearsalStatus(r.votes, threshold),
|
||||
status: computeRehearsalStatus(r.votes, threshold, hostUserId),
|
||||
confirmThreshold: threshold,
|
||||
hostUserId,
|
||||
hostName: settings.rehearsalHostName,
|
||||
}))
|
||||
);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue