From 95b88842a6eb3474e69040bd360880cb2fe63be7 Mon Sep 17 00:00:00 2001 From: Arman Date: Mon, 4 Dec 2023 17:12:05 +0100 Subject: [PATCH] fix: tax id, add feedback project --- src/lib/stores/organization.ts | 2 +- .../billing/taxId.svelte | 6 ++--- src/routes/console/supportWizard.svelte | 5 ++-- .../console/wizard/support/step1.svelte | 27 +++++++++++++++++-- src/routes/console/wizard/support/store.ts | 1 + 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/lib/stores/organization.ts b/src/lib/stores/organization.ts index baa57bcbe..67c0fc30b 100644 --- a/src/lib/stores/organization.ts +++ b/src/lib/stores/organization.ts @@ -17,7 +17,7 @@ export type Organization = Models.Team> & { billingTrialDays?: number; billingAddressId?: string; amount: number; - taxId?: string; + billingTaxId?: string; }; export type BillingLimits = { diff --git a/src/routes/console/organization-[organization]/billing/taxId.svelte b/src/routes/console/organization-[organization]/billing/taxId.svelte index 0fd2d4c13..003012cbb 100644 --- a/src/routes/console/organization-[organization]/billing/taxId.svelte +++ b/src/routes/console/organization-[organization]/billing/taxId.svelte @@ -12,13 +12,13 @@ let taxId: string; onMount(() => { - taxId = $organization?.taxId; + taxId = $organization?.billingTaxId; }); async function updateTaxId() { try { await sdk.forConsole.billing.updateTaxId($organization.$id, taxId); - await invalidate(Dependencies.ADDRESS); + await invalidate(Dependencies.ORGANIZATION); addNotification({ type: 'success', message: `${$organization.name} tax ID has been successfully updated` @@ -49,7 +49,7 @@ - + diff --git a/src/routes/console/supportWizard.svelte b/src/routes/console/supportWizard.svelte index 2a2a8df18..73b093868 100644 --- a/src/routes/console/supportWizard.svelte +++ b/src/routes/console/supportWizard.svelte @@ -42,7 +42,7 @@ { id: '41612', value: $supportData.category }, { id: '48493', value: $user?.name ?? '' }, { id: '48492', value: $organization.$id ?? '' }, - // { id: '48491', value: $user?.projectId ?? '' }, + { id: '48491', value: $supportData?.project ?? '' }, { id: '48490', value: $user?.$id ?? '' } ] }) @@ -68,7 +68,8 @@ $supportData = { message: null, category: 'general', - file: null + file: null, + project: null }; } diff --git a/src/routes/console/wizard/support/step1.svelte b/src/routes/console/wizard/support/step1.svelte index 925ca4aa4..27cc94015 100644 --- a/src/routes/console/wizard/support/step1.svelte +++ b/src/routes/console/wizard/support/step1.svelte @@ -1,5 +1,5 @@ @@ -35,6 +49,15 @@
+ {#if options?.length} + + {/if} ({