From b0d99f0a86b4b5d9317e414893858f51c354b134 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 11 Feb 2025 19:22:52 +0100 Subject: [PATCH] Added Status to Tickets Fixed Telegram Notification in Tickets Added Ticket Closing --- pages/support/[id].vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pages/support/[id].vue b/pages/support/[id].vue index 0ab3c49..a998a80 100644 --- a/pages/support/[id].vue +++ b/pages/support/[id].vue @@ -33,7 +33,9 @@ const addMessage = async () => { toast.add({title: "Erstellen erfolgreich"}) messageContent.value="" setup() - await useFunctions().useSendTelegramNotification(`Neue Nachricht im Ticket ${useRoute().params.id} von ${profileStore.activeProfile.fullName}: ${data.content}`) + if(profileStore.currentTenant !== 5) { + await useFunctions().useSendTelegramNotification(`Neue Nachricht im Ticket ${useRoute().params.id} von ${profileStore.activeProfile.fullName}: ${data.content}`) + } } } @@ -60,6 +62,18 @@ const addEntry = async () => { } } +const closeTicket = async () => { + const {data, error} = await supabase.from("tickets").update({status: "Geschlossen"}).eq("id",useRoute().params.id).single() + + if(error) { + console.log(error) + } else { + console.log(data) + } + + setup() +} +