First-run setup: upload Bills_Tracker.xlsx and loader_rules.json from the web page when the data folder is empty
build-container / build (push) Successful in 34s
build-container / build (push) Successful in 34s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3dba054dca
commit
6f4ecd42f7
3 files changed
+16
-3
No files matched your search
@@ -155,6 +155,7 @@ function renderTx(all){
|
||||
}
|
||||
async function init(){
|
||||
const j=await (await fetch("/api/data")).json();if(j.error){document.body.innerHTML="<main>"+esc(j.error)+"</main>";return}
|
||||
if(j.setup){document.body.innerHTML=`<main><h1>Bills Dashboard</h1><p>Bills_Tracker.xlsx isn’t in the data folder (<code>${esc(j.data_dir)}</code>) yet. <a href="/">Upload it on the Statement Loader page.</a></p></main>`;return}
|
||||
D=j;$("#updated").textContent="Workbook saved "+j.updated;
|
||||
const yrs=[...new Set(j.tx.map(t=>+t[0].slice(0,4)))].sort().reverse();
|
||||
$("#year").innerHTML=yrs.map(y=>`<option>${y}</option>`).join("");
|
||||
|
||||
Reference in new issue
Block a user