Expand v2 layout with experimental view.

This commit is contained in:
James Cole
2024-01-07 12:51:42 +01:00
parent 70b60f756b
commit 75a32b2f94
66 changed files with 770 additions and 134 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{f as n}from"./vendor-fca45885.js";function e(){return{id:"",name:"",alpine_name:""}}function o(){return{description:[],amount:[],currency_code:[],foreign_amount:[],foreign_currency_code:[],source_account:[],destination_account:[],budget_id:[],category_name:[],piggy_bank_id:[],bill_id:[],tags:[],notes:[],internal_reference:[],external_url:[],latitude:[],longitude:[],zoom_level:[],date:[],interest_date:[],book_date:[],process_date:[],due_date:[],payment_date:[],invoice_date:[]}}function d(){let t=n(new Date,"yyyy-MM-dd HH:mm");return{description:"",amount:"",currency_code:"EUR",foreign_amount:"",foreign_currency_code:"",source_account:e(),destination_account:e(),budget_id:null,category_name:"",piggy_bank_id:null,bill_id:null,tags:[],notes:"",internal_reference:"",external_url:"",hasLocation:!1,latitude:null,longitude:null,zoomLevel:null,date:t,interest_date:"",book_date:"",process_date:"",due_date:"",payment_date:"",invoice_date:"",errors:o()}}export{d as c,o as d};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{a as s}from"./format-money-e259f5e4.js";class p{list(a){return s.get("/api/v2/transactions",{params:a})}show(a,t){return s.get("/api/v2/transactions/"+a,{params:t})}}export{p as G};

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{a as s}from"./get-51a7c3ed.js";class p{list(a){return s.get("/api/v2/transactions",{params:a})}show(a,t){return s.get("/api/v2/transactions/"+a,{params:t})}}export{p as G};

View File

@@ -0,0 +1 @@
import{a as s}from"./format-money-e259f5e4.js";let t=class{list(a){return s.get("/api/v2/subscriptions",{params:a})}paid(a){return s.get("/api/v2/subscriptions/sum/paid",{params:a})}unpaid(a){return s.get("/api/v2/subscriptions/sum/unpaid",{params:a})}};class e{list(a){return s.get("/api/v2/piggy-banks",{params:a})}}export{t as G,e as a};

View File

@@ -0,0 +1 @@
import{c as r}from"./create-empty-split-fb5bda92.js";import{f as o}from"./vendor-fca45885.js";function c(n){let a=[];for(let i in n)if(n.hasOwnProperty(i)){let e=n[i],t=r();t.bill_id=e.bill_id,t.budget_id=e.budget_id,t.category_name=e.category_name,t.piggy_bank_id=e.piggy_bank_id,t.book_date=e.book_date,t.due_date=e.due_date,t.interest_date=e.interest_date,t.invoice_date=e.invoice_date,t.payment_date=e.payment_date,t.process_date=e.process_date,t.external_url=e.external_url,t.internal_reference=e.internal_reference,t.notes=e.notes,t.tags=e.tags,t.amount=parseFloat(e.amount).toFixed(e.currency_decimal_places),t.currency_code=e.currency_code,e.foreign_amount!==null&&(t.forein_currency_code=e.foreign_currency_code,t.foreign_amount=parseFloat(e.foreign_amount).toFixed(e.foreign_currency_decimal_places)),t.date=o(new Date(e.date),"yyyy-MM-dd HH:mm"),t.description=e.description,t.destination_account={id:e.destination_id,name:e.destination_name,type:e.destination_type,alpine_name:e.destination_name},t.source_account={id:e.source_id,name:e.source_name,type:e.source_type,alpine_name:e.source_name},e.latitude!==null&&(t.hasLocation=!0,t.latitude=e.latitude,t.longitude=e.longitude,t.zoomLevel=e.zoom_level),a.push(t)}return a}export{c as p};

View File

