Connect Almanac UI to revision-bound career history (by Codex)

This commit is contained in:
Codex committed 2026-10-28 19:08:42 +01:00
1 parent 4b6c18f654
commit 959154c3c0
18 files changed
+405 -44

No files matched your search

+4 -2
View File
@@ -25,8 +25,8 @@ App::report_picker_items(const std::string &kind) const {
return items;
}
if (kind == "year") {
if (!source_) return items;
const auto index = source_->read_almanac({{"kind", "index"}});
if (!source_ && !engine_mode_) return items;
const auto index = engine_mode_ ? engine_almanac_read({{"kind","index"}}) : source_->read_almanac({{"kind", "index"}});
if (!index.value("ok", false)) return items;
for (const auto &year : index.at("years"))
items.emplace_back(std::to_string(year.get<int>()), std::to_string(year.get<int>()));
@@ -218,6 +218,8 @@ bool App::report_picker_action(const std::string &action, Rml::Element *target)
engine_friendly_filter(kind, value);
} else if (menu_ == "statistics") {
statistics_picker_select(kind, value);
} else if (kind == "year" && menu_ == "almanac" && engine_mode_) {
engine_almanac_load({{"kind","calendar"},{"year",std::stoi(value)}});
} else if (kind == "year" && menu_ == "almanac") {
almanac_year_ = std::stoi(value);
almanac_day_.clear();