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
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m13s
This commit is contained in:
@@ -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' : ''"
|
||||
|
||||
Reference in New Issue
Block a user