feat(series): run each round from the series page
Step 3 becomes a rounds table: pick drivers inline (copy from the previous round, add a late entry), set qualifying rounds/finals/max cars per heat per round, see the status, and create qualifying and finals from there. Qualifying heats are now split evenly so nobody drives alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -171,10 +171,15 @@ const shots = {
|
||||
await evaluate(`(async () => {
|
||||
const { state } = await (await fetch("/api/state")).json();
|
||||
state.classes.push({ id: "shot_rookie", name: "Rookie" }, { id: "shot_4wd", name: "4WD Buggy" }, { id: "shot_nitro", name: "1/8 Nitro" });
|
||||
state.series = [{ id: "shot_series", name: "Winter Championship 2026/2027", classIds: ["shot_class", "shot_rookie"], eventIds: ["shot_event"], scoring: "club", club: "JMK RB", countMode: "best", countValue: 9 }];
|
||||
state.drivers.push({ id: "shot_rookie_1", name: "Elsa Rookie", classId: "shot_rookie" }, { id: "shot_rookie_2", name: "Theo Rookie", classId: "shot_rookie" });
|
||||
const round = (id, date, classId, name) => ({ id, name, date, classId, mode: "race", raceConfig: { qualifyingRounds: 2, finalLegs: 1, carsPerHeat: 6, countedFinalLegs: 1 } });
|
||||
state.events.push(round("shot_r1_2wd", "2026-11-01", "shot_class", "Winter #1 2WD Buggy"), round("shot_r1_rookie", "2026-11-01", "shot_rookie", "Winter #1 Rookie"), round("shot_r2_2wd", "2026-11-15", "shot_class", "Winter #2 2WD Buggy"));
|
||||
state.series = [{ id: "shot_series", name: "Winter Championship 2026/2027", classIds: ["shot_class", "shot_rookie"], eventIds: ["shot_r1_2wd", "shot_r1_rookie", "shot_r2_2wd"], scoring: "club", club: "JMK RB", countMode: "best", countValue: 9 }];
|
||||
await fetch("/api/state", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(state) });
|
||||
})()`);
|
||||
await navigate("series", "#seriesForm");
|
||||
// For checking other parts while developing: SHOT_EVAL runs in the page first.
|
||||
if (process.env.SHOT_EVAL) { await evaluate(process.env.SHOT_EVAL); await new Promise((resolve) => setTimeout(resolve, 300)); }
|
||||
await scrollTo(process.env.SHOT_SCROLL || "#seriesForm", process.env.SHOT_SCROLL ? "center" : "start");
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user