Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

re-enable counting invitations when showing warning

ali-inkco45476a9e8e8f
diff --git a/packages/app/src/react/features/teams/components/teams/invite-member-warning.tsx b/packages/app/src/react/features/teams/components/teams/invite-member-warning.tsx
index 19f51984..37061e96 100644
--- a/packages/app/src/react/features/teams/components/teams/invite-member-warning.tsx
+++ b/packages/app/src/react/features/teams/components/teams/invite-member-warning.tsx
@@ -1,6 +1,5 @@
/* eslint-disable max-len */
import { useAuthCtx } from '@react/shared/contexts/auth.context';
-import { _USE_PENDING_INVITES_AS_SEATS } from '@src/react/shared/constants';
import { cn } from '@src/react/shared/utils/general';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import { useEffect, useState } from 'react';
@@ -62,9 +61,7 @@ export const InviteMemberWarning = ({
[];
// Calculate total occupied seats (current members + pending invites)
- const totalOccupiedSeats =
- filteredTeamMembers.length +
- (_USE_PENDING_INVITES_AS_SEATS ? filteredPendingInvites.length : 0);
+ const totalOccupiedSeats = filteredTeamMembers.length + filteredPendingInvites.length;
const priceItem =
userInfo?.subs?.object?.['items']?.data?.filter?.(
diff --git a/packages/app/src/react/features/teams/hooks/useInvitationActions.ts b/packages/app/src/react/features/teams/hooks/useInvitationActions.ts
index 3814161c..edcfa769 100644
--- a/packages/app/src/react/features/teams/hooks/useInvitationActions.ts
+++ b/packages/app/src/react/features/teams/hooks/useInvitationActions.ts
@@ -5,7 +5,6 @@ import { useState } from 'react';
import { teamAPI } from '@react/features/teams/clients';
import { useAuthCtx } from '@react/shared/contexts/auth.context';
import { errorToast, successToast } from '@shared/components/toast';
-import { _USE_PENDING_INVITES_AS_SEATS } from '@src/react/shared/constants';
import { PendingInvite, useTeamInvitations } from './useTeamInvitations';
import { useTeamMembers } from './useTeamMembers';
@@ -44,9 +43,7 @@ export const useInvitationActions = (teamRoles: any[] = [], isReadOnlyAccess: bo
getPendingInvites?.filter(
(pendingInvite) => !pendingInvite.email.toLowerCase().includes('@smythos.com'),
) || [];
- const totalOccupiedSeats =
- filteredTeamMembers.length +
- (_USE_PENDING_INVITES_AS_SEATS ? filteredPendingInvites.length : 0);
+ const totalOccupiedSeats = filteredTeamMembers.length + filteredPendingInvites.length;
const remainingSeats = teamSeats - totalOccupiedSeats;
const priceItem =
diff --git a/packages/app/src/react/shared/constants/index.ts b/packages/app/src/react/shared/constants/index.ts
index 41fbef70..25629789 100644
--- a/packages/app/src/react/shared/constants/index.ts
+++ b/packages/app/src/react/shared/constants/index.ts
@@ -4,5 +4,3 @@ export const errKeys = {
QUOTA_EXCEEDED: 'QUOTA_EXCEEDED',
AGENT_LOCK_FAIL: 'AGENT_LOCK_FAIL',
};
-
-export const _USE_PENDING_INVITES_AS_SEATS = false;
\ No newline at end of file