Skip to content

Calendar · Repositories

3 modules · 31 exports · 1 repository · 11 e2e tests · 6 routes

Every table a function queries, its own helpers included, read or written. Calls to other repositories are listed apart, their tables are on their own page.

CalendarRepository

app/features/calendar/CalendarRepository.server.ts
Tables
BadgeCalendarEventCalendarEventBadgeCalendarEventDateCalendarEventResultPlayerCalendarEventResultTeamMapPoolMapTournamentTournamentOrganizationTournamentOrganizationMemberTournamentResultTournamentStaffTournamentStageTournamentTeamTournamentTeamCheckInTournamentTeamMemberTrophyUnvalidatedUserSubmittedImageUserUserSubmittedImage
Calls
TournamentOrganizationRepository
Imports
CalendarEventTeamPickProgressionSeries
Used by
6 loaders4 actions1 script4 other

Functions & values

function

findById

no JSDoc:312
export async function findById(
	id: number,
	{
		includeMapPool = false,
		includeBadgePrizes = false,
		includeTrophy = false,
	}: {
		includeMapPool?: boolean;
		includeBadgePrizes?: boolean;
		includeTrophy?: boolean;
	} = {},
)
function

findAvatarImgIds

:383

Logo image ids of the given event and of the given tournament's event: what the new event form may keep when editing or copying.

export async function findAvatarImgIds({
	eventId,
	tournamentId,
}: {
	eventId?: number;
	tournamentId?: number;
})
Unit tests (2)
function

findResultsByEventId

no JSDoc:500
export async function findResultsByEventId(eventId: number)
function

findTopThreeResultsByEventIds

:528

Podium players of the events, one row each; players reported as plain text have a null id.

export async function findTopThreeResultsByEventIds(eventIds: number[])
function

upsertReportedScores

no JSDoc:947
export function upsertReportedScores(args: {
	eventId: number;
	participantCount: number;
	results: Array<{
		teamName: string;
		placement: number;
		players: Array<{
			userId: number | null;
			name: string | null;
		}>;
	}>;
})
function

deleteById

:1026

Deletes the event, and its tournament if it has one.

export function deleteById(eventId: number)
Unit tests (2)