MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / countSeatsUsed

Function countSeatsUsed

apps/cloud/src/extensions/billing/plans.ts:122–129  ·  view source on GitHub ↗
(
  memberships: ReadonlyArray<SeatMembership>,
  pendingInvitationCount: number,
)

Source from the content-addressed store, hash-verified

120 * both lists, so take the larger of the two rather than adding them.
121 */
122export const countSeatsUsed = (
123 memberships: ReadonlyArray<SeatMembership>,
124 pendingInvitationCount: number,
125): number => {
126 const active = memberships.filter((m) => m.status === "active").length;
127 const pendingMembers = memberships.filter((m) => m.status === "pending").length;
128 return active + Math.max(pendingMembers, pendingInvitationCount);
129};

Callers 2

plans.test.tsFile · 0.90
getMemberSeatsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected