Rebuild frontend v2

This commit is contained in:
James Cole
2024-01-08 20:31:35 +01:00
parent 2b5054b905
commit d510c4e31d
6 changed files with 12 additions and 12 deletions

File diff suppressed because one or more lines are too long

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(a){let n=[];for(let i in a)if(a.hasOwnProperty(i)){let e=a[i],t=r();t.bill_id=e.bill_id,t.bill_name=e.bill_name,t.budget_id=e.budget_id,t.budget_name=e.budget_name,t.category_name=e.category_name,t.category_id=e.category_id,t.piggy_bank_id=e.piggy_bank_id,t.piggy_bank_name=e.piggy_bank_name,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),n.push(t)}return n}export{c as p};

View File

@@ -1 +0,0 @@
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

@@ -1 +0,0 @@
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());

View File

@@ -0,0 +1 @@
import{d,f as p}from"./format-money-e259f5e4.js";import{f as c,i as o}from"./vendor-fca45885.js";import{G as l}from"./get-3bb14de5.js";import{p as f}from"./parse-downloaded-splits-4afea167.js";import"./create-empty-split-fb5bda92.js";let h=function(){return{notifications:{error:{show:!1,text:"",url:""},success:{show:!1,text:"",url:""},wait:{show:!1,text:""}},groupProperties:{id:0,transactionType:"",transactionTypeTranslated:"",title:"",date:new Date},dateFields:["book_date","due_date","interest_date","invoice_date","payment_date","process_date"],metaFields:["external_id","internal_reference","sepa_batch_id","sepa_ct_id","sepa_ct_op","sepa_db","sepa_country","sepa_cc","sepa_ep","sepa_ci","external_url"],amounts:{},entries:[],pageProperties:{},formatMoney(e,s){return p(e,s)},format(e){return c(e,o.t("config.date_time_fns"))},init(){this.notifications.wait.show=!0,this.notifications.wait.text=o.t("firefly.wait_loading_data");const e=window.location.href.split("/"),s=parseInt(e[e.length-1]);new l().show(s,{}).then(t=>{const i=t.data.data;this.groupProperties.id=parseInt(i.id),this.groupProperties.transactionType=i.attributes.transactions[0].type,this.groupProperties.transactionTypeTranslated=o.t("firefly."+i.attributes.transactions[0].type),this.groupProperties.title=i.attributes.title??i.attributes.transactions[0].description,this.entries=f(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,a=this.entries[t].foreign_currency_code;this.amounts[i]===void 0&&(this.amounts[i]=0,this.amounts[i]+=parseFloat(this.entries[t].amount)),a!==null&&a!==""&&this.amounts[a]===void 0&&(this.amounts[a]=0,this.amounts[a]+=parseFloat(this.entries[t].foreign_amount)),parseInt(t)===0&&(this.groupProperties.date=this.entries[t].date)}}).catch(t=>{this.notifications.error.show=!0,this.notifications.error.text=t.message})}}},r={show:h,dates:d};function n(){Object.keys(r).forEach(e=>{console.log(`Loading page component "${e}"`);let s=r[e]();Alpine.data(e,()=>s)}),Alpine.start()}document.addEventListener("firefly-iii-bootstrapped",()=>{console.log("Loaded through event listener."),n()});window.bootstrapped&&(console.log("Loaded through window variable."),n());

View File

@@ -36,13 +36,13 @@
],
"integrity": "sha384-ADxhKsFImio/UdUojkpvUHQ9lKqGcHbhsvCj5TEYLNuefhUlz0RIyWX/0/cFcasS"
},
"_parse-downloaded-splits-7d781ebe.js": {
"file": "assets/parse-downloaded-splits-7d781ebe.js",
"_parse-downloaded-splits-4afea167.js": {
"file": "assets/parse-downloaded-splits-4afea167.js",
"imports": [
"_create-empty-split-fb5bda92.js",
"_vendor-fca45885.js"
],
"integrity": "sha384-aS2TUV4WV3MjjDkrhzSNLC2/qY5Y7aQnY9qYvhLIWiM464BEtuHS2KHKsyonykna"
"integrity": "sha384-rTgD6HzwbdSD/qoN3b4vipowqanriBYLYnORI3F23R+uFbr1kyZIE1AHYA9oe2qO"
},
"_vendor-fca45885.js": {
"assets": [
@@ -127,11 +127,11 @@
"integrity": "sha384-f1FX2idAuYuItQyu41hCRa1AtE+65Pqky4Dwn2+u+5Vmsm2gw1uoZp2sODAfpiS5"
},
"resources/assets/v2/pages/transactions/edit.js": {
"file": "assets/edit-84831b47.js",
"file": "assets/edit-4a0660ed.js",
"imports": [
"_format-money-e259f5e4.js",
"_get-3bb14de5.js",
"_parse-downloaded-splits-7d781ebe.js",
"_parse-downloaded-splits-4afea167.js",
"_autocomplete-functions-ac0d2cb1.js",
"_vendor-fca45885.js",
"_create-empty-split-fb5bda92.js",
@@ -139,20 +139,20 @@
],
"isEntry": true,
"src": "resources/assets/v2/pages/transactions/edit.js",
"integrity": "sha384-Ummn9Rx5ZUkO+v3kL5fP+Djw6oSdbrKhxMc5hIhoDyZhsgNHm6BzKnouwzd+NHDF"
"integrity": "sha384-RPpIOYVoXcKosf6gEb0H1RpeEVWHSfPfr8/wwG1X2dJQ/AA1qBCIdisog0bryCgS"
},
"resources/assets/v2/pages/transactions/show.js": {
"file": "assets/show-18e47a07.js",
"file": "assets/show-9f0eb3b4.js",
"imports": [
"_format-money-e259f5e4.js",
"_vendor-fca45885.js",
"_get-3bb14de5.js",
"_parse-downloaded-splits-7d781ebe.js",
"_parse-downloaded-splits-4afea167.js",
"_create-empty-split-fb5bda92.js"
],
"isEntry": true,
"src": "resources/assets/v2/pages/transactions/show.js",
"integrity": "sha384-MLeDab/u+23tspn2M/cCjTtFIXNbIuMGeErOwjGMC5vKGOfLNcD3NUA1rXip9PQH"
"integrity": "sha384-MFgnhVMItZ2xoPPjfYAj+0uYCqL31JMZSdS9or8muf/YECi7R6Cz0CmJB+kPrehe"
},
"resources/assets/v2/sass/app.scss": {
"file": "assets/app-fb7b26ec.css",