@@ -0,0 +1 @@
import{d as p,f as u}from"./format-money-e259f5e4.js";import{f as h,i as r}from"./vendor-fca45885.js";import{G as c}from"./get-3bb14de5.js";import{p as d}from"./parse-downloaded-splits-7d781ebe.js";import"./create-empty-split-fb5bda92.js";let l=function(){return{notifications:{error:{show:!1,text:"",url:""},success:{show:!1,text:"",url:""},wait:{show:!1,text:""}},groupProperties:{id:0,transactionType:"",transactionTypeTranslated:"",title:"",totalAmount:0,date:new Date},amounts:{},entries:[],pageProperties:{},formatMoney(e,o){return u(e,o)},format(e){return h(e,r.t("config.date_time_fns"))},init(){this.notifications.wait.show=!0,this.notifications.wait.text=r.t("firefly.wait_loading_data");const e=window.location.href.split("/"),o=parseInt(e[e.length-1]);new c().show(o,{}).then(t=>{const i=t.data.data;this.groupProperties.id=parseInt(i.id),this.groupProperties.transactionType=i.attributes.transactions[0].type,this.groupProperties.transactionTypeTranslated=r.t("firefly."+i.attributes.transactions[0].type),this.groupProperties.title=i.attributes.title??i.attributes.transactions[0].description,this.groupProperties.totalAmount=0,this.entries=d(i.attributes.transactions),this.notifications.wait.show=!1}).then(()=>{for(let t in this.entries)if(this.entries.hasOwnProperty(t)){const i=this.entries[t].currency_code,s=this.entries[t].foreign_currency_code;this.amounts[i]===void 0&&(this.amounts[i]=0,this.amounts[i]+=parseFloat(this.entries[t].amount)),s!==null&&s!==""&&this.amounts[s]===void 0&&(this.amounts[s]=0,this.amounts[s]+=parseFloat(this.entries[t].foreign_amount)),this.groupProperties.totalAmount=this.groupProperties.totalAmount+parseFloat(this.entries[t].amount),parseInt(t)===0&&(this.groupProperties.date=this.entries[t].date)}}).catch(t=>{this.notifications.error.show=!0,this.notifications.error.text=t.message})}}},n={show:l,dates:p};function a(){Object.keys(n).forEach(e=>{console.log(`Loading page component "${e}"`);let o=n[e]();Alpine.data(e,()=>o)}),Alpine.start()}document.addEventListener("firefly-iii-bootstrapped",()=>{console.log("Loaded through event listener."),a()});window.bootstrapped&&(console.log("Loaded through window variable."),a());

File diff suppressed because one or more lines are too long

View File

