CalendarRepository
app/features/calendar/CalendarRepository.server.ts- Tables
- BadgeCalendarEventCalendarEventBadgeCalendarEventDateCalendarEventResultPlayerCalendarEventResultTeamMapPoolMapTournamentTournamentOrganizationTournamentOrganizationMemberTournamentResultTournamentStaffTournamentStageTournamentTeamTournamentTeamCheckInTournamentTeamMemberTrophyUnvalidatedUserSubmittedImageUserUserSubmittedImage
- Calls
- TournamentOrganizationRepository
- Imports
- CalendarEventTeamPickProgressionSeries
- Used by
- 6 loaders4 actions1 script4 other
Functions & values
export async function findAllBetweenTwoTimestamps( args: FindAllBetweenTwoTimestampsArgs, )
Loaders/calendar/calendar.ics
export async function findById( id: number, { includeMapPool = false, includeBadgePrizes = false, includeTrophy = false, }: { includeMapPool?: boolean; includeBadgePrizes?: boolean; includeTrophy?: boolean; } = {}, )
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; })
TablesCalendarEvent
Unit tests (2)
Actions/calendar/new
Past year's tournaments the user organized (author, organization ADMIN/ORGANIZER or staff ORGANIZER), newest first. Latest event per series only, the next newest filling spare spots.
export async function findRecentTournamentsByOrganizerUserId(userId: number)
Unit tests (6)
Loaders/calendar/new
export async function findResultsByEventId(eventId: number)
Podium players of the events, one row each; players reported as plain text have a null id.
export async function findTopThreeResultsByEventIds(eventIds: number[])
export async function insert(args: CreateArgs)
export function upsertReportedScores(args: { eventId: number; participantCount: number; results: Array<{ teamName: string; placement: number; players: Array<{ userId: number | null; name: string | null; }>; }>; })
Deletes the event, and its tournament if it has one.
export function deleteById(eventId: number)
TablesCalendarEvent
Unit tests (2)
Actions/calendar/:id