From 533fdab1506a887e72a7dda458084f3117b40d0d Mon Sep 17 00:00:00 2001 From: James Collins Date: Fri, 24 Feb 2023 22:18:32 +1000 Subject: [PATCH] fix SMDate() to SMDate("now") --- resources/js/views/Home.vue | 4 +++- resources/js/views/WorkshopList.vue | 3 ++- resources/js/views/WorkshopView.vue | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/js/views/Home.vue b/resources/js/views/Home.vue index ec6198b..956db26 100644 --- a/resources/js/views/Home.vue +++ b/resources/js/views/Home.vue @@ -177,7 +177,9 @@ const handleLoad = async () => { limit: 3, end_at: ">" + - new SMDate().format("yyyy-MM-dd HH:mm:ss", { utc: true }), + new SMDate("now").format("yyyy-MM-dd HH:mm:ss", { + utc: true, + }), }, }); diff --git a/resources/js/views/WorkshopList.vue b/resources/js/views/WorkshopList.vue index 1939a3a..ad93773 100644 --- a/resources/js/views/WorkshopList.vue +++ b/resources/js/views/WorkshopList.vue @@ -119,7 +119,8 @@ const handleLoad = async () => { if (Object.keys(query).length == 1 && Object.keys(query)[0] == "limit") { query["end_at"] = - ">" + new SMDate().format("yyyy/MM/dd HH:mm:ss", { utc: true }); + ">" + + new SMDate("now").format("yyyy/MM/dd HH:mm:ss", { utc: true }); } api.get({ diff --git a/resources/js/views/WorkshopView.vue b/resources/js/views/WorkshopView.vue index 44a1b83..1fd017f 100644 --- a/resources/js/views/WorkshopView.vue +++ b/resources/js/views/WorkshopView.vue @@ -144,8 +144,9 @@ const workshopDate = computed(() => { "h:mm aa" ) + " - " + - SMDate(event.value.end_at, { format: "ymd" }), - format("h:mm aa"), + new SMDate(event.value.end_at, { format: "ymd" }).format( + "h:mm aa" + ), ]; } } @@ -222,7 +223,6 @@ const handleLoad = async () => { const handleLoadImage = async () => { try { - console.log(event.value); const result = await api.get(`/media/${event.value.hero}`); const data = result.data as ApiMedia;