Basic set of stuff working!

This commit is contained in:
James Cole
2023-07-22 16:42:33 +02:00
parent 2c2dddc071
commit 190508fa54
17 changed files with 381 additions and 282 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@

View File

@@ -0,0 +1 @@
var p=Object.defineProperty;var u=(n,t,e)=>t in n?p(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var l=(n,t,e)=>(u(n,typeof t!="symbol"?t+"":t,e),e);import{a as m,m as i,n as s}from"./index-bc37dda8.js";class y{get(t,e,a){return m.get("/api/v1/summary/basic",{params:{start:t,end:e,code:a}})}}class w{constructor(){l(this,"balanceBox",{foo:"bar"});console.log("IndexApp constructor")}init(){console.log("IndexApp init"),this.loadBoxes()}loadBoxes(){console.log("IndexApp loadBoxes");let t=new y,e=window.BasicStore.get("start"),a=window.BasicStore.get("end");e!==null&&a!==null&&(e=new Date(e),a=new Date(a)),t.get(s(e,"yyyy-MM-dd"),s(a,"yyyy-MM-dd"),null).then(o=>{console.log("IndexApp done!"),console.log(o.data),document.querySelector("#balanceAmount").innerText="ok dan";for(const d in o.data)if(o.data.hasOwnProperty(d)){const c=o.data[d];d.startsWith("balance-in-")&&console.log("Balance in: ",c)}})}}let r=new w;document.addEventListener("AppReady",n=>{r.init()},!1);window.BasicStore.isReady()&&r.init();document.addEventListener("alpine:init",()=>{i.data("balanceBox",()=>({foo:"barX"}))});window.Alpine=i;i.start();

File diff suppressed because one or more lines are too long