feat: render BatchResultEntry on qualifying event pages
Add BatchResultEntry component import and render it on event pages when the event is a qualifying event, not a final_standings/playoff_game type, and not yet complete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
42e19f81cf
commit
057f935c88
1 changed files with 13 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ import {
|
|||
import { useState, useEffect } from "react";
|
||||
import { format } from "date-fns";
|
||||
import { localDateTimeToUtcIso } from "~/lib/date-utils";
|
||||
import { BatchResultEntry } from "~/components/BatchResultEntry";
|
||||
|
||||
export function meta({ data }: Route.MetaArgs): Route.MetaDescriptors {
|
||||
return [{ title: `${data?.event?.name ?? "Event"} — ${data?.sportsSeason?.name ?? "Sports Season"} - Brackt Admin` }];
|
||||
|
|
@ -412,6 +413,18 @@ export default function EventResults({
|
|||
</>
|
||||
)}
|
||||
|
||||
{/* Batch Paste Results — primary entry for qualifying events */}
|
||||
{event.isQualifyingEvent && event.eventType !== "final_standings" && event.eventType !== "playoff_game" && !event.isComplete && (
|
||||
<BatchResultEntry
|
||||
participants={participants}
|
||||
eventId={event.id}
|
||||
sportsSeasonId={sportsSeason.id}
|
||||
existingResultParticipantIds={
|
||||
new Set(results.map((r: { participant: { id: string } }) => r.participant.id))
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Regular Result Entry for other event types */}
|
||||
{event.eventType !== "final_standings" && event.eventType !== "playoff_game" && !event.isComplete && (
|
||||
<Card>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue