Skip to content

Commit a41047e

Browse files
authored
Merge pull request #2881 from appwrite/fix-missing-seats
fix(billing): treat missing seats addon as supported
2 parents 35c23ea + 8ef237b commit a41047e

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/routes/(console)/apply-credit/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
{/if}
317317

318318
<!-- show invite members -->
319-
{#if selectedOrgId && !selectedOrg?.billingPlanDetails.addons.seats.supported}
319+
{#if selectedOrgId && !(selectedOrg?.billingPlanDetails?.addons?.seats?.supported ?? true)}
320320
{#if selectedOrgId === newOrgId}
321321
<InputText
322322
label="Organization name"

src/routes/(console)/organization-[organization]/header.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@
151151
</Button>
152152
</div>
153153
<div slot="tooltip">
154-
{!organization?.billingPlanDetails.addons.seats.supported
154+
{!(
155+
organization?.billingPlanDetails?.addons?.seats?.supported ??
156+
true
157+
)
155158
? 'Upgrade to add more members'
156159
: `You've reached the members limit for the ${
157160
organization?.billingPlanDetails.name

src/routes/(console)/organization-[organization]/usage/[[invoice]]/totalMembers.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
1313
$: total = members?.total ?? 0;
1414
$: organizationMembersSupported =
15-
!$organization?.billingPlanDetails.addons.seats.supported; /* false on free */
15+
$organization?.billingPlanDetails?.addons?.seats?.supported ??
16+
true; /* true on paid plans */
1617
</script>
1718

1819
<CardGrid>
1920
<svelte:fragment slot="title">Members</svelte:fragment>
2021
The number of members in your organization.
2122
<svelte:fragment slot="aside">
22-
{#if !organizationMembersSupported}
23+
{#if organizationMembersSupported}
2324
<div class="u-flex u-flex-vertical">
2425
<Layout.Stack direction="row" justifyContent="space-between">
2526
<Layout.Stack gap="s" direction="row" alignItems="center">

0 commit comments

Comments
 (0)