From 7f3f19fda0a0d0eeea70c875aab13658128b0fbb Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 16 Jan 2024 11:58:21 +0100 Subject: [PATCH 01/14] fix: coupon code is now uppercase --- src/lib/components/billing/couponInput.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/billing/couponInput.svelte b/src/lib/components/billing/couponInput.svelte index 1f81a3a74a..1d4d4a109c 100644 --- a/src/lib/components/billing/couponInput.svelte +++ b/src/lib/components/billing/couponInput.svelte @@ -55,7 +55,7 @@
- {couponData.code} is not a valid promo code + {couponData.code.toUpperCase()} is not a valid promo code
{:else if couponData?.status === 'active'} @@ -64,7 +64,7 @@ - {couponData.code} applied (-${couponData.credits}) + {couponData.code.toUpperCase()} applied (-${couponData.credits}) From 831ad0b8c87323f44096010aa846b87e7299f0f8 Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 16 Jan 2024 11:58:40 +0100 Subject: [PATCH 02/14] chore: track address creation --- .../console/wizard/cloudOrganization/addressDetails.svelte | 3 +++ .../wizard/cloudOrganizationChangeTier/addressDetails.svelte | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/routes/console/wizard/cloudOrganization/addressDetails.svelte b/src/routes/console/wizard/cloudOrganization/addressDetails.svelte index 608833f9c5..00439227e2 100644 --- a/src/routes/console/wizard/cloudOrganization/addressDetails.svelte +++ b/src/routes/console/wizard/cloudOrganization/addressDetails.svelte @@ -6,6 +6,7 @@ import { createOrganization } from './store'; import type { AddressesList } from '$lib/sdk/billing'; import { RadioBoxes } from '$lib/components'; + import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; let options = [ { @@ -33,7 +34,9 @@ addressLine2 ? addressLine2 : undefined ); $createOrganization.billingAddressId = response.$id; + trackEvent(Submit.BillingAddressCreate); } catch (error) { + trackError(error, Submit.BillingAddressCreate); throw new Error(error.message); } } diff --git a/src/routes/console/wizard/cloudOrganizationChangeTier/addressDetails.svelte b/src/routes/console/wizard/cloudOrganizationChangeTier/addressDetails.svelte index 5bd9ebaf56..88b2214aaf 100644 --- a/src/routes/console/wizard/cloudOrganizationChangeTier/addressDetails.svelte +++ b/src/routes/console/wizard/cloudOrganizationChangeTier/addressDetails.svelte @@ -7,6 +7,7 @@ import { organization } from '$lib/stores/organization'; import type { AddressesList } from '$lib/sdk/billing'; import { RadioBoxes } from '$lib/components'; + import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; let options = [ { @@ -34,7 +35,9 @@ addressLine2 ? addressLine2 : undefined ); $changeOrganizationTier.billingAddressId = response.$id; + trackEvent(Submit.BillingAddressCreate); } catch (error) { + trackError(error, Submit.BillingAddressCreate); throw new Error(error.message); } } From 8f017b2b347f7bcba8c92af92fdc2f8aa716d445 Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 16 Jan 2024 11:59:10 +0100 Subject: [PATCH 03/14] fix: hide coupon field during downgrade --- .../cloudOrganizationChangeTier/confirmDetails.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte b/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte index e3c33693bc..7191ee3774 100644 --- a/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte +++ b/src/routes/console/wizard/cloudOrganizationChangeTier/confirmDetails.svelte @@ -97,11 +97,11 @@ {/if} - ($changeOrganizationTier.couponCode = e.detail.code)} /> {#if $changeOrganizationTier.billingPlan !== BillingPlan.STARTER} + ($changeOrganizationTier.couponCode = e.detail.code)} />

{plan.name} plan

${plan.price}

From 9c89b79f95b9c04ab5eda6585f63be64defdd315 Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 16 Jan 2024 11:59:33 +0100 Subject: [PATCH 04/14] feat: add coupon code during creation --- .../wizard/cloudOrganization/confirmDetails.svelte | 13 +++++++++++++ .../console/wizard/cloudOrganization/store.ts | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/routes/console/wizard/cloudOrganization/confirmDetails.svelte b/src/routes/console/wizard/cloudOrganization/confirmDetails.svelte index 58aedf1796..474b07517c 100644 --- a/src/routes/console/wizard/cloudOrganization/confirmDetails.svelte +++ b/src/routes/console/wizard/cloudOrganization/confirmDetails.svelte @@ -1,9 +1,11 @@ @@ -41,6 +50,6 @@ $addCreditWizardStore.coupon = e.detail.code; }} let:data> - {data.code} has been successfully added + {data.code.toUpperCase()} has been successfully added
From e300174f6b810c236d78ab4b57929dfbd1ec88ef Mon Sep 17 00:00:00 2001 From: Arman Date: Mon, 22 Jan 2024 16:52:04 +0100 Subject: [PATCH 13/14] chore: add missing data private --- src/lib/components/radioBoxes.svelte | 2 +- src/lib/layout/notification.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/radioBoxes.svelte b/src/lib/components/radioBoxes.svelte index 74e84a85ae..4e3b4bf924 100644 --- a/src/lib/components/radioBoxes.svelte +++ b/src/lib/components/radioBoxes.svelte @@ -13,7 +13,7 @@ {#if total} {#each elements as element} {@const value = element[variableName]?.toString()} -
+
-
+
{#if title}

{title}

{/if} From 70589436c96eb3f5fd98ab2191dc73cac185eac9 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 24 Jan 2024 16:55:41 +0100 Subject: [PATCH 14/14] fix: button type --- .../console/organization-[organization]/billing/budgetCap.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/console/organization-[organization]/billing/budgetCap.svelte b/src/routes/console/organization-[organization]/billing/budgetCap.svelte index f44070bdd7..b2f710b166 100644 --- a/src/routes/console/organization-[organization]/billing/budgetCap.svelte +++ b/src/routes/console/organization-[organization]/billing/budgetCap.svelte @@ -96,6 +96,7 @@ {#if $organization?.billingPlan === BillingPlan.STARTER}