feat(results): lap chart per qualifying heat and final in the race overview, print and PDF (1.89.32)
This commit is contained in:
1 parent
01998952a7
commit
6a036899ab
15 files changed
+245
-14
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { rowFlag } from "./country_flags.js";
|
||||
import { medal, qualCell } from "./medal.js";
|
||||
import { renderLapChartSvg } from "./lap_chart_logic.js";
|
||||
// Race Day → Race overview panel: podium, then practice / qualifying / finals with standings
|
||||
// and every heat. Logic in race_overview_logic.js; print, PDF and CSV come in as deps.
|
||||
const openPhases = new Set();
|
||||
@@ -29,9 +30,10 @@ export function renderRaceOverviewPanel(overview, { t, escapeHtml, formatLap, re
|
||||
${phase.heats.length ? `
|
||||
<h4>${t("race_overview.standings")}</h4>
|
||||
${renderRaceStandingsTableView(phase.standings, t("race_overview.no_results"))}
|
||||
${phase.heats.map(({ session, rows }) => `
|
||||
${phase.heats.map(({ session, rows, lapChart }) => `
|
||||
<h4>${escapeHtml(session.name)} <small>${escapeHtml(getStatusLabel(session.status))}</small>${session.status === "finished" && rows.length ? ` <span class="race-overview-heat-actions"><button class="btn btn-mini" type="button" data-heat-print="${escapeHtml(session.id)}" title="${escapeHtml(t("race_overview.print_heat"))}">🖨</button><button class="btn btn-mini" type="button" data-heat-pdf="${escapeHtml(session.id)}" title="${escapeHtml(t("race_overview.pdf_heat"))}">PDF</button></span>` : ""}</h4>
|
||||
${rows.length ? heatTable(rows) : `<p class="hint">${t("race_overview.no_results")}</p>`}`).join("")}`
|
||||
${rows.length ? heatTable(rows) : `<p class="hint">${t("race_overview.no_results")}</p>`}
|
||||
${lapChart ? `<details class="lap-chart-box"><summary>📈 ${escapeHtml(t("lap_chart.title"))}</summary>${renderLapChartSvg(lapChart, { escapeHtml, title: `${t("lap_chart.title")} - ${session.name}`, lapLabel: t("table.lap") })}<p class="hint">${escapeHtml(t("lap_chart.hint"))}</p></details>` : ""}`).join("")}`
|
||||
: `<p class="hint">${t("race_overview.not_run")}</p>`}
|
||||
</details>`).join("")}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user