diff --git a/src/routes/(console)/organization-[organization]/billing/planSummary.svelte b/src/routes/(console)/organization-[organization]/billing/planSummary.svelte index afe13b5172..fa8e582d17 100644 --- a/src/routes/(console)/organization-[organization]/billing/planSummary.svelte +++ b/src/routes/(console)/organization-[organization]/billing/planSummary.svelte @@ -14,7 +14,8 @@ Icon, Layout, Divider, - Badge + Badge, + Tooltip } from '@appwrite.io/pink-svelte'; import { humanFileSize } from '$lib/helpers/sizeConvertion'; import { formatNum } from '$lib/helpers/string'; @@ -72,6 +73,7 @@ const baseAmount = $derived(currentAggregation?.amount ?? currentPlan?.price ?? 0); const creditsApplied = $derived(Math.min(baseAmount, availableCredit ?? 0)); const totalAmount = $derived(Math.max(baseAmount - creditsApplied, 0)); + const isUpgrading = $derived($organization?.status === 'upgrading'); function formatHumanSize(bytes: number): string { const size = humanFileSize(bytes || 0); @@ -588,62 +590,61 @@
- {#if !currentPlan.requiresPaymentMethod} - - {#if !currentPlan?.usagePerProject} - - {/if} + + +
+ {#if !currentPlan.requiresPaymentMethod} + + {:else if $organization?.billingPlanDowngrade !== null} + + {:else} + + {/if} +
+ + Your payment is still being processed, check with your payment provider. + +
+ {#if !currentPlan?.usagePerProject} -
- {:else} - - {#if $organization?.billingPlanDowngrade !== null} - - {:else} - - {/if} - {#if !currentPlan?.usagePerProject} - - {/if} - - {/if} + {/if} +
{/key} diff --git a/src/routes/(console)/organization-[organization]/billing/planSummaryOld.svelte b/src/routes/(console)/organization-[organization]/billing/planSummaryOld.svelte index 0d4c8b1326..f1fd80d7ef 100644 --- a/src/routes/(console)/organization-[organization]/billing/planSummaryOld.svelte +++ b/src/routes/(console)/organization-[organization]/billing/planSummaryOld.svelte @@ -31,6 +31,7 @@ const isTrial = new Date($organization?.billingStartDate).getTime() - today.getTime() > 0 && $organization?.billingTrialDays; /* number of trial days. */ + $: isUpgrading = $organization?.status === 'upgrading'; const extraUsage = currentInvoice ? currentInvoice.amount - currentPlan?.price : 0; @@ -41,9 +42,11 @@ A breakdown of your estimated upcoming payment for the current billing period. Totals displayed exclude accumulated credits and applicable taxes. -

- Due at: {toLocaleDate($organization?.billingNextInvoiceDate)} -

+ +

+ Due at: {toLocaleDate($organization?.billingNextInvoiceDate)} +

+
@@ -165,50 +168,55 @@
- {#if !currentPlan.requiresPaymentMethod} -
- {#if !currentPlan?.usagePerProject} - - {/if} +
+ +
+ {#if !currentPlan.requiresPaymentMethod} + + {:else if $organization?.billingPlanDowngrade !== null} + + {:else} + + {/if} +
+ + Your payment is still being processed, check with your payment provider. + +
+ {#if !currentPlan?.usagePerProject} -
- {:else} -
- {#if $organization?.billingPlanDowngrade !== null} - - {:else} - - {/if} - {#if !currentPlan?.usagePerProject} - - {/if} -
- {/if} + {/if} +
{/if}