Merge branch 'beta' into 'main'
Version 1.1.1 See merge request fedeo/software!4
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
const { isHelpSlideoverOpen } = useDashboard()
|
||||
const { metaSymbol } = useShortcuts()
|
||||
|
||||
@@ -101,42 +101,33 @@ const filteredCategories = computed(() => {
|
||||
})
|
||||
|
||||
const contactRequestData = ref({
|
||||
source: "helpSlideover",
|
||||
tenant: profileStore.currentTenant,
|
||||
message: "",
|
||||
title: "",
|
||||
contactName: profileStore.activeProfile.fullName,
|
||||
contactTel: profileStore.activeProfile.phoneMobile || profileStore.activeProfile.phoneHome,
|
||||
contactMail: profileStore.activeProfile.email,
|
||||
contactType: "Hilfe",
|
||||
currentPath: router.currentRoute
|
||||
})
|
||||
|
||||
const addContactRequest = async () => {
|
||||
const {data,error} = await supabase.from("contactRequests").insert(contactRequestData.value)
|
||||
console.log("ADD")
|
||||
const retVal = await useFunctions().useCreateTicket({
|
||||
subject: contactRequestData.value.title,
|
||||
message: contactRequestData.value.message,
|
||||
url: router.currentRoute.value.fullPath,
|
||||
source: "helpSlideover",
|
||||
})
|
||||
|
||||
if(error) {
|
||||
toast.add({title: "Anfrage konnte nicht erstellt werden",color:"rose"})
|
||||
} else {
|
||||
if(retVal) {
|
||||
toast.add({title: "Anfrage erfolgreich erstellt"})
|
||||
resetContactRequest()
|
||||
} else {
|
||||
toast.add({title: "Anfrage konnte nicht erstellt werden",color:"rose"})
|
||||
}
|
||||
}
|
||||
|
||||
const resetContactRequest = () => {
|
||||
contactRequestData.value = {
|
||||
source: "helpSlideover",
|
||||
tenant: profileStore.currentTenant,
|
||||
message: "",
|
||||
title: "",
|
||||
contactName: profileStore.activeProfile.fullName,
|
||||
contactTel: profileStore.activeProfile.phoneMobile || profileStore.activeProfile.phoneHome,
|
||||
contactMail: profileStore.activeProfile.email,
|
||||
contactType: "Hilfe"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -185,14 +176,14 @@ const resetContactRequest = () => {
|
||||
@submit="addContactRequest"
|
||||
@reset="resetContactRequest"
|
||||
>
|
||||
<UFormGroup
|
||||
<!-- <UFormGroup
|
||||
label="Art:"
|
||||
>
|
||||
<USelectMenu
|
||||
:options="['Hilfe','Software Problem / Bug','Funktionsanfrage','Kontakt','Sonstiges']"
|
||||
v-model="contactRequestData.contactType"
|
||||
/>
|
||||
</UFormGroup>
|
||||
</UFormGroup>-->
|
||||
<UFormGroup
|
||||
label="Titel:"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user