Added Status to Tickets
Fixed Telegram Notification in Tickets Added Ticket Closing
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -80,7 +94,7 @@ const addEntry = async () => {
|
||||
<UButton
|
||||
v-if="profileStore.currentTenant === 5"
|
||||
variant="outline"
|
||||
disabled
|
||||
@click="closeTicket"
|
||||
>
|
||||
Ticket Schließen
|
||||
</UButton>
|
||||
|
||||
Reference in New Issue
Block a user