Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 1 addition & 55 deletions src/routes/(console)/supportWizard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Icon,
Input,
Layout,
Popover,
Tag,
Typography,
Card,
Expand All @@ -15,7 +14,6 @@
import { sdk } from '$lib/stores/sdk';
import {
Form,
InputSelect,
InputText,
InputTextarea,
Button
Expand All @@ -33,7 +31,7 @@
import { user } from '$lib/stores/user';
import { wizard } from '$lib/stores/wizard';
import { VARS } from '$lib/system';
import { IconCheckCircle, IconXCircle, IconInfo } from '@appwrite.io/pink-icons-svelte';
import { IconCheckCircle, IconXCircle } from '@appwrite.io/pink-icons-svelte';
import { removeFile } from '$lib/helpers/files';

let projectOptions = $state<Array<{ value: string; label: string }>>([]);
Expand Down Expand Up @@ -79,15 +77,6 @@
]
};

// Severity options
const severityOptions = [
{ value: 'critical', label: 'Critical' },
{ value: 'high', label: 'High' },
{ value: 'medium', label: 'Medium' },
{ value: 'low', label: 'Low' },
{ value: 'question', label: 'Question' }
];

onMount(async () => {
// Filter projects by organization ID using server-side queries
const projectList = await sdk.forConsole.projects.list({
Expand All @@ -108,7 +97,6 @@
subject: null,
category: 'technical',
topic: undefined,
severity: 'question',
file: null
};
});
Expand Down Expand Up @@ -142,7 +130,6 @@
category: $supportData.category,
orgId: $organization?.$id ?? '',
projectId: $supportData?.project ?? '',
severity: $supportData?.severity ?? '',
billingPlan: $organization?.billingPlanId ?? ''
})
);
Expand Down Expand Up @@ -179,7 +166,6 @@
subject: null,
category: 'technical',
topic: undefined,
severity: undefined,
file: null,
project: null
};
Expand Down Expand Up @@ -209,35 +195,6 @@
);
</script>

{#snippet severityPopover()}
<Popover let:toggle>
<Button extraCompact size="s" on:click={toggle}>
<Icon size="s" icon={IconInfo} />
</Button>
<div slot="tooltip" style="max-width: 400px;">
<Layout.Stack gap="s">
<Typography.Text>
<b>Critical:</b> System is down or a critical component is non-functional, causing
a complete stoppage of work or significant business impact.
</Typography.Text>
<Typography.Text>
<b>High:</b> Major functionality is impaired, but a workaround is available, or a
critical component is significantly degraded.
</Typography.Text>
<Typography.Text>
<b>Medium:</b> Minor functionality is impaired without significant business impact.
</Typography.Text>
<Typography.Text>
<b>Low:</b> Issue has minor impact on business operations; workaround is not necessary.
</Typography.Text>
<Typography.Text>
<b>Question:</b> Requests for information, general guidance, or feature requests.
</Typography.Text>
</Layout.Stack>
</div>
</Popover>
{/snippet}

<Wizard title="Contact us" confirmExit={true}>
<Form onSubmit={handleSubmit}>
<Layout.Stack gap="xl">
Expand Down Expand Up @@ -279,17 +236,6 @@
options={projectOptions ?? []}
bind:value={$supportData.project}
placeholder="Select project" />
<InputSelect
id="severity"
label="Severity"
options={severityOptions}
bind:value={$supportData.severity}
required
placeholder="Select severity">
<div slot="info">
{@render severityPopover()}
</div>
</InputSelect>
<InputText
id="subject"
label="Subject"
Expand Down
2 changes: 0 additions & 2 deletions src/routes/(console)/wizard/support/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export type SupportData = {
subject: string;
category: string;
topic?: string;
severity?: string;
file?: File | null;
project?: string;
};
Expand All @@ -14,7 +13,6 @@ export const supportData = writable<SupportData>({
message: '',
subject: '',
category: 'technical',
severity: 'question',
file: null
});

Expand Down
Loading