Skip to content

Tournament LFG · Modules

1 module · 2 exports · 1 repository · 18 e2e tests · 1 route

Who imports who · hover a node
Depends onTournament LFG modulesUsed byTournamentLFG2 exportsActions1 fileRoutes1 file

TournamentLFG

app/features/tournament-lfg/core/TournamentLFG.ts

Rules of a group in a tournament's LFG queue: who puts a registered team in it, which of two groups survives their merge.

Imports
no other modules
Used by
1 action1 route

Functions & values

function

canPutTeamInQueue

:13

Can a member of this role put their registered team in the queue? Owners and managers can. A role check as the tournament's teams carry no permissions object; once in the queue, a group's permissions take over.

export function canPutTeamInQueue(role: TeamMemberRole | null | undefined)
Unit tests (1)
function

survivingTeamId

:22

The group that is kept when the accepting group (ourGroup) merges with the group that invited it, the other one's members moving over. A registered team survives over a placeholder (a player looking on their own), otherwise the accepting group does.

export function survivingTeamId({
	ourGroup,
	theirGroup,
}: {
	ourGroup: { id: number; isPlaceholder: boolean };
	theirGroup: { id: number; isPlaceholder: boolean };
})
Unit tests (1)