Added Status to Tickets

Fixed Telegram Notification in Tickets
Added Ticket Closing
This commit is contained in:
2025-02-11 19:22:52 +01:00
parent 80af069669
commit b0d99f0a86

View File

@@ -33,7 +33,9 @@ const addMessage = async () => {
toast.add({title: "Erstellen erfolgreich"}) toast.add({title: "Erstellen erfolgreich"})
messageContent.value="" messageContent.value=""
setup() 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()
}
</script> </script>
<template> <template>
@@ -80,7 +94,7 @@ const addEntry = async () => {
<UButton <UButton
v-if="profileStore.currentTenant === 5" v-if="profileStore.currentTenant === 5"
variant="outline" variant="outline"
disabled @click="closeTicket"
> >
Ticket Schließen Ticket Schließen
</UButton> </UButton>