Disabled attendance buttons if event end time is past current time to address #55
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m13s

This commit is contained in:
2025-12-04 22:55:25 -05:00
parent 5a7b3ba2ab
commit 6d6789c4a6

View File

@@ -97,6 +97,12 @@ async function forceReload() {
activeEvent.value = await getCalendarEvent(activeEvent.value.id);
}
const isPast = computed(() => {
const end = new Date(activeEvent.value.end)
// is current date later than end date
return new Date() < end;
})
defineExpose({forceReload})
</script>
@@ -142,7 +148,7 @@ defineExpose({forceReload})
<CircleAlert></CircleAlert> This event has been cancelled
</div>
</section>
<section class="w-full">
<section v-if="isPast" class="w-full">
<ButtonGroup class="flex w-full">
<Button variant="outline"
:class="myAttendance?.status === CalendarAttendance.Attending ? 'border-2 border-primary text-primary' : ''"