mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: issues and remove extra commas
This commit is contained in:
1 parent
240eda2619
commit
644a9d3f07
5 files changed
+33
-44
No files matched your search
@@ -18,8 +18,9 @@
|
||||
organizationList
|
||||
} from '$lib/stores/organization';
|
||||
import { wizard } from '$lib/stores/wizard';
|
||||
import { GRACE_PERIOD_OVERRIDE, TRIAL_PERIOD_OVERRIDE, isCloud } from '$lib/system';
|
||||
import CreateOrganizationCloud from '../createOrganizationCloud.sveltIS_TRIAL_ENABLED
|
||||
import { GRACE_PERIOD_OVERRIDE, IS_TRIAL_DISABLED, isCloud } from '$lib/system';
|
||||
import CreateOrganizationCloud from '../createOrganizationCloud.svelte';
|
||||
|
||||
let areMembersLimited: boolean;
|
||||
$: organization.subscribe(() => {
|
||||
const limit = getServiceLimit('members') || Infinity;
|
||||
@@ -93,7 +94,7 @@
|
||||
{#if isCloud && $organization?.billingPlan === BillingPlan.STARTER}
|
||||
<Pill>FREE</Pill>
|
||||
{/if}
|
||||
{#if isCloud && $organization?.billingTrialStartDate && $daysLeftInTrial > 0 && $organization.billingPlan !== BillingPlan.STARTER && !TRIAL_PERIOD_OVERRIDE}
|
||||
{#if isCloud && $organization?.billingTrialStartDate && $daysLeftInTrial > 0 && $organization.billingPlan !== BillingPlan.STARTER && !IS_TRIAL_DISABLED}
|
||||
<div
|
||||
class="u-flex u-cross-center"
|
||||
use:tooltip={{
|
||||
@@ -101,7 +102,7 @@
|
||||
$organization.billingStartDate
|
||||
)}. ${$daysLeftInTrial} days remaining.`
|
||||
}}>
|
||||
<Pill>TRIAL</Pill>IS_TRIAL_ENABLED
|
||||
<Pill>TRIAL</Pill>
|
||||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<p class="text u-margin-block-start-16">
|
||||
This amount, and any additional usage fees, will be charged on a recurring 30-day
|
||||
billing cycle{IS_TRIAL_DISABLED
|
||||
? '.'
|
||||
? ''
|
||||
: ` after your trial period ends on ${toLocaleDate(billingPayDate.toString())}`}.
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
import { toLocaleDate } from '$lib/helpers/date';
|
||||
import { showUsageRatesModal } from '$lib/stores/billing';
|
||||
import { PaymentBoxes } from '$lib/components/billing';
|
||||
import { TRIAL_PERIOD_OVERRIDE } from '$lib/system';
|
||||
IS_TRIAL_ENABLEDnew Date();
|
||||
import { IS_TRIAL_DISABLED } from '$lib/system';
|
||||
|
||||
const today = new Date();
|
||||
const billingPayDate = new Date(today.getTime() + 44 * 24 * 60 * 60 * 1000);
|
||||
|
||||
let methods: PaymentList;
|
||||
@@ -74,15 +75,18 @@ IS_TRIAL_ENABLEDnew Date();
|
||||
<WizardStep beforeSubmit={handleSubmit}>
|
||||
<svelte:fragment slot="title">Payment details</svelte:fragment>
|
||||
<svelte:fragment slot="subtitle">
|
||||
Add a payment method to your organization. {#if !TRIAL_PERIOD_OVERRIDE}You will not be
|
||||
charged until your trial ends on <b>{toLocaleDate(billingPayDate.toString())}</b>.
|
||||
Add a payment method to your organization. {#if !IS_TRIAL_DISABLED}You will not be charged
|
||||
until your trial ends on <b>{toLocaleDate(billingPayDate.toString())}</b>.
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
|
||||
<FormList class="u-margin-block-start-8">
|
||||
<PaymentBoxes
|
||||
methods={filteredMethods}
|
||||
bind:nameIS_TRIAL_ENABLED <InputChoice
|
||||
bind:name
|
||||
bind:group={$createOrganization.paymentMethodId} />
|
||||
|
||||
<InputChoice
|
||||
type="switchbox"
|
||||
id="budget"
|
||||
label="Enable budget cap"
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
import { Pill } from '$lib/elements';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { formatCurrency } from '$lib/helpers/numbers';
|
||||
import { TRIAL_PERIOD_OVERRIDE } from '$lib/system';
|
||||
import { IS_TRIAL_DISABLED } from '$lib/system';
|
||||
|
||||
IS_TRIAL_ENABLED let members: Models.MembershipList = null;
|
||||
let usage: OrganizationUsage = null;
|
||||
let members: Models.MembershipList = null;
|
||||
|
||||
$: if ($changeOrganizationTier.billingPlan === BillingPlan.STARTER && $changeTierSteps) {
|
||||
$changeTierSteps = updateStepStatus($changeTierSteps, 2, true);
|
||||
@@ -141,7 +142,6 @@
|
||||
</LabelCard>
|
||||
</li>
|
||||
<li>
|
||||
IS_TRIAL_ENABLED
|
||||
<LabelCard
|
||||
name="plan"
|
||||
bind:group={$changeOrganizationTier.billingPlan}
|
||||
@@ -162,7 +162,7 @@
|
||||
<div class:u-opacity-50={disabled}>
|
||||
{#if $organization.billingPlan === BillingPlan.PRO}
|
||||
<Pill disabled>CURRENT PLAN</Pill>
|
||||
{:else if !TRIAL_PERIOD_OVERRIDE}
|
||||
{:else if !IS_TRIAL_DISABLED}
|
||||
<Pill>14 DAY FREE TRIAL</Pill>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Alert, Box, CreditCardBrandImage } from '$lib/components';
|
||||
import { Box, CreditCardBrandImage } from '$lib/components';
|
||||
import { CouponInput } from '$lib/components/billing';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { FormList, InputSelect, InputTextarea } from '$lib/elements/forms';
|
||||
@@ -7,7 +7,7 @@
|
||||
import { formatCurrency } from '$lib/helpers/numbers';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import type { Coupon } from '$lib/sdk/billing';
|
||||
import { plansInfo, tierToPlan } from '$lib/stores/billing';
|
||||
import { plansInfo } from '$lib/stores/billing';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import {
|
||||
@@ -16,8 +16,9 @@
|
||||
feedbackDowngradeOptions,
|
||||
isUpgrade
|
||||
} from './store';
|
||||
import { TRIAL_PERIOD_OVERRIDE } from '$lib/system';
|
||||
IS_TRIAL_ENABLED = $plansInfo.get($changeOrganizationTier.billingPlan);
|
||||
import { IS_TRIAL_DISABLED } from '$lib/system';
|
||||
|
||||
const plan = $plansInfo.get($changeOrganizationTier.billingPlan);
|
||||
const collaboratorPrice = plan?.addons.member?.price ?? 0;
|
||||
const collaboratorsNumber = $changeOrganizationTier?.collaborators?.length ?? 0;
|
||||
const totalExpences = plan.price + collaboratorPrice * collaboratorsNumber;
|
||||
@@ -58,43 +59,26 @@
|
||||
Your feedback is important to us and helps us improve the services Appwrite offers.
|
||||
Please let us know if there is a specific reason for changing your plan.
|
||||
</svelte:fragment>
|
||||
|
||||
<Alert>
|
||||
<svelte:fragment slot="title"
|
||||
>Your {tierToPlan($organization.billingPlan).name} plan subscription will end on {toLocaleDate(
|
||||
$organization.billingNextInvoiceDate
|
||||
)}</svelte:fragment>
|
||||
<p class="text">
|
||||
Following the payment of your final invoice on {toLocaleDate(
|
||||
$organization.billingNextInvoiceDate
|
||||
)}, your organization will switch to the {tierToPlan(
|
||||
$changeOrganizationTier.billingPlan
|
||||
).name} plan. Until then, you can continue to use the resources available to the {tierToPlan(
|
||||
$organization.billingPlan
|
||||
).name} plan.
|
||||
</p>
|
||||
</Alert>
|
||||
<FormList class="u-margin-block-start-24">
|
||||
<FormList>
|
||||
<InputSelect
|
||||
id="reason"
|
||||
label="Reason for plan change"
|
||||
label="What made you decide to change your plan?*"
|
||||
placeholder="Select one"
|
||||
required
|
||||
options={feedbackDowngradeOptions}
|
||||
bind:value={$changeOrganizationTier.feedbackDowngradeReason} />
|
||||
<InputTextarea
|
||||
id="comment"
|
||||
label="If you would like to elaborate, please do so here"
|
||||
label="Your feedback here"
|
||||
placeholder="Enter feedback"
|
||||
bind:value={$changeOrganizationTier.feedbackMessage} />
|
||||
</FormList>
|
||||
</WizardStep>
|
||||
{:else}
|
||||
<WizardStep
|
||||
>IS_TRIAL_ENABLED
|
||||
<WizardStep>
|
||||
<svelte:fragment slot="title">Confirm your details</svelte:fragment>
|
||||
<svelte:fragment slot="subtitle">
|
||||
Confirm the details of your new organization{TRIAL_PERIOD_OVERRIDE
|
||||
Confirm the details of your new organization{IS_TRIAL_DISABLED
|
||||
? '.'
|
||||
: ' and start your free trial.'}
|
||||
</svelte:fragment>
|
||||
@@ -126,8 +110,8 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<Box class="u-margin-block-start-32 u-flex u-flex-vertical u-gap-16" radius="small"
|
||||
>IS_TRIAL_ENABLED{#if $changeOrganizationTier.billingPlan !== BillingPlan.STARTER}
|
||||
<Box class="u-margin-block-start-32 u-flex u-flex-vertical u-gap-16" radius="small">
|
||||
{#if $changeOrganizationTier.billingPlan !== BillingPlan.STARTER}
|
||||
<CouponInput
|
||||
bind:coupon
|
||||
bind:couponData
|
||||
@@ -163,8 +147,8 @@
|
||||
|
||||
<p class="text u-margin-block-start-16">
|
||||
This amount, and any additional usage fees, will be charged on a recurring 30-day
|
||||
billing cycle{TRIAL_PERIOD_OVERRIDE
|
||||
? '.'
|
||||
billing cycle{IS_TRIAL_DISABLED
|
||||
? ''
|
||||
: ` after your trial period ends on ${toLocaleDate(billingPayDate.toString())}`}.
|
||||
</p>
|
||||
</Box>
|
||||
|
||||
Reference in new issue
Block a user