Skip to content

Commit 33c435b

Browse files
committed
fix(billing): treat missing seats addon as supported
1 parent 35c23ea commit 33c435b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
</Button>
152152
</div>
153153
<div slot="tooltip">
154-
{!organization?.billingPlanDetails.addons.seats.supported
154+
{!(organization?.billingPlanDetails?.addons?.seats?.supported ?? true)
155155
? 'Upgrade to add more members'
156156
: `You've reached the members limit for the ${
157157
organization?.billingPlanDetails.name

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

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

1818
<CardGrid>
1919
<svelte:fragment slot="title">Members</svelte:fragment>
2020
The number of members in your organization.
2121
<svelte:fragment slot="aside">
22-
{#if !organizationMembersSupported}
22+
{#if organizationMembersSupported}
2323
<div class="u-flex u-flex-vertical">
2424
<Layout.Stack direction="row" justifyContent="space-between">
2525
<Layout.Stack gap="s" direction="row" alignItems="center">

0 commit comments

Comments
 (0)