From 6e511fc4a9fc3877e86c9a1572116dfc07a77ffd Mon Sep 17 00:00:00 2001 From: James Collins Date: Mon, 5 Jun 2023 19:53:11 +1000 Subject: [PATCH] support TBC/TBD --- resources/js/components/SMEventCard.vue | 4 ++++ resources/js/views/dashboard/EventEdit.vue | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/js/components/SMEventCard.vue b/resources/js/components/SMEventCard.vue index 212aa12..291c15d 100644 --- a/resources/js/components/SMEventCard.vue +++ b/resources/js/components/SMEventCard.vue @@ -158,6 +158,10 @@ const computedAges = (ages: string): string => { * @returns The converted string. */ const computedPrice = (price: string): string => { + if (price.toLowerCase() === "tbd" || price.toLowerCase() === "tbc") { + return price.toUpperCase(); + } + const trimmed = parseInt(price.trim()); if (isNaN(trimmed) || trimmed == 0) { return "Free"; diff --git a/resources/js/views/dashboard/EventEdit.vue b/resources/js/views/dashboard/EventEdit.vue index ffb7cda..c2ec040 100644 --- a/resources/js/views/dashboard/EventEdit.vue +++ b/resources/js/views/dashboard/EventEdit.vue @@ -66,7 +66,8 @@ Leave blank to hide from public.Leave blank to hide from public. Also supports TBD + and TBC.