feat(sponsor): quick setup with guest drivers, shared rental cars, rotating heats and A/B finals (1.63.0)
This commit is contained in:
1 parent
6142b14e47
commit
d0a5df6992
19 files changed
+511
-54
No files matched your search
@@ -283,6 +283,8 @@ export function renderEventWorkspaceView(context) {
|
||||
date: String(form.get("date")),
|
||||
classId: String(form.get("classId")),
|
||||
mode,
|
||||
// Events tab = sponsor events (guests in the club's shared cars, sponsor_event_logic.js).
|
||||
...(mode === "track" ? { sponsor: { type: "race", carIds: [], format: null } } : {}),
|
||||
};
|
||||
state.events.push(normalizeEvent(event));
|
||||
saveState();
|
||||
@@ -303,6 +305,7 @@ export function renderEventWorkspaceView(context) {
|
||||
if (!window.confirm(t("events.delete_race_confirm", { name: e.name, sessions: sessionIds.length, run }))) return;
|
||||
state.events = state.events.filter((x) => x.id !== e.id);
|
||||
state.sessions = state.sessions.filter((x) => x.eventId !== e.id);
|
||||
state.drivers = state.drivers.filter((x) => x.guestEventId !== e.id);
|
||||
sessionIds.forEach((id) => delete state.resultsBySession[id]);
|
||||
if (state.activeSessionId && sessionIds.includes(state.activeSessionId)) {
|
||||
state.activeSessionId = null;
|
||||
|
||||
Reference in new issue
Block a user