diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte
index 95af6175f..2c4137270 100644
--- a/src/routes/(console)/apply-credit/+page.svelte
+++ b/src/routes/(console)/apply-credit/+page.svelte
@@ -1,33 +1,28 @@
+
+
+ {#if !dateAvailable}
+ Credits will automatically be applied to your next invoice.
+ {:else}
Credits will automatically be applied to your next invoice on {toLocaleDate(selectedOrg?.billingNextInvoiceDate)}.
- Add a coupon code to apply credits to your organization. {campaign?.cta}
- {#if couponData?.code && couponData?.status === 'active' && campaign?.claimed}
- {campaign?.claimed}
- {:else if campaign?.unclaimed}
- {campaign?.unclaimed}
- {/if}
-
Add a coupon code to apply credits to your organization.
+ {/if} + @@ -319,18 +206,20 @@ diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index d8d1a413b..946cc1083 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -59,7 +59,7 @@ let formComponent: Form; let isSubmitting = writable(false); let methods: PaymentList; - let billingPlan: Tier = $organization.billingPlan; + let billingPlan: Tier = $currentPlan?.$id as Tier; let paymentMethodId: string; let collaborators: string[] = data?.members?.memberships @@ -100,7 +100,7 @@ billingPlan = plan as BillingPlan; } } - if ($organization?.billingPlan === BillingPlan.SCALE) { + if ($currentPlan?.$id === BillingPlan.SCALE) { billingPlan = BillingPlan.SCALE; } else { billingPlan = BillingPlan.PRO; @@ -141,7 +141,7 @@ 'Content-Type': 'application/json' }, body: JSON.stringify({ - from: tierToPlan($organization.billingPlan).name, + from: tierToPlan($currentPlan?.$id as Tier).name, to: tierToPlan(billingPlan).name, email: $user.email, reason: feedbackDowngradeOptions.find( @@ -239,12 +239,12 @@ } } - $: isUpgrade = billingPlan > $organization.billingPlan; - $: isDowngrade = billingPlan < $organization.billingPlan; + $: isUpgrade = billingPlan > ($currentPlan?.$id as Tier); + $: isDowngrade = billingPlan < ($currentPlan?.$id as Tier); $: if (billingPlan !== BillingPlan.FREE) { loadPaymentMethods(); } - $: isButtonDisabled = $organization.billingPlan === billingPlan; + $: isButtonDisabled = ($currentPlan?.$id as Tier) === billingPlan;