fix: close competition cutover integrity gaps
This commit is contained in:
1 parent
7ea2002975
commit
683d602d63
57 files changed
+4805
-1582
No files matched your search
@@ -1,15 +1,17 @@
|
||||
import type {
|
||||
MatchDetailResponse,
|
||||
MatchLifecycleStatus,
|
||||
MatchParticipantView,
|
||||
} from "@lolympus/contracts";
|
||||
import type {
|
||||
ApiAuction,
|
||||
ApiAuctionPlayerSnapshot,
|
||||
ApiAuctionTeam,
|
||||
ApiMatch,
|
||||
ApiMatchParticipant,
|
||||
ApiPositionPreference,
|
||||
ApiRiotLaneStats,
|
||||
ApiRiotRecentStatsSummary,
|
||||
ApiTierHistoryEntry,
|
||||
ApiTierInfo,
|
||||
MatchStatus,
|
||||
Position,
|
||||
RiotLane,
|
||||
} from "./types";
|
||||
@@ -46,7 +48,7 @@ export interface MatchDetailView {
|
||||
title: string;
|
||||
date: string;
|
||||
time: string;
|
||||
status: MatchStatus;
|
||||
status: MatchLifecycleStatus;
|
||||
description: string;
|
||||
map: string;
|
||||
maxParticipants: number;
|
||||
@@ -180,7 +182,7 @@ function resolveMainAndSubPosition(
|
||||
}
|
||||
|
||||
function mapMatchParticipantToView(
|
||||
participant: ApiMatchParticipant,
|
||||
participant: MatchParticipantView,
|
||||
): ParticipantView {
|
||||
const { mainPosition, subPosition } = resolveMainAndSubPosition(
|
||||
participant.preferredPositions,
|
||||
@@ -383,7 +385,9 @@ export function buildDefaultPreferredPositions() {
|
||||
}));
|
||||
}
|
||||
|
||||
export function mapApiMatchToMatchDetail(match: ApiMatch): MatchDetailView {
|
||||
export function mapApiMatchToMatchDetail(
|
||||
match: MatchDetailResponse,
|
||||
): MatchDetailView {
|
||||
const formattedDate = formatKoreanDate(match.scheduledAt);
|
||||
const participants = match.participants.map(mapMatchParticipantToView);
|
||||
const participantLookup = new Map(
|
||||
@@ -439,7 +443,7 @@ export function mapApiMatchToMatchDetail(match: ApiMatch): MatchDetailView {
|
||||
|
||||
export function mapApiAuctionToAuctionState(
|
||||
auction: ApiAuction,
|
||||
match: ApiMatch,
|
||||
match: MatchDetailResponse,
|
||||
now = new Date(),
|
||||
): AuctionStateView {
|
||||
const participantLookup = new Map(
|
||||
|
||||
Reference in new issue
Block a user