@@ -1,27 +1,50 @@
{
"_autocomplete-functions-3410a57d.js": {
"file": "assets/autocomplete-functions-3410a57d.js",
"_autocomplete-functions-ac0d2cb1.js": {
"file": "assets/autocomplete-functions-ac0d2cb1.js",
"imports": [
"_vendor-824d08a0.js",
"_get-51a7c3ed.js"
"_format-money-e259f5e4.js",
"_get-da167d5b.js",
"_vendor-fca45885.js"
],
"integrity": "sha384-o/3mERLcLYjxsZqqIwGnF4iaDtYbfp0p6ywZUw3LzaEKs8KenuVNJFbHEL+QvvF/"
"integrity": "sha384-ylbI7yXfy5qc0QwMwNSdc4QMHKM1eXXR6R2zLxLUSccW3OCkFCc5pEm1ZpCDbdXh"
},
"_get-51a7c3ed.js": {
"file": "assets/get-51a7c3ed.js",
"_create-empty-split-fb5bda92.js": {
"file": "assets/create-empty-split-fb5bda92.js",
"imports": [
"_vendor-824d08a0.js"
"_vendor-fca45885.js"
],
"integrity": "sha384-7rQLc8vRYEfvzGJkZK4O3GueHV9DYBPIONbhz38NdBNUvDS0FkwZGKW8C5ioVYx1"
"integrity": "sha384-hhKUcZf3xSLJgwkzufZGpLjOUeD5gulL71KQu72SoGIUVLPU3EIBT+ICT/znc01b"
},
"_get-c23f6e9c.js": {
"file": "assets/get-c23f6e9c.js",
"_format-money-e259f5e4.js": {
"file": "assets/format-money-e259f5e4.js",
"imports": [
"_get-51a7c3ed.js"
"_vendor-fca45885.js"
],
"integrity": "sha384-6GHrZICih75U9uAcpCdc9hKOJB1YOlJA0U4pthxpKBXg0PiuI144yADGDatP8qWc"
"integrity": "sha384-zfi6/58+Nb5L5Ryx5WARPOstXPNq+qioNeeQB0XP4V9ZAPg4Bi9bdC3+fVmNsE/M"
},
"_vendor-824d08a0.js": {
"_get-3bb14de5.js": {
"file": "assets/get-3bb14de5.js",
"imports": [
"_format-money-e259f5e4.js"
],
"integrity": "sha384-ZgD+gbjUNu1QpP5ZH5WE8+bJmZsLQOx73UT9vPxPRzBwxtGignJ2BC8h9WYdJxU3"
},
"_get-da167d5b.js": {
"file": "assets/get-da167d5b.js",
"imports": [
"_format-money-e259f5e4.js"
],
"integrity": "sha384-ADxhKsFImio/UdUojkpvUHQ9lKqGcHbhsvCj5TEYLNuefhUlz0RIyWX/0/cFcasS"
},
"_parse-downloaded-splits-7d781ebe.js": {
"file": "assets/parse-downloaded-splits-7d781ebe.js",
"imports": [
"_create-empty-split-fb5bda92.js",
"_vendor-fca45885.js"
],
"integrity": "sha384-aS2TUV4WV3MjjDkrhzSNLC2/qY5Y7aQnY9qYvhLIWiM464BEtuHS2KHKsyonykna"
},
"_vendor-fca45885.js": {
"assets": [
"assets/layers-1dbbe9d0.png",
"assets/layers-2x-066daca8.png",
@@ -30,8 +53,8 @@
"css": [
"assets/vendor-49001d3f.css"
],
"file": "assets/vendor-824d08a0.js",
"integrity": "sha384-RHD07rOX8oczLoy+ZfMln6IKmzXw0EUoyln808Rf9vNiUpXfO9dYspU2ugHkgnqE"
"file": "assets/vendor-fca45885.js",
"integrity": "sha384-xc7wHYzykc3pL46xJ1C3dJ/yReuYh0aAcdywRaE8sPW9QiKDkmpdip8ksd8qWp4b"
},
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf": {
"file": "assets/fa-brands-400-5656d596.ttf",
@@ -79,38 +102,57 @@
"integrity": "sha384-wg83fCOXjBtqzFAWhTL9Sd9vmLUNhfEEzfmNUX9zwv2igKlz/YQbdapF4ObdxF+R"
},
"resources/assets/v2/pages/dashboard/dashboard.js": {
"file": "assets/dashboard-1d6bb3a8.js",
"file": "assets/dashboard-d274a3dc.js",
"imports": [
"_get-51a7c3ed.js",
"_vendor-824d08a0.js",
"_get-c23f6e9c.js"
"_format-money-e259f5e4.js",
"_vendor-fca45885.js",
"_get-3bb14de5.js",
"_get-da167d5b.js"
],
"isEntry": true,
"src": "resources/assets/v2/pages/dashboard/dashboard.js",
"integrity": "sha384-GI5sC1ea2MZL7jEH7nTxh0XeVPfvGXqLgMBSqnWJt5MCKuhPK8/J6+ptF46PE054"
"integrity": "sha384-yhbUCvDl5ePrqXSXJu1jJ6eGLWzC137n7Ee3gHZDaO9kOKqtajG3KbILBpYlM5u9"
},
"resources/assets/v2/pages/transactions/create.js": {
"file": "assets/create-8992c704.js",
"file": "assets/create-9af1982c.js",
"imports": [
"_get-51a7c3ed.js",
"_autocomplete-functions-3410a57d.js",
"_vendor-824d08a0.js"
"_format-money-e259f5e4.js",
"_create-empty-split-fb5bda92.js",
"_autocomplete-functions-ac0d2cb1.js",
"_vendor-fca45885.js",
"_get-da167d5b.js"
],
"isEntry": true,
"src": "resources/assets/v2/pages/transactions/create.js",
"integrity": "sha384-F/oCKa2N6RMta8+C5lQ81oYNoKB6BUE4sbxJrpjixfBPNf3rwzXotyi+/mHL6ePE"
"integrity": "sha384-f1FX2idAuYuItQyu41hCRa1AtE+65Pqky4Dwn2+u+5Vmsm2gw1uoZp2sODAfpiS5"
},
"resources/assets/v2/pages/transactions/edit.js": {
"file": "assets/edit-ab5008f2.js",
"file": "assets/edit-84831b47.js",
"imports": [
"_get-51a7c3ed.js",
"_vendor-824d08a0.js",
"_get-c23f6e9c.js",
"_autocomplete-functions-3410a57d.js"
"_format-money-e259f5e4.js",
"_get-3bb14de5.js",
"_parse-downloaded-splits-7d781ebe.js",
"_autocomplete-functions-ac0d2cb1.js",
"_vendor-fca45885.js",
"_create-empty-split-fb5bda92.js",
"_get-da167d5b.js"
],
"isEntry": true,
"src": "resources/assets/v2/pages/transactions/edit.js",
"integrity": "sha384-mkNpSNt8PSuqNxyiOObOFTfcaNuOapa+Snw8Ufj8GkuLQXHZXBXqyol2Qx1j0FwD"
"integrity": "sha384-Ummn9Rx5ZUkO+v3kL5fP+Djw6oSdbrKhxMc5hIhoDyZhsgNHm6BzKnouwzd+NHDF"
},
"resources/assets/v2/pages/transactions/show.js": {
"file": "assets/show-18e47a07.js",
"imports": [
"_format-money-e259f5e4.js",
"_vendor-fca45885.js",
"_get-3bb14de5.js",
"_parse-downloaded-splits-7d781ebe.js",
"_create-empty-split-fb5bda92.js"
],
"isEntry": true,
"src": "resources/assets/v2/pages/transactions/show.js",
"integrity": "sha384-MLeDab/u+23tspn2M/cCjTtFIXNbIuMGeErOwjGMC5vKGOfLNcD3NUA1rXip9PQH"
},
"resources/assets/v2/sass/app.scss": {
"file": "assets/app-fb7b26ec.css",