From bbc947582efa599c6da8dec7055121e18ca2f8b7 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Tue, 11 Mar 2025 11:08:53 +0100 Subject: [PATCH] Support wizard to V2 --- src/routes/(console)/supportWizard.svelte | 146 +++++++++------------- 1 file changed, 56 insertions(+), 90 deletions(-) diff --git a/src/routes/(console)/supportWizard.svelte b/src/routes/(console)/supportWizard.svelte index c3d956e2a..1caae890a 100644 --- a/src/routes/(console)/supportWizard.svelte +++ b/src/routes/(console)/supportWizard.svelte @@ -4,7 +4,7 @@ import { supportData, isSupportOnline } from './wizard/support/store'; import { onMount } from 'svelte'; import { sdk } from '$lib/stores/sdk'; - import { InputSelect, InputText, InputTextarea } from '$lib/elements/forms/index.js'; + import { Form, InputSelect, InputText, InputTextarea } from '$lib/elements/forms/index.js'; import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; import { @@ -41,21 +41,6 @@ }); async function handleSubmit() { - console.log({ - email: $user.email, - subject: $supportData.subject, - firstName: $user?.name || 'Unknown', - message: $supportData.message, - tags: ['cloud'], - customFields: [ - { id: '41612', value: $supportData.category }, - { id: '48493', value: $user?.name ?? '' }, - { id: '48492', value: $organization?.$id ?? '' }, - { id: '48491', value: $supportData?.project ?? '' }, - { id: '48490', value: $user?.$id ?? '' } - ] - }); - return; const response = await fetch(`${VARS.GROWTH_ENDPOINT}/support`, { method: 'POST', headers: { @@ -118,83 +103,64 @@ $: supportWeekDays = `${utcWeekDayToLocaleWeekDay(workTimings.startDay, workTimings.start)} - ${utcWeekDayToLocaleWeekDay(workTimings.endDay, workTimings.end)}`; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - How can we help you? - Please describe your request in detail. If applicable, include steps for - reproduction of any in-app issues. - - - Choose a topic - - +
+ + + How can we help you? + Please describe your request in detail. If applicable, include steps for + reproduction of any in-app issues. + + + Choose a topic + + { + $supportData.category = 'general'; + }} + selected={$supportData.category === 'general'}>general + { + $supportData.category = 'billing'; + }} + selected={$supportData.category === 'billing'}>billing + { + $supportData.category = 'technical'; + }} + selected={$supportData.category === 'technical'}>technical + + + + + + + { - $supportData.category = 'general'; - }} - selected={$supportData.category === 'general'}>general - { - $supportData.category = 'billing'; - }} - selected={$supportData.category === 'billing'}>billing - { - $supportData.category = 'technical'; - }} - selected={$supportData.category === 'technical'}>technical + wizard.hide(); + }}>Cancel + Submit - - - - - Submit - - +