Connect native indoor standings to real season points and extend CI coverage (by Codex)
This commit is contained in:
1 parent
d30e83c0a5
commit
0842cb3458
19 files changed
+296
-20
No files matched your search
@@ -1,9 +1,13 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
std::string App::render_indoor() {
|
||||
const auto snapshot = snap();
|
||||
const auto &state = snapshot.state.at("reports");
|
||||
const auto state = engine_mode_ ? engine_reports_state_ : snap().state.at("reports");
|
||||
const auto &sort = state.at("sorts").at("indoor");
|
||||
const auto rows = report_indoor_rows(*world_, state);
|
||||
Json rows;
|
||||
if (engine_mode_) {
|
||||
std::vector<Json> values;
|
||||
for (const auto &row : engine_indoor_value_.at("rows")) values.push_back(row);
|
||||
rows = sort_report_rows(std::move(values), sort);
|
||||
} else rows = report_indoor_rows(*world_, state);
|
||||
std::string body = "<div id=\"report-underlay\" class=\"report-underlay\">"
|
||||
"<div id=\"report-list\" class=\"report-list indoor-list\">"
|
||||
"<div class=\"report-table\" role=\"table\">"
|
||||
@@ -39,8 +43,10 @@ std::string App::render_indoor() {
|
||||
"<span class=\"report-value\">" + std::to_string(row.at("points").get<int>()) +
|
||||
"</span></div></div>";
|
||||
}
|
||||
if (rows.empty()) body += "<p class=\"indoor-empty\">Noch kein Hallenturnier gewertet.</p>";
|
||||
const auto footer = engine_mode_ ? engine_indoor_value_.at("footer").get<std::string>() : "Nach dem 5. Turnier";
|
||||
body += "</div></div><nav class=\"report-footer\">" +
|
||||
btn("indoor-info", "<span>Nach dem 5. Turnier</span>", "report-reset indoor-info",
|
||||
btn("indoor-info", "<span>" + esc(footer.empty() ? "Turnierinformationen" : footer) + "</span>", "report-reset indoor-info",
|
||||
"id=\"indoor-info\"") + "</nav></div>";
|
||||
return body + render_report_detail();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user