refactor admin navigation; update links to ingest pages and improve loading of data in parallel

This commit is contained in:
ImBenji
2026-04-24 00:08:52 +01:00
parent 16cd61fdf5
commit fc7ea464b3
17 changed files with 292 additions and 67 deletions
+7 -11
View File
@@ -17,7 +17,7 @@ function syncUrl() {
async function loadPredictions() {
const companyId = document.getElementById("i-company").value;
const companyId = document.getElementById("i-company").value || queryGet("company_id");
const sort = document.getElementById("i-sort").value;
const params = new URLSearchParams({ limit: PAGE, offset: predictionsOffset });
@@ -69,16 +69,12 @@ document.addEventListener("DOMContentLoaded", async () => {
loadPredictions();
};
const ok = await loadIntelStatsRow();
if (!ok) return;
await loadIntelCompanies();
queryApplyToInputs({
"i-company": "company_id",
"i-sort": "sort",
});
queryApplyToInputs({ "i-sort": "sort" });
predictionsOffset = parseInt(queryGet("offset"), 10) || 0;
loadPredictions();
await Promise.all([
loadIntelStatsRow(),
loadIntelCompanies(),
loadPredictions(),
]);
});