fix after sync

This commit is contained in:
Damodar Lohani
2025-01-15 07:31:04 +00:00
parent 1973a23ca0
commit c5676817c3
4 changed files with 6 additions and 13 deletions
@@ -28,12 +28,12 @@
$: currentOrgPlan = $plansInfo.get(currentTier);
$: unUsedBalances = isScaleUpgrade
? currentOrgPlan.price +
(collaborators?.length ?? 0) * (currentOrgPlan?.addons?.member?.price ?? 0)
(collaborators?.length ?? 0) * (currentOrgPlan?.addons?.seats?.price ?? 0)
: isScaleDowngrade
? currentOrgPlan.price
: 0;
$: extraSeatsCost = (collaborators?.length ?? 0) * (selectedPlan?.addons?.member?.price ?? 0);
$: extraSeatsCost = (collaborators?.length ?? 0) * (selectedPlan?.addons?.seats?.price ?? 0);
$: grossCost = isScaleUpgrade
? selectedPlan.price + extraSeatsCost - unUsedBalances
: selectedPlan.price + extraSeatsCost;
@@ -59,7 +59,7 @@
<p class="text" class:u-bold={isDowngrade}>
{formatCurrency(
isScaleDowngrade
? (collaborators?.length ?? 0) * (selectedPlan?.addons?.member?.price ?? 0)
? (collaborators?.length ?? 0) * (selectedPlan?.addons?.seats?.price ?? 0)
: extraSeatsCost
)}
</p>
@@ -102,11 +102,11 @@
You'll pay <span class="u-bold">{formatCurrency(estimatedTotal)}</span> now, with your first
billing cycle starting on
<span class="u-bold"
>{!currentPlan.trialDays
>{!currentOrgPlan.trialDays
? toLocaleDate(billingPayDate.toString())
: toLocaleDate(trialEndDate.toString())}</span
>. Once your credits run out, you'll be charged
<span class="u-bold">{formatCurrency(currentPlan.price)}</span> plus usage fees every 30 days.
<span class="u-bold">{formatCurrency(currentOrgPlan.price)}</span> plus usage fees every 30 days.
</p>
<FormList class="u-margin-block-start-24">
@@ -8,7 +8,6 @@
export let billingPlan: string;
export let anyOrgFree = false;
export let isNewOrg = false;
export let selfService = true;
let classes: string = '';
export { classes as class };
</script>
@@ -3,12 +3,7 @@
import { base } from '$app/paths';
import { page } from '$app/stores';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import {
CreditsApplied,
EstimatedTotalBox,
SelectPaymentMethod
} from '$lib/components/billing';
import EstimatedTotal from '$lib/components/billing/estimatedTotal.svelte';
import { CreditsApplied, EstimatedTotal, SelectPaymentMethod } from '$lib/components/billing';
import { BillingPlan, Dependencies } from '$lib/constants';
import { Button, Form, FormList, InputSelect, InputTags, InputText } from '$lib/elements/forms';
import { toLocaleDate } from '$lib/helpers/date';
-1
View File
@@ -6,7 +6,6 @@ import { redirect } from '@sveltejs/kit';
import { Dependencies } from '$lib/constants';
import type { LayoutLoad } from './$types';
import { redirectTo } from './store';
import { isCloud } from '$lib/system';
import { base } from '$app/paths';
import type { Account } from '$lib/stores/user';
import type { AppwriteException } from '@appwrite.io/console';