mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
2 lines
1.2 KiB
JavaScript
2 lines
1.2 KiB
JavaScript
import{d as l,f as d}from"./format-money-00d5f4b9.js";import{f as c,i as o}from"./vendor-f5e18451.js";/* empty css */import{G as f}from"./get-5b2cde80.js";const i=window.location.href.split("/"),u=i[i.length-1];let h=function(){return{notifications:{error:{show:!1,text:"",url:""},success:{show:!1,text:"",url:""},wait:{show:!1,text:""}},totalPages:1,page:1,tableColumns:{name:{enabled:!0}},accounts:[],formatMoney(t,a){return d(t,a)},format(t){return c(t,o.t("config.date_time_fns"))},init(){this.notifications.wait.show=!0,this.notifications.wait.text=o.t("firefly.wait_loading_data"),this.loadAccounts()},loadAccounts(){new f().index({type:u,page:this.page}).then(t=>{for(let a=0;a<t.data.data.length;a++)if(t.data.data.hasOwnProperty(a)){let e=t.data.data[a],r={id:parseInt(e.id),name:e.attributes.name};this.accounts.push(r)}this.notifications.wait.show=!1})}}},n={index:h,dates:l};function s(){Object.keys(n).forEach(t=>{console.log(`Loading page component "${t}"`);let a=n[t]();Alpine.data(t,()=>a)}),Alpine.start()}document.addEventListener("firefly-iii-bootstrapped",()=>{console.log("Loaded through event listener."),s()});window.bootstrapped&&(console.log("Loaded through window variable."),s());
|