feat: add missing alerts

This commit is contained in:
Arman
2024-05-14 15:01:37 +02:00
parent e130543aa5
commit 2c7abb3242
2 changed files with 15 additions and 5 deletions
@@ -4,7 +4,7 @@
import { sdk } from '$lib/stores/sdk';
import { hasStripePublicKey, isCloud } from '$lib/system';
import { onMount } from 'svelte';
import { Card, CreditCardBrandImage } from '..';
import { Alert, Card, CreditCardBrandImage } from '..';
import PaymentModal from './paymentModal.svelte';
import { capitalize } from '$lib/helpers/string';
@@ -27,9 +27,20 @@
});
$: filteredMethods = methods?.paymentMethods?.filter((method) => !!method?.last4);
$: selectedPaymentMethod = methods?.paymentMethods?.find((method) => method.$id === value);
</script>
{#if filteredMethods?.length}
{#if selectedPaymentMethod?.country === 'in'}
<Alert type="warning">
<svelte:fragment slot="title">Indian credit or debit card-holders</svelte:fragment>
To comply with RBI regulations in India, Appwrite will ask for verification to charge up
to $150 USD on your payment method. We will never charge more than the cost of your plan
and the resources you use, or your budget cap limit. For higher usage limits, please contact
us.
</Alert>
{/if}
<InputSelectSearch
id="method"
label="Payment method"
@@ -262,7 +262,7 @@
<Button href="https://appwrite.io/pricing" external link>pricing page</Button>.
</p>
{#if anyOrgFree && billingPlan === BillingPlan.PRO}
<Alert>
<Alert type="warning">
You are limited to one Starter organization per account. Consider upgrading or
deleting <Button link href={`${base}/console/organization-${anyOrgFree.$id}`}
>{anyOrgFree.name}</Button
@@ -330,8 +330,7 @@
validityRegex={emailRegex}
validityMessage="Invalid email address"
id="members" />
<SelectPaymentMethod bind:methods bind:value={paymentMethodId} bind:taxId
></SelectPaymentMethod>
<SelectPaymentMethod bind:methods bind:value={paymentMethodId} bind:taxId />
</FormList>
{#if !couponData?.code}
<Button
@@ -347,7 +346,7 @@
<FormList class="u-margin-block-start-16">
<InputSelect
id="reason"
label="What made you decide to change your plan?*"
label="What made you decide to change your plan?"
placeholder="Select one"
required
options={feedbackDowngradeOptions}