added clear cache for testing

This commit is contained in:
2025-12-16 09:34:29 -06:00
parent c785bf2dc5
commit a0c62af25c
+10 -1
View File
@@ -126,6 +126,14 @@
let jobsCache = [], visibleJobs = [], currentJob = null; let jobsCache = [], visibleJobs = [], currentJob = null;
function clearJobsCache(message='Cache cleared. Reloading…'){
jobsCache = [];
visibleJobs = [];
currentJob = null;
resultsEl.innerHTML = `<div class="p-2 text-slate-600 bg-white rounded-lg border border-blue-100">${message}</div>`;
}
window.clearJobsCache = clearJobsCache;
const progressBar = document.getElementById('progressBar'); const progressBar = document.getElementById('progressBar');
const searchBox = document.getElementById('searchBox'); const searchBox = document.getElementById('searchBox');
const resultsEl = document.getElementById('results'); const resultsEl = document.getElementById('results');
@@ -169,7 +177,8 @@
// --- Fetch all jobs --- // --- Fetch all jobs ---
async function fetchAllJobs(){ async function fetchAllJobs(){
startProgress(); jobsCache=[]; visibleJobs=[]; resultsEl.innerHTML = '<div class="p-2 text-slate-600 bg-white rounded-lg border border-blue-100">Loading…</div>'; startProgress();
clearJobsCache('Loading…');
let page=1, totalItems=0; let firstBatchRendered=false; let page=1, totalItems=0; let firstBatchRendered=false;
try{ try{
while(true){ while(true){