From 3814cab9a7e4ae072a40b402ae1765e5b8f99441 Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 18 Apr 2024 15:58:16 +0200 Subject: [PATCH] feat: redesign plan summary card --- src/lib/elements/table/cell.svelte | 3 +- src/lib/elements/table/cellText.svelte | 18 ++++--- .../billing/planSummary.svelte | 47 ++++++++++++------- 3 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/lib/elements/table/cell.svelte b/src/lib/elements/table/cell.svelte index ba3f04ea5..a35998e69 100644 --- a/src/lib/elements/table/cell.svelte +++ b/src/lib/elements/table/cell.svelte @@ -18,6 +18,7 @@ class:u-flex={right} class:u-main-end={right} data-title={title} - role="cell"> + role="cell" + data-private> diff --git a/src/lib/elements/table/cellText.svelte b/src/lib/elements/table/cellText.svelte index dd594b10e..9bcd2262b 100644 --- a/src/lib/elements/table/cellText.svelte +++ b/src/lib/elements/table/cellText.svelte @@ -1,18 +1,16 @@ -
+ -
+ diff --git a/src/routes/console/organization-[organization]/billing/planSummary.svelte b/src/routes/console/organization-[organization]/billing/planSummary.svelte index 2adc242a9..20126a9a2 100644 --- a/src/routes/console/organization-[organization]/billing/planSummary.svelte +++ b/src/routes/console/organization-[organization]/billing/planSummary.svelte @@ -16,6 +16,7 @@ import { humanFileSize } from '$lib/helpers/sizeConvertion'; import { BillingPlan } from '$lib/constants'; import { trackEvent } from '$lib/actions/analytics'; + import { Table, TableCell, TableCellText, TableRow, TableRowButton } from '$lib/elements/table'; let currentInvoice: Invoice; const today = new Date(); @@ -34,19 +35,39 @@ {#if $organization} - Overview + Payment estimates

- A summary of the current plan. For more information on Appwrite plans, - view our pricing page. - + A breakdown of your estimated upcoming payment for the current billing period. Totals + displayed exclude accumulated credits.

+

+ Billing period: {toLocaleDate($organization?.billingCurrentInvoiceDate)} - {toLocaleDate( + $organization?.billingNextInvoiceDate + )} +

+ + + {tierToPlan($organization?.billingPlan)?.name} plan + + {isTrial + ? formatCurrency(0) + : formatCurrency(currentPlan?.price)} + + + Add-ons number + + {formatCurrency(currentInvoice?.amount ?? 0)} + + + + Current total (USD) + + {formatCurrency(currentInvoice?.amount ?? 0)} + + +
@@ -122,14 +143,6 @@
{/if} -
-

Billing period:

-

- {toLocaleDate($organization?.billingCurrentInvoiceDate)} - {toLocaleDate( - $organization?.billingNextInvoiceDate - )} -

-
{#if $organization?.billingPlan === BillingPlan.STARTER}