diff --git a/src/lib/components/creditCardBrandImage.svelte b/src/lib/components/creditCardBrandImage.svelte
new file mode 100644
index 000000000..6bfe34c7c
--- /dev/null
+++ b/src/lib/components/creditCardBrandImage.svelte
@@ -0,0 +1,14 @@
+
+
+
diff --git a/src/lib/components/creditCardInfo.svelte b/src/lib/components/creditCardInfo.svelte
index 0720af170..50c84b6c3 100644
--- a/src/lib/components/creditCardInfo.svelte
+++ b/src/lib/components/creditCardInfo.svelte
@@ -1,7 +1,7 @@
-
+
{#if label}
{label}
@@ -99,4 +103,4 @@
{#if error}
{error}
{/if}
-
+
diff --git a/src/lib/elements/forms/inputSelect.svelte b/src/lib/elements/forms/inputSelect.svelte
index c67562608..c6a5fa2bb 100644
--- a/src/lib/elements/forms/inputSelect.svelte
+++ b/src/lib/elements/forms/inputSelect.svelte
@@ -1,5 +1,5 @@
-
+
{#if label}
{label}
@@ -79,4 +82,4 @@
{:else}
{/if}
-
+
diff --git a/src/lib/elements/table/cell.svelte b/src/lib/elements/table/cell.svelte
index b594d69bb..fb1a80861 100644
--- a/src/lib/elements/table/cell.svelte
+++ b/src/lib/elements/table/cell.svelte
@@ -5,10 +5,11 @@
export let showOverflow = false;
let className = '';
export { className as class };
+ export let style = '';
diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts
index fecd6406e..df40725be 100644
--- a/src/lib/sdk/billing.ts
+++ b/src/lib/sdk/billing.ts
@@ -710,19 +710,19 @@ export class Billing {
async createAddress(
country: string,
streetAddress: string,
- addressLine2: string,
city: string,
state: string,
- postalCode: string
+ postalCode: string,
+ addressLine2?: string
): Promise {
const path = `/account/billing-addresses`;
const params = {
country,
streetAddress,
- addressLine2,
city,
state,
- postalCode
+ postalCode,
+ addressLine2
};
const uri = new URL(this.client.config.endpoint + path);
return await this.client.call(
@@ -738,20 +738,20 @@ export class Billing {
billingAddressId: string,
country: string,
streetAddress: string,
- addressLine2: string,
city: string,
state: string,
- postalCode: string
+ postalCode: string,
+ addressLine2?: string
): Promise {
const path = `/account/billing-addresses/${billingAddressId}`;
const params = {
billingAddressId,
country,
streetAddress,
- addressLine2,
city,
state,
- postalCode
+ postalCode,
+ addressLine2
};
const uri = new URL(this.client.config.endpoint + path);
return await this.client.call(
diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts
index fa5b9bfec..6bd3bbcb2 100644
--- a/src/lib/stores/billing.ts
+++ b/src/lib/stores/billing.ts
@@ -42,11 +42,6 @@ export function tierToPlan(tier: Tier) {
}
}
-export function getCreditCardImage(brand: string, width = 46, height = 32) {
- if (!brand) return '';
- return sdk.forConsole.avatars.getCreditCard(brand, width, height).toString();
-}
-
export function getServiceLimit(serviceId: string): number {
if (!isCloud) return 0;
if (!serviceId) return 0;
@@ -102,62 +97,3 @@ export const tierScale: TierData = {
description: 'For scaling teams that need dedicated support.',
collaboratorPrice: 0
};
-
-export const apperanceLight = {
- variables: {
- colorPrimary: '#606a7b',
- colorText: 'rgb(107, 107, 112)',
- colorBackground: '#FFFFFF',
- color: '#606a7b',
- colorDanger: '#df1b41',
- fontFamily: 'Inter, arial, sans-serif',
- borderRadius: '4px',
- fontSizeBase: '14px'
- },
- rules: {
- '.Input:hover': {
- border: 'solid 1px rgb(195, 195, 198)',
- boxShadow: 'none'
- },
- '.Input:focus': {
- border: 'solid 1px rgb(195, 195, 198)',
- boxShadow: 'none'
- },
- '.Input::placeholder': {
- color: '#C4C6D7'
- },
- '.Input--invalid': {
- border: 'solid 1px var(--colorDanger)',
- boxShadow: 'none'
- }
- }
-};
-
-export const apperanceDark = {
- variables: {
- colorPrimary: '#606a7b',
- colorText: 'rgb(195, 195, 198)',
- colorBackground: 'rgb(24, 24, 27)',
- colorDanger: '#FF453A',
- fontFamily: 'Inter, arial, sans-serif',
- borderRadius: '4px',
- fontSizeBase: '14px'
- },
- rules: {
- '.Input:hover': {
- border: 'solid 1px rgb(87, 87, 92)',
- boxShadow: 'none'
- },
- '.Input:focus': {
- border: 'solid 1px rgb(87, 87, 92)',
- boxShadow: 'none'
- },
- '.Input::placeholder': {
- color: 'rgb(87, 87, 92)'
- },
- '.Input--invalid': {
- border: 'solid 1px var(--colorDanger)',
- boxShadow: 'none'
- }
- }
-};
diff --git a/src/lib/stores/stripe.ts b/src/lib/stores/stripe.ts
index 319524e56..172fae68e 100644
--- a/src/lib/stores/stripe.ts
+++ b/src/lib/stores/stripe.ts
@@ -8,7 +8,6 @@ import {
import { sdk } from './sdk';
import { app } from './app';
import { get, writable } from 'svelte/store';
-import { apperanceDark, apperanceLight } from './billing';
import type { PaymentMethodData } from '$lib/sdk/billing';
let stripe: Stripe;
@@ -99,3 +98,61 @@ export async function submitStripeCard(name?: string, urlRoute?: string) {
throw e;
}
}
+
+const apperanceLight = {
+ variables: {
+ colorPrimary: '#606a7b',
+ colorText: 'rgb(107, 107, 112)',
+ colorBackground: '#FFFFFF',
+ color: '#606a7b',
+ colorDanger: '#df1b41',
+ fontFamily: 'Inter, arial, sans-serif',
+ borderRadius: '4px'
+ },
+ rules: {
+ '.Input:hover': {
+ border: 'solid 1px rgb(195, 195, 198)',
+ boxShadow: 'none'
+ },
+ '.Input:focus': {
+ border: 'solid 1px rgb(195, 195, 198)',
+ boxShadow: 'none'
+ },
+ '.Input::placeholder': {
+ color: '#C4C6D7'
+ },
+ '.Input--invalid': {
+ border: 'solid 1px var(--colorDanger)',
+ boxShadow: 'none'
+ }
+ }
+};
+
+const apperanceDark = {
+ variables: {
+ colorPrimary: '#606a7b',
+ colorText: 'rgb(195, 195, 198)',
+ colorBackground: 'rgb(24, 24, 27)',
+ colorDanger: '#FF453A',
+ fontFamily: 'Inter, arial, sans-serif',
+ borderRadius: '4px',
+ spacingGridRow: '16px'
+ },
+ rules: {
+ '.Input:hover': {
+ border: 'solid 1px rgb(87, 87, 92)',
+ boxShadow: 'none'
+ },
+ '.Input:focus': {
+ border: 'solid 1px rgb(87, 87, 92)',
+ boxShadow: 'none'
+ },
+ '.Input::placeholder': {
+ color: 'rgb(87, 87, 92)'
+ },
+ '.Input--invalid': {
+ border: 'solid 1px var(--colorDanger)',
+ boxShadow: 'none'
+ }
+ }
+};
diff --git a/src/routes/console/account/header.svelte b/src/routes/console/account/header.svelte
index 0b11b2324..93fde74f9 100644
--- a/src/routes/console/account/header.svelte
+++ b/src/routes/console/account/header.svelte
@@ -43,7 +43,7 @@
...permanentTabs,
{
href: `${path}/payments`,
- title: 'Payments details',
+ title: 'Payment details',
event: 'payments',
hasChildren: true
}
diff --git a/src/routes/console/account/payments/+page.svelte b/src/routes/console/account/payments/+page.svelte
index 244c6f9dd..4fb9d9a10 100644
--- a/src/routes/console/account/payments/+page.svelte
+++ b/src/routes/console/account/payments/+page.svelte
@@ -1,8 +1,8 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
(show = false)}>Cancel
Save
diff --git a/src/routes/console/account/payments/billingAddress.svelte b/src/routes/console/account/payments/billingAddress.svelte
index 543726ae9..e12f13557 100644
--- a/src/routes/console/account/payments/billingAddress.svelte
+++ b/src/routes/console/account/payments/billingAddress.svelte
@@ -38,7 +38,7 @@
{#if $addressList.total && countryList?.total}
-
+
Billing address
@@ -58,7 +58,7 @@
{country ? country.name : address.country}
-
+
import { invalidate } from '$app/navigation';
+ import { base } from '$app/paths';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { Modal } from '$lib/components';
import { Dependencies } from '$lib/constants';
@@ -53,13 +54,22 @@
This payment method is set as the default for the following organisations. As they have
upcoming invoices it cannot be deleted from your account.
-
+
+ {#each linkedOrgs as org}
+
+ {org.name}
+
+ {/each}
+
{:else}
Are you sure you want to delete this payment method from your account?
{/if}
(showDelete = false)}>Cancel
- Delete
+ {#if !linkedOrgs.length}
+ Delete
+ {/if}
diff --git a/src/routes/console/account/payments/editAddressModal.svelte b/src/routes/console/account/payments/editAddressModal.svelte
index 4001e0cb7..4d6681827 100644
--- a/src/routes/console/account/payments/editAddressModal.svelte
+++ b/src/routes/console/account/payments/editAddressModal.svelte
@@ -3,7 +3,14 @@
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { Modal } from '$lib/components';
import { Dependencies } from '$lib/constants';
- import { Button, InputNumber, InputSelect, InputText } from '$lib/elements/forms';
+ import {
+ Button,
+ FormItem,
+ FormList,
+ InputNumber,
+ InputSelect,
+ InputText
+ } from '$lib/elements/forms';
import type { Address } from '$lib/sdk/billing';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
@@ -36,7 +43,7 @@
selectedAddress.$id,
selectedAddress.country,
selectedAddress.streetAddress,
- selectedAddress.addressLine2,
+ selectedAddress.addressLine2 ? selectedAddress.addressLine2 : undefined,
selectedAddress.city,
selectedAddress.state,
selectedAddress.postalCode
@@ -58,43 +65,51 @@
}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
(show = false)}>Cancel
Save
diff --git a/src/routes/console/account/payments/editPaymentModal.svelte b/src/routes/console/account/payments/editPaymentModal.svelte
index 3adba52e7..deed9ae51 100644
--- a/src/routes/console/account/payments/editPaymentModal.svelte
+++ b/src/routes/console/account/payments/editPaymentModal.svelte
@@ -1,7 +1,7 @@