diff --git a/components/HelpSlideover.vue b/components/HelpSlideover.vue index 0bd70ab..094e1da 100644 --- a/components/HelpSlideover.vue +++ b/components/HelpSlideover.vue @@ -19,6 +19,10 @@ const links = [{ shortcuts.value = true } }, { + label: 'Tickets', + icon: 'i-heroicons-clipboard-document', + to: '/support', +}, { label: 'Webseite', icon: 'i-heroicons-globe-europe-africa', to: 'https://fedeo.de', @@ -173,21 +177,21 @@ const resetContactRequest = () => {
-
+ + –> @@ -222,6 +226,6 @@ const resetContactRequest = () => {
- + --> \ No newline at end of file diff --git a/components/MainNav.vue b/components/MainNav.vue index 3d2e6e9..c9ad933 100644 --- a/components/MainNav.vue +++ b/components/MainNav.vue @@ -13,6 +13,11 @@ const links = computed(() => { icon: "i-heroicons-rectangle-stack", target: "_blank", }] : [], + ... profileStore.currentTenant === 5 ? [{ + label: "Support Tickets", + to: "/support", + icon: "i-heroicons-rectangle-stack", + }] : [], { id: 'dashboard', label: "Dashboard", diff --git a/composables/useFunctions.js b/composables/useFunctions.js index 6918d87..0d6b759 100644 --- a/composables/useFunctions.js +++ b/composables/useFunctions.js @@ -1,7 +1,7 @@ import axios from "axios"; import dayjs from "dayjs"; -const baseURL = /*"http://localhost:3333"*/ "https://functions.fedeo.io" +const baseURL = "http://localhost:3333" //"https://functions.fedeo.io" export const useFunctions = () => { const supabase = useSupabaseClient() @@ -101,6 +101,21 @@ export const useFunctions = () => { } + const useSendTelegramNotification = async (message) => { + const {data:{session:{access_token}}} = await supabase.auth.getSession() + + const {data} = await axios({ + method: "POST", + url: `${baseURL}/functions/sendtelegramnotification`, + data: { + message: message + }, + headers: { + Authorization: `Bearer ${access_token}` + } + }) + } + const useBankingCheckInstitutions = async (bic) => { const {data:{session:{access_token}}} = await supabase.auth.getSession() @@ -131,5 +146,5 @@ export const useFunctions = () => { } - return {getWorkingTimesEvaluationData, useNextNumber, useCreateTicket, useBankingGenerateLink, useBankingCheckInstitutions, useBankingListRequisitions, useCreatePDF} + return {getWorkingTimesEvaluationData, useNextNumber, useCreateTicket, useBankingGenerateLink, useBankingCheckInstitutions, useBankingListRequisitions, useCreatePDF, useSendTelegramNotification} } \ No newline at end of file diff --git a/pages/index.vue b/pages/index.vue index 7e0346c..e48f58b 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -20,6 +20,11 @@ > + + + @@ -38,11 +44,6 @@ > - - - diff --git a/pages/support/[id].vue b/pages/support/[id].vue new file mode 100644 index 0000000..0ab3c49 --- /dev/null +++ b/pages/support/[id].vue @@ -0,0 +1,179 @@ + + + + + \ No newline at end of file diff --git a/pages/support/create.vue b/pages/support/create.vue new file mode 100644 index 0000000..d683999 --- /dev/null +++ b/pages/support/create.vue @@ -0,0 +1,73 @@ + + + + + \ No newline at end of file diff --git a/pages/support/index.vue b/pages/support/index.vue new file mode 100644 index 0000000..19dc77e --- /dev/null +++ b/pages/support/index.vue @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file