From f6a390595a27625a2ee45439dcb5cc11e30772a3 Mon Sep 17 00:00:00 2001 From: James Collins Date: Mon, 27 Feb 2023 23:45:11 +1000 Subject: [PATCH] Moved date checks to computed --- resources/js/views/EventView.vue | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/resources/js/views/EventView.vue b/resources/js/views/EventView.vue index b3162d3..1e6a224 100644 --- a/resources/js/views/EventView.vue +++ b/resources/js/views/EventView.vue @@ -23,10 +23,7 @@
Registration for this event has closed. @@ -43,10 +40,7 @@
@@ -55,10 +49,7 @@
@@ -181,6 +172,12 @@ const registerUrl = computed(() => { return href; }); +const expired = computer(()=>{ +return new SMDate(event.value?.end_at, { + format: 'ymd', + }).isBefore(); + }); + /** * Load the page data. */