From cda578d0ac8bdacb4fafaddc30ad44d506b96c07 Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Fri, 1 May 2026 21:27:42 +0000 Subject: [PATCH] feat(BatchResultEntry): make form intent configurable Canonical tournament admin page will submit with a different intent (batch-upsert-results). Existing per-window callers continue to get "batch-add-results" as the default, so no behavior changes. Co-Authored-By: Claude Opus 4.7 --- app/components/BatchResultEntry.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/components/BatchResultEntry.tsx b/app/components/BatchResultEntry.tsx index 9152639..6f2ccd3 100644 --- a/app/components/BatchResultEntry.tsx +++ b/app/components/BatchResultEntry.tsx @@ -46,12 +46,18 @@ interface BatchResultEntryProps { participants: Participant[]; sportsSeasonId: string; existingResultParticipantIds: Set; + /** + * Form intent name posted on "Save All". Defaults to "batch-add-results" for + * the existing per-window flow. Canonical tournament pages override this. + */ + intent?: string; } export function BatchResultEntry({ participants, sportsSeasonId, existingResultParticipantIds, + intent = "batch-add-results", }: BatchResultEntryProps) { const [stage, setStage] = useState("idle"); const [pasteText, setPasteText] = useState(""); @@ -172,7 +178,7 @@ export function BatchResultEntry({ placement: r.placement, })); const formData = new FormData(); - formData.set("intent", "batch-add-results"); + formData.set("intent", intent); formData.set("results", JSON.stringify(results)); saveFetcher.submit(formData, { method: "post" }); }