fix(race): finish the lap you are on, one clock owner, edits survive refresh, participants editable (1.59.0)
This commit is contained in:
1 parent
afb8829b16
commit
db6a9f19e4
16 files changed
+313
-39
No files matched your search
+13
-10
@@ -47,6 +47,8 @@ export function renderEventManagerMarkup(context) {
|
||||
renderManageStatusBadgeView,
|
||||
selectedParticipantCount,
|
||||
raceDrivers,
|
||||
participantChoices = raceDrivers,
|
||||
otherClassChoices = [],
|
||||
teamDriverPool,
|
||||
showTeamsSection,
|
||||
parseQualifyingHeatName,
|
||||
@@ -358,21 +360,22 @@ export function renderEventManagerMarkup(context) {
|
||||
<button id="selectAllParticipants" class="btn" type="button">${t("events.select_all_participants")}</button>
|
||||
<button id="clearParticipants" class="btn btn-danger" type="button">${t("events.clear_participants")}</button>
|
||||
</div>
|
||||
<div class="check-grid mt-16">
|
||||
${raceDrivers
|
||||
.map((driver) => {
|
||||
const checked = event.raceConfig.participantsConfigured
|
||||
? (event.raceConfig.driverIds || []).includes(driver.id)
|
||||
: true;
|
||||
return `
|
||||
${(() => {
|
||||
const card = (driver) => {
|
||||
const checked = event.raceConfig.participantsConfigured
|
||||
? (event.raceConfig.driverIds || []).includes(driver.id)
|
||||
: driver.classId === event.classId;
|
||||
return `
|
||||
<label class="check-card">
|
||||
<input type="checkbox" class="race-participant" value="${driver.id}" ${checked ? "checked" : ""} />
|
||||
<span>${escapeHtml(driver.name)}${driver.transponder ? ` (${escapeHtml(driver.transponder)})` : ""}</span>
|
||||
</label>
|
||||
`;
|
||||
})
|
||||
.join("")}
|
||||
</div>
|
||||
};
|
||||
return `<div class="check-grid mt-16">${participantChoices.map(card).join("")}</div>
|
||||
${otherClassChoices.length ? `<details class="mt-16" id="otherClassParticipants"><summary>${t("events.other_class_participants", { count: otherClassChoices.length })}</summary><div class="check-grid mt-16">${otherClassChoices.map(card).join("")}</div></details>` : ""}
|
||||
<p class="muted mt-16">${t("events.participants_sync_hint")}</p>`;
|
||||
})()}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in new issue
Block a user