diff --git a/src/routes/(console)/organization-[organization]/settings/+page.svelte b/src/routes/(console)/organization-[organization]/settings/+page.svelte index ee06bc6e8..c70eb1a8e 100644 --- a/src/routes/(console)/organization-[organization]/settings/+page.svelte +++ b/src/routes/(console)/organization-[organization]/settings/+page.svelte @@ -5,6 +5,7 @@ import { addNotification } from '$lib/stores/notifications'; import { sdk } from '$lib/stores/sdk'; import { members, organization } from '$lib/stores/organization'; + import { projects } from '../store'; import { invalidate } from '$app/navigation'; import { Dependencies } from '$lib/constants'; import { onMount } from 'svelte'; @@ -42,6 +43,8 @@ } $: avatars = $members.memberships.map((team) => team.userName); + $: orgProjects = `${$projects.total} ${$projects.total === 1 ? 'project' : 'projects'}`; + $: orgMembers = `${$organization.total} ${$organization.total === 1 ? 'member' : 'members'}`; @@ -89,7 +92,7 @@
{$organization.name}
-

{$organization.total} members

+

{orgMembers}, {orgProjects}

diff --git a/src/routes/(console)/organization-[organization]/settings/deleteOrganizationModal.svelte b/src/routes/(console)/organization-[organization]/settings/deleteOrganizationModal.svelte index 2143ced28..3ca94e195 100644 --- a/src/routes/(console)/organization-[organization]/settings/deleteOrganizationModal.svelte +++ b/src/routes/(console)/organization-[organization]/settings/deleteOrganizationModal.svelte @@ -1,9 +1,9 @@ - - {#if upcomingInvoice} -

- The organization {$organization.name} will be flagged for deletion. -

+
+ + {#if upcomingInvoice} + + + You have a pending {formatCurrency(upcomingInvoice.grossAmount)} invoice for your + {tierToPlan(upcomingInvoice.plan).name} plan + +

+ By proceeding, your invoice will be processed within the hour. Upon successful + payment, your organization will be deleted. +

+
+ {/if}

- All existing projects will be paused and the organization will be deleted once your - upcoming invoice is processed on {toLocaleDate($organization.billingNextInvoiceDate)}. -

- {:else} -

- Are you sure you want to delete {$organization.name}? All projects ({$projects.total}) - and data associated with this organization will be deleted. This action is irreversible. + {#if $projects.total > 0} + The following projects and all data associated with {$organization.name} will + be permanently deleted. This action is irreversible. + {:else} + All data associated with {$organization.name} will be permanently deleted. + This action is irreversible. + {/if}

- {/if} - - - - -
+ + {#if $projects.total > 0} +
+ + {#each tabs as { name, label, total }} + (selectedTab = name)}> + {label.desktop} ({total}) + + {/each} + + + + + {#each tabData.headers as header} + {header} + {/each} + + + {#each tabData.rows as row} + + {#each row.cells as cell} + {cell} + {/each} + + {/each} + + +
+
+ + {#each tabs as { name, label, total }} + (selectedTab = name)}> + {label.mobile} ({total}) + + {/each} + + + + + {#each tabData.headers as header, index} + {header} + {/each} + + + {#each tabData.rows as row} + + {#each row.cells as cell, index} + {cell} + {/each} + + {/each} + + +
+ {/if} + + + + + + + + + + +
+ +