diff --git a/src/lib/components/billing/estimatedTotal.svelte b/src/lib/components/billing/estimatedTotal.svelte index 0199e0ba9..5d2ab12b7 100644 --- a/src/lib/components/billing/estimatedTotal.svelte +++ b/src/lib/components/billing/estimatedTotal.svelte @@ -21,12 +21,12 @@ async function getEstimate(billingPlan: string, collaborators: string[], couponId: string) { try { - error = ''; estimation = await sdk.forConsole.billing.estimationCreateOrganization( billingPlan, couponId === '' ? null : couponId, collaborators ?? [] ); + error = ''; } catch (e) { error = e.message; } @@ -56,15 +56,15 @@ : getEstimate(billingPlan, collaborators, couponId); -{#if error.length} - - - {error} - - -{:else if estimation} +{#if estimation || error.length} - + {#if error.length} +

+ {error} +

+ {/if} + + {#if estimation} {#each estimation.items ?? [] as item}

{item.label}

@@ -76,19 +76,18 @@ {/each}
-

- Total due -

+

Total due

{formatCurrency(estimation.grossAmount)}

- You'll pay {formatCurrency(estimation.grossAmount)} now. Once - your credits run out, you'll be charged + You'll pay {formatCurrency(estimation.grossAmount)} now. + Once your credits run out, you'll be charged {formatCurrency(estimation.grossAmount)} every 30 days.

+ {/if}