Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Rebuild frontend, first working edit form (with feedback)
James Cole4affed8f683e
diff --git a/app/Http/Middleware/InterestingMessage.php b/app/Http/Middleware/InterestingMessage.phpindex f6fafd89c9..45f0eafab6 100644--- a/app/Http/Middleware/InterestingMessage.php+++ b/app/Http/Middleware/InterestingMessage.php@@ -116,5 +116,10 @@ class InterestingMessagesession()->flash('success_uri', route('transactions.show', [$transactionGroupId]));session()->flash('success', (string)trans(sprintf('firefly.updated_%s', $type), ['description' => $title]));}+ if('no_change' === $message) {+ $type = strtolower($journal->transactionType->type);+ session()->flash('warning_uri', route('transactions.show', [$transactionGroupId]));+ session()->flash('warning', (string)trans(sprintf('firefly.no_changes_%s', $type), ['description' => $title]));+ }}}diff --git a/frontend/src/components/transactions/Edit.vue b/frontend/src/components/transactions/Edit.vueindex b5727352b4..b834d01eec 100644--- a/frontend/src/components/transactions/Edit.vue+++ b/frontend/src/components/transactions/Edit.vue@@ -22,6 +22,7 @@<div><Alert :message="errorMessage" type="danger"/><Alert :message="successMessage" type="success"/>+ <Alert :message="warningMessage" type="warning"/><SplitPills :transactions="transactions"/><div class="tab-content">@@ -93,8 +94,8 @@</div><div class="col"><div class="form-check">- <input id="createAnother" v-model="createAnother" class="form-check-input" type="checkbox">- <label class="form-check-label" for="createAnother">+ <input id="stayHere" v-model="stayHere" class="form-check-input" type="checkbox">+ <label class="form-check-label" for="stayHere"><span class="small">{{ $t('firefly.after_update_create_another') }}</span></label></div>@@ -129,6 +130,7 @@ export default {return {successMessage: '',errorMessage: '',+ warningMessage: '',// transaction propstransactions: [],@@ -158,6 +160,7 @@ export default {submittedTransaction: false,submittedLinks: false,submittedAttachments: false,+ inError: false,// meta data for accountsallowedOpposingTypes: {},@@ -166,8 +169,7 @@ export default {// states for the form (makes sense right)enableSubmit: true,- createAnother: false,- resetFormAfter: false,+ stayHere: false,}},@@ -177,6 +179,22 @@ export default {SplitForm,TransactionGroupTitle},++ watch: {+ submittedTransaction: function () {+ // see finalizeSubmit()+ this.finalizeSubmit();+ },+ submittedLinks: function () {+ // see finalizeSubmit()+ this.finalizeSubmit();+ },+ submittedAttachments: function () {+ // see finalizeSubmit()+ this.finalizeSubmit();+ }+ },+methods: {/*** Grap transaction group from URL and submit GET.@@ -534,16 +552,30 @@ export default {}console.log('submitTransaction');- console.log(shouldUpload);- console.log(shouldLinks);- console.log(shouldSubmit);+ console.log('shouldUpload : ' + shouldUpload);+ console.log('shouldLinks : ' + shouldLinks);+ console.log('shouldSubmit : ' + shouldSubmit);if (shouldSubmit) {this.submitUpdate(submission, shouldLinks, shouldUpload);}+ if (!shouldSubmit) {+ this.submittedTransaction = true;+ }+ if (!shouldLinks) {+ this.submittedLinks = true;+ }+ if (!shouldUpload) {+ this.submittedAttachments = true;+ }if (!shouldSubmit && shouldLinks) {this.submitTransactionLinks();}+ if (!shouldSubmit && shouldLinks) {+ // TODO+ //this.submittedAttachments();+ }+ console.log('Done with submit methd.');//console.log(submission);},compareLinks: function (array) {@@ -568,6 +600,7 @@ export default {},submitUpdate: function (submission, shouldLinks, shouldUpload) {console.log('submitUpdate');+ this.inError = false;const url = './api/v1/transactions/' + this.groupId;console.log(submission);axios.put(url, submission)@@ -584,11 +617,14 @@ export default {if (!shouldLinks) {console.log('No need to update links.');}+ // TODO attachments:// this.submitAttachments(data, response);//// // meanwhile, store the ID and the title in some easy to access variables.- // this.returnedGroupId = parseInt(response.data.data.id);- // this.returnedGroupTitle = null === response.data.data.attributes.group_title ? response.data.data.attributes.transactions[0].description : response.data.data.attributes.group_title;+ this.returnedGroupId = parseInt(response.data.data.id);+ this.returnedGroupTitle = null === response.data.data.attributes.group_title ? response.data.data.attributes.transactions[0].description : response.data.data.attributes.group_title;++}).catch(error => {@@ -763,43 +799,11 @@ export default {}));}}-// shouldLinks = true;}}}--- return;- let result = response.data.data.attributes.transactions;-- // for (let i in data.transactions) {- // if (data.transactions.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {- // let submitted = data.transactions[i];- // if (result.hasOwnProperty(i)) {- // // found matching created transaction.- // let received = result[i];- // // grab ID from received, loop "submitted" transaction links- // for (let ii in submitted.links) {- // if (submitted.links.hasOwnProperty(ii) && /^0$|^[1-9]\d*$/.test(ii) && ii <= 4294967294) {- // let currentLink = submitted.links[ii];- // total++;- // if (0 === currentLink.outward_id) {- // currentLink.outward_id = received.transaction_journal_id;- // }- // if (0 === currentLink.inward_id) {- // currentLink.inward_id = received.transaction_journal_id;- // }- // // submit transaction link:- // promises.push(axios.post('./api/v1/transaction_links', currentLink).then(response => {- // // TODO error handling.- // }));- // }- // }- // }- // }- // }if (0 === total) {this.submittedLinks = true;return;@@ -808,6 +812,66 @@ export default {this.submittedLinks = true;});},+ finalizeSubmit: function () {+ console.log('now in finalizeSubmit()');+ console.log('submittedTransaction : ' + this.submittedTransaction);+ console.log('submittedLinks : ' + this.submittedLinks);+ console.log('submittedAttachments : ' + this.submittedAttachments);++ if (this.submittedTransaction && this.submittedAttachments && this.submittedLinks) {+ console.log('all true');+ console.log('inError = ' + this.inError);+ console.log('stayHere = ' + this.stayHere);+ console.log('returnedGroupId = ' + this.returnedGroupId);++ // no error + no changes + no redirect+ if (true === this.stayHere && false === this.inError && 0 === this.returnedGroupId) {+ console.log('no error + no changes + no redirect');+ // show message:+ this.errorMessage = '';+ this.successMessage = '';+ // maybe nothing changed in post+ this.warningMessage = this.$t('firefly.transaction_updated_no_changes', {ID: this.returnedGroupId, title: this.returnedGroupTitle});+ }++ // no error + no changes + redirect+ if (false === this.stayHere && false === this.inError && 0 === this.returnedGroupId) {+ console.log('no error + no changes + redirect');+ window.location.href = (window.previousURL ?? '/') + '?transaction_group_id=' + this.groupId + '&message=no_change';+ }+ // no error + changes + no redirect+ if (true === this.stayHere && false === this.inError && 0 !== this.returnedGroupId) {+ console.log('no error + changes + redirect');+ // show message:+ this.errorMessage = '';+ this.warningMessage = '';+ // maybe nothing changed in post+ this.successMessage = this.$t('firefly.transaction_updated_link', {ID: this.returnedGroupId, title: this.returnedGroupTitle});+ }++ // no error + changes + redirect+ if (false === this.stayHere && false === this.inError && 0 !== this.returnedGroupId) {+ console.log('no error + changes + redirect');+ window.location.href = (window.previousURL ?? '/') + '?transaction_group_id=' + this.groupId + '&message=updated';+ }+ console.log('end of the line');+ // enable flags:+ this.enableSubmit = true;+ this.submittedTransaction = false;+ this.submittedLinks = false;+ this.submittedAttachments = false;+ this.inError = false;++ // reset attachments (always do this)+ for (let i in this.transactions) {+ if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {+ if (this.transactions.hasOwnProperty(i)) {+ // TODO+ }+ }+ }+ }+ }}}</script>diff --git a/public/v2/js/transactions/edit.js b/public/v2/js/transactions/edit.jsindex 40dbfa166f..7efd217c16 100755--- a/public/v2/js/transactions/edit.js+++ b/public/v2/js/transactions/edit.js@@ -1,2 +1,2 @@-(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{422:function(t,e,i){t.exports=i(431)},431:function(t,e,i){"use strict";i.r(e);var n=i(17),s=i(39),a=i(22),r=i(38),o=i(40),c=i(7),l=i(41),d={name:"Edit",created:function(){var t=window.location.pathname.split("/");this.groupId=parseInt(t[t.length-1]),this.getTransactionGroup(),this.getAllowedOpposingTypes(),this.getCustomFields()},data:function(){return{successMessage:"",errorMessage:"",transactions:[],originalTransactions:[],groupTitle:"",originalGroupTitle:"",transactionType:"any",groupId:0,groupTitleErrors:[],customFields:{},returnedGroupId:0,returnedGroupTitle:"",date:new Date,time:new Date,originalDate:new Date,originalTime:new Date,submittedTransaction:!1,submittedLinks:!1,submittedAttachments:!1,allowedOpposingTypes:{},destinationAllowedTypes:[],sourceAllowedTypes:[],enableSubmit:!0,createAnother:!1,resetFormAfter:!1}},components:{Alert:s.a,SplitPills:a.a,SplitForm:r.a,TransactionGroupTitle:o.a},methods:{getTransactionGroup:function(){var t=this;axios.get("./api/v1/transactions/"+this.groupId).then((function(e){t.parseTransactionGroup(e.data)})).catch((function(t){}))},parseTransactionGroup:function(t){var e=t.data.attributes,i=e.transactions.reverse();for(var n in this.groupTitle=e.group_title,this.originalGroupTitle=e.group_title,i)if(i.hasOwnProperty(n)&&/^0$|^[1-9]\d*$/.test(n)&&n<=4294967294){var s=this.parseTransaction(parseInt(n),i[n]);this.transactions.push(s),this.originalTransactions.push(l(s)),this.parseLinks(parseInt(s.transaction_journal_id),parseInt(n))}},parseTransaction:function(t,e){var i;0===t&&(this.transactionType=e.type.charAt(0).toUpperCase()+e.type.slice(1),this.sourceAllowedTypes=[e.source_type],this.destinationAllowedTypes=[e.destination_type],this.date=new Date(e.date),this.time=new Date(e.date),this.originalDate=new Date(e.date),this.originalTime=new Date(e.date));var n=Object(c.b)();return n.description=e.description,n.transaction_journal_id=parseInt(e.transaction_journal_id),n.source_account_id=e.source_id,n.source_account_name=e.source_name,n.source_account_type=e.source_type,n.destination_account_id=e.destination_id,n.destination_account_name=e.destination_name,n.destination_account_type=e.destination_type,n.amount=e.amount,n.currency_id=e.currency_id,n.foreign_amount=e.foreign_amount,n.foreign_currency_id=e.foreign_currency_id,n.category=e.category_name,n.budget_id=e.budget_id,n.bill_id=null!==(i=e.bill_id)&&void 0!==i?i:0,n.tags=e.tags,n.interest_date=e.interest_date?e.interest_date.substr(0,10):"",n.book_date=e.book_date?e.book_date.substr(0,10):"",n.process_date=e.process_date?e.process_date.substr(0,10):"",n.due_date=e.due_date?e.due_date.substr(0,10):"",n.payment_date=e.payment_date?e.payment_date.substr(0,10):"",n.invoice_date=e.invoice_date?e.invoice_date.substr(0,10):"",n.internal_reference=e.internal_reference,n.external_url=e.external_uri,n.external_id=e.external_id,n.notes=e.notes,n.location={zoom_level:e.zoom_level,longitude:e.longitude,latitude:e.latitude},n.zoom_level=e.zoom_level,n.longitude=e.longitude,n.latitude=e.latitude,n.errors=Object(c.a)(),n},parseLinks:function(t,e){var i=this;axios.get("./api/v1/transaction-journals/"+t+"/links").then((function(n){var s=n.data.data;for(var a in s)s.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&i.parseLink(s[a],t,e)}))},parseLink:function(t,e,i){var n=this,s=[],a=parseInt(t.attributes.inward_id),r="inward";a===e&&(a=parseInt(t.attributes.outward_id),r="outward"),s.push(new Promise((function(n){n({link:t,journalId:e,opposingId:a,index:i,direction:r})}))),s.push(axios.get("./api/v1/transaction-journals/"+a)),s.push(axios.get("./api/v1/transaction_links/"+t.attributes.link_type_id)),Promise.all(s).then((function(e){var i=e[1].data.data.attributes.transactions,s=e[0].opposingId,a={};for(var r in i)i.hasOwnProperty(r)&&/^0$|^[1-9]\d*$/.test(r)&&r<=4294967294&&i[r].transaction_journal_id===s&&(a=i[r]);var o=e[0].index,c=e[0].direction,l=e[2].data.data.id,d={id:t.id,link_type_id:l+"-"+c,transaction_group_id:e[1].data.data.id,transaction_journal_id:a.transaction_journal_id,description:a.description,type:a.type,currency_code:a.currency_code,amount:a.amount};n.transactions[o].links.push(d),n.originalTransactions[o].links.push(d)}))},getAllowedOpposingTypes:function(){var t=this;axios.get("./api/v1/configuration/firefly.allowed_opposing_types").then((function(e){t.allowedOpposingTypes=e.data.data.value}))},getCustomFields:function(){var t=this;axios.get("./api/v1/preferences/transaction_journal_optional_fields").then((function(e){t.customFields=e.data.data.attributes.data}))},uploadedAttachment:function(t){console.log("event: uploadedAttachment"),console.log(t)},storeLocation:function(t){this.transactions[t.index].zoom_level=t.zoomLevel,this.transactions[t.index].longitude=t.lng,this.transactions[t.index].latitude=t.lat},storeAccountValue:function(t){var e=t.direction,i=t.index;this.transactions[i][e+"_account_id"]=t.id,this.transactions[i][e+"_account_type"]=t.type,this.transactions[i][e+"_account_name"]=t.name},storeDate:function(t){this.date=t.date},storeTime:function(t){this.time=t.time},storeField:function(t){var e=t.field;"category"===e&&(e="category_name"),this.transactions[t.index][e]=t.value},removeTransaction:function(t){this.transactions.splice(t.index,1),this.originalTransactions=[]},storeGroupTitle:function(t){this.groupTitle=t},selectedAttachments:function(t){for(var e in this.transactions)this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294&&parseInt(this.transactions[e].transaction_journal_id)===parseInt(t)&&(this.transactions[e].selectedAttachments=!0)},addTransaction:function(){var t=Object(c.b)();t.errors=Object(c.a)(),this.transactions.push(t)},submitTransaction:function(){var t={transactions:[]},e=!1,i=!1,n=!1;this.groupTitle!==this.originalGroupTitle&&(t.group_title=this.groupTitle,e=!0);var s=this.originalTransactions.length;for(var a in this.transactions)if(this.transactions.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294){var r=this.transactions[a],o=this.originalTransactions.hasOwnProperty(a)?this.originalTransactions[a]:{},d={},u=["description","source_account_id","source_account_name","destination_account_id","destination_account_name","amount","foreign_amount","foreign_currency_id","category_name","budget_id","bill_id","interest_date","book_date","due_date","payment_date","invoice_date","external_url","internal_reference","external_id","notes","zoom_level","longitude","latitude"];for(var p in u)if(u.hasOwnProperty(p)&&/^0$|^[1-9]\d*$/.test(p)&&p<=4294967294){var _=u[p];r[_]!==o[_]&&(d[_]=r[_],e=!0)}0!==r.piggy_bank_id&&(d.piggy_bank_id=r.piggy_bank_id,e=!0),JSON.stringify(r.tags)!==JSON.stringify(o.tags)&&(d.tags=r.tags,e=!0),this.compareLinks(r.links)!==this.compareLinks(o.links)&&(i=!0),void 0!==r.selectedAttachments&&!0===r.selectedAttachments&&(n=!0);var h="invalid";if(this.date.toISOString()!==this.originalDate.toISOString()||this.time.toISOString()!==this.originalTime.toISOString()){e=!0;var g=this.date;g.setHours(this.time.getHours()),g.setMinutes(this.time.getMinutes()),g.setSeconds(this.time.getSeconds()),h=Object(c.c)(g),t.date=h}(0===Object.keys(d).length&&s>1||0!==Object.keys(d).length)&&(d.transaction_journal_id=o.transaction_journal_id,t.transactions.push(l(d)),e=!0)}console.log("submitTransaction"),console.log(n),console.log(i),console.log(e),e&&this.submitUpdate(t,i,n),!e&&i&&this.submitTransactionLinks()},compareLinks:function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&/^0$|^[1-9]\d*$/.test(i)&&i<=4294967294&&e.push({amount:t[i].amount,currency_code:t[i].currency_code,description:t[i].description,link_type_id:t[i].link_type_id,transaction_group_id:t[i].transaction_group_id,type:t[i].type});return JSON.stringify(e)},submitUpdate:function(t,e,i){var n=this;console.log("submitUpdate");var s="./api/v1/transactions/"+this.groupId;console.log(t),axios.put(s,t).then((function(t){console.log("Response is OK!"),n.submittedTransaction=!0,e&&(console.log("Need to update links."),n.submitTransactionLinks()),e||console.log("No need to update links.")})).catch((function(t){console.log("error :("),console.log(t.response.data),n.enableSubmit=!0,n.submittedTransaction=!0,n.submittedAttachments=!0,n.submittedLinks=!0,n.inError=!0,n.parseErrors(t.response.data)}))},parseErrors:function(t){for(var e in this.transactions)this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294&&this.resetErrors({index:e});var i,n,s;for(var a in this.successMessage="",this.errorMessage=this.$t("firefly.errors_submission"),void 0===t.errors&&(this.successMessage="",this.errorMessage=t.message),t.errors)if(t.errors.hasOwnProperty(a)){if("group_title"===a){this.groupTitleErrors=t.errors[a];continue}if("group_title"!==a)switch(n=parseInt(a.split(".")[1]),s=a.split(".")[2]){case"amount":case"description":case"date":case"tags":i={index:n,field:s,errors:t.errors[a]},this.setTransactionError(i);break;case"budget_id":i={index:n,field:"budget",errors:t.errors[a]},this.setTransactionError(i);break;case"bill_id":i={index:n,field:"bill",errors:t.errors[a]},this.setTransactionError(i);break;case"piggy_bank_id":i={index:n,field:"piggy_bank",errors:t.errors[a]},this.setTransactionError(i);break;case"category_name":i={index:n,field:"category",errors:t.errors[a]},this.setTransactionError(i);break;case"source_name":case"source_id":i={index:n,field:"source",errors:t.errors[a]},this.setTransactionError(i);break;case"destination_name":case"destination_id":i={index:n,field:"destination",errors:t.errors[a]},this.setTransactionError(i);break;case"foreign_amount":case"foreign_currency":i={index:n,field:"foreign_amount",errors:t.errors[a]},this.setTransactionError(i)}this.transactions[n]}},setTransactionError:function(t){this.transactions[t.index].errors[t.field]=t.errors},resetErrors:function(t){this.transactions[t.index].errors=l(Object(c.a)())},deleteOriginalLinks:function(t){for(var e in console.log(t.links),t.links)if(t.links.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var i="/api/v1/transaction_links/"+t.links[e].id;axios.delete(i).then((function(t){}))}},submitTransactionLinks:function(){var t=[];for(var e in console.log("submitTransactionLinks()"),this.transactions)if(this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var i=this.transactions[e],n=this.originalTransactions.hasOwnProperty(e)?this.originalTransactions[e]:{},s=this.compareLinks(i.links),a=this.compareLinks(n.links);if(s!==a)for(var r in"[]"!==a&&this.deleteOriginalLinks(n),console.log("links are different!"),i.links)if(i.links.hasOwnProperty(r)&&/^0$|^[1-9]\d*$/.test(r)&&r<=4294967294){var o=i.links[r],c={inward_id:i.transaction_journal_id,outward_id:i.transaction_journal_id,link_type_id:"something"},l=o.link_type_id.split("-");c.link_type_id=l[0],"inward"===l[1]&&(c.inward_id=o.transaction_journal_id),"outward"===l[1]&&(c.outward_id=o.transaction_journal_id),console.log(c),t.push(axios.post("./api/v1/transaction_links",c).then((function(t){})))}}}}},u=i(1),p=Object(u.a)(d,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Alert",{attrs:{message:t.errorMessage,type:"danger"}}),t._v(" "),i("Alert",{attrs:{message:t.successMessage,type:"success"}}),t._v(" "),i("SplitPills",{attrs:{transactions:t.transactions}}),t._v(" "),i("div",{staticClass:"tab-content"},t._l(this.transactions,(function(e,n){return i("SplitForm",{key:n,attrs:{count:t.transactions.length,transaction:e,"allowed-opposing-types":t.allowedOpposingTypes,"custom-fields":t.customFields,date:t.date,time:t.time,index:n,"transaction-type":t.transactionType,"destination-allowed-types":t.destinationAllowedTypes,"source-allowed-types":t.sourceAllowedTypes,"allow-switch":!1,"submitted-transaction":t.submittedTransaction},on:{"uploaded-attachments":function(e){return t.uploadedAttachment(e)},"set-marker-location":function(e){return t.storeLocation(e)},"set-account":function(e){return t.storeAccountValue(e)},"set-date":function(e){return t.storeDate(e)},"set-time":function(e){return t.storeTime(e)},"set-field":function(e){return t.storeField(e)},"remove-transaction":function(e){return t.removeTransaction(e)},"selected-attachments":function(e){return t.selectedAttachments(e)}}})})),1),t._v(" "),i("div",{staticClass:"row"},[i("div",{staticClass:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},[t.transactions.length>1?i("div",{staticClass:"card"},[i("div",{staticClass:"card-body"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col"},[i("TransactionGroupTitle",{attrs:{errors:this.groupTitleErrors},on:{"set-group-title":function(e){return t.storeGroupTitle(e)}},model:{value:this.groupTitle,callback:function(e){t.$set(this,"groupTitle",e)},expression:"this.groupTitle"}})],1)])])]):t._e()]),t._v(" "),i("div",{staticClass:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},[i("div",{staticClass:"card"},[i("div",{staticClass:"card-body"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col"},[i("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n \n ")]),t._v(" "),i("button",{staticClass:"btn btn-outline-primary btn-block",on:{click:t.addTransaction}},[i("i",{staticClass:"far fa-clone"}),t._v(" "+t._s(t.$t("firefly.add_another_split"))+"\n ")])]),t._v(" "),i("div",{staticClass:"col"},[i("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n \n ")]),t._v(" "),i("button",{staticClass:"btn btn-info btn-block",attrs:{disabled:!t.enableSubmit},on:{click:t.submitTransaction}},[t.enableSubmit?i("span",[i("i",{staticClass:"far fa-save"}),t._v(" "+t._s(t.$t("firefly.update_transaction")))]):t._e(),t._v(" "),t.enableSubmit?t._e():i("span",[i("i",{staticClass:"fas fa-spinner fa-spin"})])])])]),t._v(" "),i("div",{staticClass:"row"},[i("div",{staticClass:"col"},[t._v("\n \n ")]),t._v(" "),i("div",{staticClass:"col"},[i("div",{staticClass:"form-check"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.createAnother,expression:"createAnother"}],staticClass:"form-check-input",attrs:{id:"createAnother",type:"checkbox"},domProps:{checked:Array.isArray(t.createAnother)?t._i(t.createAnother,null)>-1:t.createAnother},on:{change:function(e){var i=t.createAnother,n=e.target,s=!!n.checked;if(Array.isArray(i)){var a=t._i(i,null);n.checked?a<0&&(t.createAnother=i.concat([null])):a>-1&&(t.createAnother=i.slice(0,a).concat(i.slice(a+1)))}else t.createAnother=s}}}),t._v(" "),i("label",{staticClass:"form-check-label",attrs:{for:"createAnother"}},[i("span",{staticClass:"small"},[t._v(t._s(t.$t("firefly.after_update_create_another")))])])])])])])])])])],1)}),[],!1,null,"248bc324",null).exports,_=i(2),h=i.n(_);i(16),h.a.config.productionTip=!1;var g=i(19),f={};new h.a({i18n:g,store:n.a,render:function(t){return t(p,{props:f})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference")}}).$mount("#transactions_edit")}},[[422,0,1]]]);+(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{422:function(t,e,s){t.exports=s(431)},431:function(t,e,s){"use strict";s.r(e);var i=s(17),n=s(39),a=s(22),r=s(38),o=s(40),c=s(7),d=s(41),l={name:"Edit",created:function(){var t=window.location.pathname.split("/");this.groupId=parseInt(t[t.length-1]),this.getTransactionGroup(),this.getAllowedOpposingTypes(),this.getCustomFields()},data:function(){return{successMessage:"",errorMessage:"",warningMessage:"",transactions:[],originalTransactions:[],groupTitle:"",originalGroupTitle:"",transactionType:"any",groupId:0,groupTitleErrors:[],customFields:{},returnedGroupId:0,returnedGroupTitle:"",date:new Date,time:new Date,originalDate:new Date,originalTime:new Date,submittedTransaction:!1,submittedLinks:!1,submittedAttachments:!1,inError:!1,allowedOpposingTypes:{},destinationAllowedTypes:[],sourceAllowedTypes:[],enableSubmit:!0,stayHere:!1}},components:{Alert:n.a,SplitPills:a.a,SplitForm:r.a,TransactionGroupTitle:o.a},watch:{submittedTransaction:function(){this.finalizeSubmit()},submittedLinks:function(){this.finalizeSubmit()},submittedAttachments:function(){this.finalizeSubmit()}},methods:{getTransactionGroup:function(){var t=this;axios.get("./api/v1/transactions/"+this.groupId).then((function(e){t.parseTransactionGroup(e.data)})).catch((function(t){}))},parseTransactionGroup:function(t){var e=t.data.attributes,s=e.transactions.reverse();for(var i in this.groupTitle=e.group_title,this.originalGroupTitle=e.group_title,s)if(s.hasOwnProperty(i)&&/^0$|^[1-9]\d*$/.test(i)&&i<=4294967294){var n=this.parseTransaction(parseInt(i),s[i]);this.transactions.push(n),this.originalTransactions.push(d(n)),this.parseLinks(parseInt(n.transaction_journal_id),parseInt(i))}},parseTransaction:function(t,e){var s;0===t&&(this.transactionType=e.type.charAt(0).toUpperCase()+e.type.slice(1),this.sourceAllowedTypes=[e.source_type],this.destinationAllowedTypes=[e.destination_type],this.date=new Date(e.date),this.time=new Date(e.date),this.originalDate=new Date(e.date),this.originalTime=new Date(e.date));var i=Object(c.b)();return i.description=e.description,i.transaction_journal_id=parseInt(e.transaction_journal_id),i.source_account_id=e.source_id,i.source_account_name=e.source_name,i.source_account_type=e.source_type,i.destination_account_id=e.destination_id,i.destination_account_name=e.destination_name,i.destination_account_type=e.destination_type,i.amount=e.amount,i.currency_id=e.currency_id,i.foreign_amount=e.foreign_amount,i.foreign_currency_id=e.foreign_currency_id,i.category=e.category_name,i.budget_id=e.budget_id,i.bill_id=null!==(s=e.bill_id)&&void 0!==s?s:0,i.tags=e.tags,i.interest_date=e.interest_date?e.interest_date.substr(0,10):"",i.book_date=e.book_date?e.book_date.substr(0,10):"",i.process_date=e.process_date?e.process_date.substr(0,10):"",i.due_date=e.due_date?e.due_date.substr(0,10):"",i.payment_date=e.payment_date?e.payment_date.substr(0,10):"",i.invoice_date=e.invoice_date?e.invoice_date.substr(0,10):"",i.internal_reference=e.internal_reference,i.external_url=e.external_uri,i.external_id=e.external_id,i.notes=e.notes,i.location={zoom_level:e.zoom_level,longitude:e.longitude,latitude:e.latitude},i.zoom_level=e.zoom_level,i.longitude=e.longitude,i.latitude=e.latitude,i.errors=Object(c.a)(),i},parseLinks:function(t,e){var s=this;axios.get("./api/v1/transaction-journals/"+t+"/links").then((function(i){var n=i.data.data;for(var a in n)n.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&s.parseLink(n[a],t,e)}))},parseLink:function(t,e,s){var i=this,n=[],a=parseInt(t.attributes.inward_id),r="inward";a===e&&(a=parseInt(t.attributes.outward_id),r="outward"),n.push(new Promise((function(i){i({link:t,journalId:e,opposingId:a,index:s,direction:r})}))),n.push(axios.get("./api/v1/transaction-journals/"+a)),n.push(axios.get("./api/v1/transaction_links/"+t.attributes.link_type_id)),Promise.all(n).then((function(e){var s=e[1].data.data.attributes.transactions,n=e[0].opposingId,a={};for(var r in s)s.hasOwnProperty(r)&&/^0$|^[1-9]\d*$/.test(r)&&r<=4294967294&&s[r].transaction_journal_id===n&&(a=s[r]);var o=e[0].index,c=e[0].direction,d=e[2].data.data.id,l={id:t.id,link_type_id:d+"-"+c,transaction_group_id:e[1].data.data.id,transaction_journal_id:a.transaction_journal_id,description:a.description,type:a.type,currency_code:a.currency_code,amount:a.amount};i.transactions[o].links.push(l),i.originalTransactions[o].links.push(l)}))},getAllowedOpposingTypes:function(){var t=this;axios.get("./api/v1/configuration/firefly.allowed_opposing_types").then((function(e){t.allowedOpposingTypes=e.data.data.value}))},getCustomFields:function(){var t=this;axios.get("./api/v1/preferences/transaction_journal_optional_fields").then((function(e){t.customFields=e.data.data.attributes.data}))},uploadedAttachment:function(t){console.log("event: uploadedAttachment"),console.log(t)},storeLocation:function(t){this.transactions[t.index].zoom_level=t.zoomLevel,this.transactions[t.index].longitude=t.lng,this.transactions[t.index].latitude=t.lat},storeAccountValue:function(t){var e=t.direction,s=t.index;this.transactions[s][e+"_account_id"]=t.id,this.transactions[s][e+"_account_type"]=t.type,this.transactions[s][e+"_account_name"]=t.name},storeDate:function(t){this.date=t.date},storeTime:function(t){this.time=t.time},storeField:function(t){var e=t.field;"category"===e&&(e="category_name"),this.transactions[t.index][e]=t.value},removeTransaction:function(t){this.transactions.splice(t.index,1),this.originalTransactions=[]},storeGroupTitle:function(t){this.groupTitle=t},selectedAttachments:function(t){for(var e in this.transactions)this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294&&parseInt(this.transactions[e].transaction_journal_id)===parseInt(t)&&(this.transactions[e].selectedAttachments=!0)},addTransaction:function(){var t=Object(c.b)();t.errors=Object(c.a)(),this.transactions.push(t)},submitTransaction:function(){var t={transactions:[]},e=!1,s=!1,i=!1;this.groupTitle!==this.originalGroupTitle&&(t.group_title=this.groupTitle,e=!0);var n=this.originalTransactions.length;for(var a in this.transactions)if(this.transactions.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294){var r=this.transactions[a],o=this.originalTransactions.hasOwnProperty(a)?this.originalTransactions[a]:{},l={},u=["description","source_account_id","source_account_name","destination_account_id","destination_account_name","amount","foreign_amount","foreign_currency_id","category_name","budget_id","bill_id","interest_date","book_date","due_date","payment_date","invoice_date","external_url","internal_reference","external_id","notes","zoom_level","longitude","latitude"];for(var p in u)if(u.hasOwnProperty(p)&&/^0$|^[1-9]\d*$/.test(p)&&p<=4294967294){var h=u[p];r[h]!==o[h]&&(l[h]=r[h],e=!0)}0!==r.piggy_bank_id&&(l.piggy_bank_id=r.piggy_bank_id,e=!0),JSON.stringify(r.tags)!==JSON.stringify(o.tags)&&(l.tags=r.tags,e=!0),this.compareLinks(r.links)!==this.compareLinks(o.links)&&(s=!0),void 0!==r.selectedAttachments&&!0===r.selectedAttachments&&(i=!0);var _="invalid";if(this.date.toISOString()!==this.originalDate.toISOString()||this.time.toISOString()!==this.originalTime.toISOString()){e=!0;var g=this.date;g.setHours(this.time.getHours()),g.setMinutes(this.time.getMinutes()),g.setSeconds(this.time.getSeconds()),_=Object(c.c)(g),t.date=_}(0===Object.keys(l).length&&n>1||0!==Object.keys(l).length)&&(l.transaction_journal_id=o.transaction_journal_id,t.transactions.push(d(l)),e=!0)}console.log("submitTransaction"),console.log("shouldUpload : "+i),console.log("shouldLinks : "+s),console.log("shouldSubmit : "+e),e&&this.submitUpdate(t,s,i),e||(this.submittedTransaction=!0),s||(this.submittedLinks=!0),i||(this.submittedAttachments=!0),!e&&s&&this.submitTransactionLinks(),console.log("Done with submit methd.")},compareLinks:function(t){var e=[];for(var s in t)t.hasOwnProperty(s)&&/^0$|^[1-9]\d*$/.test(s)&&s<=4294967294&&e.push({amount:t[s].amount,currency_code:t[s].currency_code,description:t[s].description,link_type_id:t[s].link_type_id,transaction_group_id:t[s].transaction_group_id,type:t[s].type});return JSON.stringify(e)},submitUpdate:function(t,e,s){var i=this;console.log("submitUpdate"),this.inError=!1;var n="./api/v1/transactions/"+this.groupId;console.log(t),axios.put(n,t).then((function(t){console.log("Response is OK!"),i.submittedTransaction=!0,e&&(console.log("Need to update links."),i.submitTransactionLinks()),e||console.log("No need to update links."),i.returnedGroupId=parseInt(t.data.data.id),i.returnedGroupTitle=null===t.data.data.attributes.group_title?t.data.data.attributes.transactions[0].description:t.data.data.attributes.group_title})).catch((function(t){console.log("error :("),console.log(t.response.data),i.enableSubmit=!0,i.submittedTransaction=!0,i.submittedAttachments=!0,i.submittedLinks=!0,i.inError=!0,i.parseErrors(t.response.data)}))},parseErrors:function(t){for(var e in this.transactions)this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294&&this.resetErrors({index:e});var s,i,n;for(var a in this.successMessage="",this.errorMessage=this.$t("firefly.errors_submission"),void 0===t.errors&&(this.successMessage="",this.errorMessage=t.message),t.errors)if(t.errors.hasOwnProperty(a)){if("group_title"===a){this.groupTitleErrors=t.errors[a];continue}if("group_title"!==a)switch(i=parseInt(a.split(".")[1]),n=a.split(".")[2]){case"amount":case"description":case"date":case"tags":s={index:i,field:n,errors:t.errors[a]},this.setTransactionError(s);break;case"budget_id":s={index:i,field:"budget",errors:t.errors[a]},this.setTransactionError(s);break;case"bill_id":s={index:i,field:"bill",errors:t.errors[a]},this.setTransactionError(s);break;case"piggy_bank_id":s={index:i,field:"piggy_bank",errors:t.errors[a]},this.setTransactionError(s);break;case"category_name":s={index:i,field:"category",errors:t.errors[a]},this.setTransactionError(s);break;case"source_name":case"source_id":s={index:i,field:"source",errors:t.errors[a]},this.setTransactionError(s);break;case"destination_name":case"destination_id":s={index:i,field:"destination",errors:t.errors[a]},this.setTransactionError(s);break;case"foreign_amount":case"foreign_currency":s={index:i,field:"foreign_amount",errors:t.errors[a]},this.setTransactionError(s)}this.transactions[i]}},setTransactionError:function(t){this.transactions[t.index].errors[t.field]=t.errors},resetErrors:function(t){this.transactions[t.index].errors=d(Object(c.a)())},deleteOriginalLinks:function(t){for(var e in console.log(t.links),t.links)if(t.links.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var s="/api/v1/transaction_links/"+t.links[e].id;axios.delete(s).then((function(t){}))}},submitTransactionLinks:function(){var t=0,e=[];for(var s in console.log("submitTransactionLinks()"),this.transactions)if(this.transactions.hasOwnProperty(s)&&/^0$|^[1-9]\d*$/.test(s)&&s<=4294967294){var i=this.transactions[s],n=this.originalTransactions.hasOwnProperty(s)?this.originalTransactions[s]:{},a=this.compareLinks(i.links),r=this.compareLinks(n.links);if(a!==r)for(var o in"[]"!==r&&this.deleteOriginalLinks(n),console.log("links are different!"),i.links)if(i.links.hasOwnProperty(o)&&/^0$|^[1-9]\d*$/.test(o)&&o<=4294967294){var c=i.links[o],d={inward_id:i.transaction_journal_id,outward_id:i.transaction_journal_id,link_type_id:"something"},l=c.link_type_id.split("-");d.link_type_id=l[0],"inward"===l[1]&&(d.inward_id=c.transaction_journal_id),"outward"===l[1]&&(d.outward_id=c.transaction_journal_id),console.log(d),t++,e.push(axios.post("./api/v1/transaction_links",d).then((function(t){})))}}0!==t?Promise.all(e).then((function(){this.submittedLinks=!0})):this.submittedLinks=!0},finalizeSubmit:function(){if(console.log("now in finalizeSubmit()"),console.log("submittedTransaction : "+this.submittedTransaction),console.log("submittedLinks : "+this.submittedLinks),console.log("submittedAttachments : "+this.submittedAttachments),this.submittedTransaction&&this.submittedAttachments&&this.submittedLinks){var t,e;if(console.log("all true"),console.log("inError = "+this.inError),console.log("stayHere = "+this.stayHere),console.log("returnedGroupId = "+this.returnedGroupId),!0===this.stayHere&&!1===this.inError&&0===this.returnedGroupId&&(console.log("no error + no changes + no redirect"),this.errorMessage="",this.successMessage="",this.warningMessage=this.$t("firefly.transaction_updated_no_changes",{ID:this.returnedGroupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError&&0===this.returnedGroupId)console.log("no error + no changes + redirect"),window.location.href=(null!==(t=window.previousURL)&&void 0!==t?t:"/")+"?transaction_group_id="+this.groupId+"&message=no_change";if(!0===this.stayHere&&!1===this.inError&&0!==this.returnedGroupId&&(console.log("no error + changes + redirect"),this.errorMessage="",this.warningMessage="",this.successMessage=this.$t("firefly.transaction_updated_link",{ID:this.returnedGroupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError&&0!==this.returnedGroupId)console.log("no error + changes + redirect"),window.location.href=(null!==(e=window.previousURL)&&void 0!==e?e:"/")+"?transaction_group_id="+this.groupId+"&message=updated";for(var s in console.log("end of the line"),this.enableSubmit=!0,this.submittedTransaction=!1,this.submittedLinks=!1,this.submittedAttachments=!1,this.inError=!1,this.transactions)this.transactions.hasOwnProperty(s)&&/^0$|^[1-9]\d*$/.test(s)&&s<=4294967294&&this.transactions.hasOwnProperty(s)}}}},u=s(1),p=Object(u.a)(l,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("Alert",{attrs:{message:t.errorMessage,type:"danger"}}),t._v(" "),s("Alert",{attrs:{message:t.successMessage,type:"success"}}),t._v(" "),s("Alert",{attrs:{message:t.warningMessage,type:"warning"}}),t._v(" "),s("SplitPills",{attrs:{transactions:t.transactions}}),t._v(" "),s("div",{staticClass:"tab-content"},t._l(this.transactions,(function(e,i){return s("SplitForm",{key:i,attrs:{count:t.transactions.length,transaction:e,"allowed-opposing-types":t.allowedOpposingTypes,"custom-fields":t.customFields,date:t.date,time:t.time,index:i,"transaction-type":t.transactionType,"destination-allowed-types":t.destinationAllowedTypes,"source-allowed-types":t.sourceAllowedTypes,"allow-switch":!1,"submitted-transaction":t.submittedTransaction},on:{"uploaded-attachments":function(e){return t.uploadedAttachment(e)},"set-marker-location":function(e){return t.storeLocation(e)},"set-account":function(e){return t.storeAccountValue(e)},"set-date":function(e){return t.storeDate(e)},"set-time":function(e){return t.storeTime(e)},"set-field":function(e){return t.storeField(e)},"remove-transaction":function(e){return t.removeTransaction(e)},"selected-attachments":function(e){return t.selectedAttachments(e)}}})})),1),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},[t.transactions.length>1?s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col"},[s("TransactionGroupTitle",{attrs:{errors:this.groupTitleErrors},on:{"set-group-title":function(e){return t.storeGroupTitle(e)}},model:{value:this.groupTitle,callback:function(e){t.$set(this,"groupTitle",e)},expression:"this.groupTitle"}})],1)])])]):t._e()]),t._v(" "),s("div",{staticClass:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col"},[s("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n \n ")]),t._v(" "),s("button",{staticClass:"btn btn-outline-primary btn-block",on:{click:t.addTransaction}},[s("i",{staticClass:"far fa-clone"}),t._v(" "+t._s(t.$t("firefly.add_another_split"))+"\n ")])]),t._v(" "),s("div",{staticClass:"col"},[s("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n \n ")]),t._v(" "),s("button",{staticClass:"btn btn-info btn-block",attrs:{disabled:!t.enableSubmit},on:{click:t.submitTransaction}},[t.enableSubmit?s("span",[s("i",{staticClass:"far fa-save"}),t._v(" "+t._s(t.$t("firefly.update_transaction")))]):t._e(),t._v(" "),t.enableSubmit?t._e():s("span",[s("i",{staticClass:"fas fa-spinner fa-spin"})])])])]),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col"},[t._v("\n \n ")]),t._v(" "),s("div",{staticClass:"col"},[s("div",{staticClass:"form-check"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.stayHere,expression:"stayHere"}],staticClass:"form-check-input",attrs:{id:"stayHere",type:"checkbox"},domProps:{checked:Array.isArray(t.stayHere)?t._i(t.stayHere,null)>-1:t.stayHere},on:{change:function(e){var s=t.stayHere,i=e.target,n=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.stayHere=s.concat([null])):a>-1&&(t.stayHere=s.slice(0,a).concat(s.slice(a+1)))}else t.stayHere=n}}}),t._v(" "),s("label",{staticClass:"form-check-label",attrs:{for:"stayHere"}},[s("span",{staticClass:"small"},[t._v(t._s(t.$t("firefly.after_update_create_another")))])])])])])])])])])],1)}),[],!1,null,"41467208",null).exports,h=s(2),_=s.n(h);s(16),_.a.config.productionTip=!1;var g=s(19),m={};new _.a({i18n:g,store:i.a,render:function(t){return t(p,{props:m})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference")}}).$mount("#transactions_edit")}},[[422,0,1]]]);//# sourceMappingURL=edit.js.map\ No newline at end of filediff --git a/public/v2/js/transactions/edit.js.map b/public/v2/js/transactions/edit.js.mapindex a25c0ee36f..f8019a1b00 100755--- a/public/v2/js/transactions/edit.js.map+++ b/public/v2/js/transactions/edit.js.map@@ -1 +1 @@-{"version":3,"sources":["webpack:///src/components/transactions/Edit.vue","webpack:///./src/components/transactions/Edit.vue?f2c6","webpack:///./src/components/transactions/Edit.vue","webpack:///./src/components/transactions/Edit.vue?cacc","webpack:///./src/pages/transactions/edit.js"],"names":["name","created","this","groupId","parseInt","parts","length","getTransactionGroup","getAllowedOpposingTypes","getCustomFields","data","successMessage","errorMessage","transactions","originalTransactions","groupTitle","originalGroupTitle","transactionType","groupTitleErrors","customFields","returnedGroupId","returnedGroupTitle","date","Date","time","originalDate","originalTime","submittedTransaction","submittedLinks","submittedAttachments","allowedOpposingTypes","destinationAllowedTypes","sourceAllowedTypes","enableSubmit","createAnother","resetFormAfter","components","Alert","SplitPills","SplitForm","TransactionGroupTitle","methods","axios","get","parseTransactionGroup","attributes","group_title","hasOwnProperty","i","test","push","result","lodashClonedeep","parseLinks","transaction_journal_id","parseTransaction","index","array","type","charAt","toUpperCase","slice","source_type","destination_type","description","source_account_id","source_id","source_account_name","source_name","source_account_type","destination_account_id","destination_id","destination_account_name","destination_name","destination_account_type","amount","currency_id","foreign_amount","foreign_currency_id","category","category_name","budget_id","bill_id","tags","interest_date","substr","book_date","process_date","due_date","payment_date","invoice_date","internal_reference","external_url","external_uri","external_id","notes","location","zoom_level","longitude","latitude","errors","journalId","parseLink","opposingId","link","outward_id","linkDirection","promises","Promise","resolve","link_type_id","all","then","journals","journal","id","linkTypeId","direction","transaction_group_id","responses","currency_code","uploadedAttachment","console","log","payload","storeLocation","zoomLevel","lng","lat","storeAccountValue","storeDate","storeTime","storeField","field","value","removeTransaction","splice","storeGroupTitle","selectedAttachments","addTransaction","newTransaction","submitTransaction","submission","shouldSubmit","basicFields","ii","currentTransaction","fieldName","originalTransaction","diff","piggy_bank_id","JSON","stringify","shouldLinks","shouldUpload","theDate","setHours","getHours","setMinutes","getMinutes","setSeconds","getSeconds","dateStr","Object","keys","transactionCount","submitUpdate","submitTransactionLinks","compareLinks","compare","put","url","parseErrors","resetErrors","$t","message","key","transactionIndex","split","setTransactionError","deleteOriginalLinks","transaction","links","newLinks","originalLinks","inward_id","linkObject","currentLink","post","_vm","_h","$createElement","_c","_self","attrs","_v","staticClass","_l","on","$event","model","callback","$$v","$set","expression","_e","_s","directives","rawName","domProps","Array","isArray","_i","$$a","$$el","target","$$c","checked","$$i","concat","require","Vue","config","productionTip","i18n","props","store","render","createElement","Edit","beforeCreate","$store","commit","dispatch","$mount"],"mappings":"0LA8GA,QC9GoM,EDqHpM,CACEA,KAAM,OACNC,QAFF,WAGI,IAAJ,sCACIC,KAAKC,QAAUC,SAASC,EAAMA,EAAMC,OAAS,IAE7CJ,KAAKK,sBACLL,KAAKM,0BACLN,KAAKO,mBAEPC,KAVF,WAWI,MAAO,CACLC,eAAgB,GAChBC,aAAc,GAGdC,aAAc,GACdC,qBAAsB,GACtBC,WAAY,GACZC,mBAAoB,GACpBC,gBAAiB,MACjBd,QAAS,EAGTe,iBAAkB,GAGlBC,aAAc,GAGdC,gBAAiB,EACjBC,mBAAoB,GAGpBC,KAAM,IAAIC,KACVC,KAAM,IAAID,KACVE,aAAc,IAAIF,KAClBG,aAAc,IAAIH,KAGlBI,sBAAsB,EACtBC,gBAAgB,EAChBC,sBAAsB,EAGtBC,qBAAsB,GACtBC,wBAAyB,GACzBC,mBAAoB,GAGpBC,cAAc,EACdC,eAAe,EACfC,gBAAgB,IAIpBC,WAAY,CACVC,MAAJ,IACIC,WAAJ,IACIC,UAAJ,IACIC,sBAAJ,KAEEC,QAAS,CAIPlC,oBAAqB,WAAzB,WACMmC,MAAMC,IAAI,yBAA2BzC,KAAKC,SAChD,kBACQ,EAAR,iCAFA,OAIA,iBASIyC,sBAAuB,SAA3B,GAGM,IAAN,oBACA,2BAIM,IAAK,IAAX,KAHM1C,KAAKa,WAAa8B,EAAWC,YAC7B5C,KAAKc,mBAAqB6B,EAAWC,YAE3C,EACQ,GAAIjC,EAAakC,eAAeC,IAAM,iBAAiBC,KAAKD,IAAMA,GAAK,WAAY,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O,OAAOC,OAAO,mBACnBtO,KAAKqO,OAAOE,SAAS,+BAE1BC,OAAO,wB","file":"/public/js/transactions/edit.js","sourcesContent":["<!--\n - Edit.vue\n - Copyright (c) 2021 [email protected]\n -\n - This file is part of Firefly III (https://github.com/firefly-iii).\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <https://www.gnu.org/licenses/>.\n -->\n\n<template>\n <div>\n <Alert :message=\"errorMessage\" type=\"danger\"/>\n <Alert :message=\"successMessage\" type=\"success\"/>\n <SplitPills :transactions=\"transactions\"/>\n\n <div class=\"tab-content\">\n <SplitForm\n v-for=\"(transaction, index) in this.transactions\"\n v-bind:key=\"index\"\n :count=\"transactions.length\"\n :transaction=\"transaction\"\n :allowed-opposing-types=\"allowedOpposingTypes\"\n :custom-fields=\"customFields\"\n :date=\"date\"\n :time=\"time\"\n :index=\"index\"\n :transaction-type=\"transactionType\"\n :destination-allowed-types=\"destinationAllowedTypes\"\n :source-allowed-types=\"sourceAllowedTypes\"\n :allow-switch=\"false\"\n :submitted-transaction=\"submittedTransaction\"\n v-on:uploaded-attachments=\"uploadedAttachment($event)\"\n v-on:set-marker-location=\"storeLocation($event)\"\n v-on:set-account=\"storeAccountValue($event)\"\n v-on:set-date=\"storeDate($event)\"\n v-on:set-time=\"storeTime($event)\"\n v-on:set-field=\"storeField($event)\"\n v-on:remove-transaction=\"removeTransaction($event)\"\n v-on:selected-attachments=\"selectedAttachments($event)\"\n />\n </div>\n\n <!-- bottom buttons etc -->\n <div class=\"row\">\n <!-- group title -->\n <div class=\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n <div v-if=\"transactions.length > 1\" class=\"card\">\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col\">\n <TransactionGroupTitle v-model=\"this.groupTitle\" :errors=\"this.groupTitleErrors\" v-on:set-group-title=\"storeGroupTitle($event)\"/>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n <!-- buttons -->\n <div class=\"card\">\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"text-xs d-none d-lg-block d-xl-block\">\n \n </div>\n <button class=\"btn btn-outline-primary btn-block\" @click=\"addTransaction\"><i class=\"far fa-clone\"></i> {{ $t('firefly.add_another_split') }}\n </button>\n </div>\n <div class=\"col\">\n <div class=\"text-xs d-none d-lg-block d-xl-block\">\n \n </div>\n <button :disabled=\"!enableSubmit\" class=\"btn btn-info btn-block\" @click=\"submitTransaction\">\n <span v-if=\"enableSubmit\"><i class=\"far fa-save\"></i> {{ $t('firefly.update_transaction') }}</span>\n <span v-if=\"!enableSubmit\"><i class=\"fas fa-spinner fa-spin\"></i></span>\n </button>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col\">\n \n </div>\n <div class=\"col\">\n <div class=\"form-check\">\n <input id=\"createAnother\" v-model=\"createAnother\" class=\"form-check-input\" type=\"checkbox\">\n <label class=\"form-check-label\" for=\"createAnother\">\n <span class=\"small\">{{ $t('firefly.after_update_create_another') }}</span>\n </label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nconst lodashClonedeep = require('lodash.clonedeep');\nimport Alert from '../partials/Alert';\nimport SplitPills from \"./SplitPills\";\nimport SplitForm from \"./SplitForm\";\nimport TransactionGroupTitle from \"./TransactionGroupTitle\";\nimport {getDefaultErrors, getDefaultTransaction, toW3CString} from '../shared/transactions';\n\nexport default {\n name: \"Edit\",\n created() {\n let parts = window.location.pathname.split('/');\n this.groupId = parseInt(parts[parts.length - 1]);\n\n this.getTransactionGroup();\n this.getAllowedOpposingTypes();\n this.getCustomFields();\n },\n data() {\n return {\n successMessage: '',\n errorMessage: '',\n\n // transaction props\n transactions: [],\n originalTransactions: [],\n groupTitle: '',\n originalGroupTitle: '',\n transactionType: 'any',\n groupId: 0,\n\n // errors in the group title:\n groupTitleErrors: [],\n\n // which custom fields to show\n customFields: {},\n\n // group ID + title once submitted:\n returnedGroupId: 0,\n returnedGroupTitle: '',\n\n // date and time of the transaction,\n date: new Date,\n time: new Date,\n originalDate: new Date,\n originalTime: new Date,\n\n // things the process is done working on (3 phases):\n submittedTransaction: false,\n submittedLinks: false,\n submittedAttachments: false,\n\n // meta data for accounts\n allowedOpposingTypes: {},\n destinationAllowedTypes: [],\n sourceAllowedTypes: [],\n\n // states for the form (makes sense right)\n enableSubmit: true,\n createAnother: false,\n resetFormAfter: false,\n\n }\n },\n components: {\n Alert,\n SplitPills,\n SplitForm,\n TransactionGroupTitle\n },\n methods: {\n /**\n * Grap transaction group from URL and submit GET.\n */\n getTransactionGroup: function () {\n axios.get('./api/v1/transactions/' + this.groupId)\n .then(response => {\n this.parseTransactionGroup(response.data);\n }\n ).catch(error => {\n // console.log('I failed :(');\n // console.log(error);\n });\n },\n /**\n * Parse transaction group. Title is easy, transactions have their own method.\n * @param response\n */\n parseTransactionGroup: function (response) {\n // console.log('Will now parse');\n // console.log(response);\n let attributes = response.data.attributes;\n let transactions = attributes.transactions.reverse();\n this.groupTitle = attributes.group_title;\n this.originalGroupTitle = attributes.group_title;\n\n for (let i in transactions) {\n if (transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n let result = this.parseTransaction(parseInt(i), transactions[i]);\n this.transactions.push(result);\n this.originalTransactions.push(lodashClonedeep(result));\n // pick up the links of this transaction:\n this.parseLinks(parseInt(result.transaction_journal_id), parseInt(i));\n }\n }\n },\n /**\n * Parse a single transaction.\n *\n * @param index\n * @param array\n */\n parseTransaction: function (index, array) {\n //console.log('index: ' + index);\n if (0 === index) {\n this.transactionType = array.type.charAt(0).toUpperCase() + array.type.slice(1);\n this.sourceAllowedTypes = [array.source_type];\n this.destinationAllowedTypes = [array.destination_type];\n this.date = new Date(array.date);\n this.time = new Date(array.date);\n this.originalDate = new Date(array.date);\n this.originalTime = new Date(array.date);\n }\n let result = getDefaultTransaction();\n // parsing here:\n result.description = array.description;\n result.transaction_journal_id = parseInt(array.transaction_journal_id);\n // accounts:\n result.source_account_id = array.source_id;\n result.source_account_name = array.source_name;\n result.source_account_type = array.source_type;\n\n result.destination_account_id = array.destination_id;\n result.destination_account_name = array.destination_name;\n result.destination_account_type = array.destination_type;\n\n // amount:\n result.amount = array.amount;\n result.currency_id = array.currency_id;\n result.foreign_amount = array.foreign_amount;\n result.foreign_currency_id = array.foreign_currency_id;\n\n // meta data\n result.category = array.category_name;\n result.budget_id = array.budget_id;\n result.bill_id = array.bill_id ?? 0;\n\n result.tags = array.tags;\n\n // optional date fields (6x):\n result.interest_date = array.interest_date ? array.interest_date.substr(0, 10) : '';\n result.book_date = array.book_date ? array.book_date.substr(0, 10) : '';\n result.process_date = array.process_date ? array.process_date.substr(0, 10) : '';\n result.due_date = array.due_date ? array.due_date.substr(0, 10) : '';\n result.payment_date = array.payment_date ? array.payment_date.substr(0, 10) : '';\n result.invoice_date = array.invoice_date ? array.invoice_date.substr(0, 10) : '';\n\n // optional other fields:\n result.internal_reference = array.internal_reference;\n result.external_url = array.external_uri;\n result.external_id = array.external_id;\n result.notes = array.notes;\n // location:\n result.location = {\n zoom_level: array.zoom_level,\n longitude: array.longitude,\n latitude: array.latitude,\n };\n result.zoom_level = array.zoom_level;\n result.longitude = array.longitude;\n result.latitude = array.latitude;\n\n // error handling\n result.errors = getDefaultErrors();\n return result;\n },\n /**\n * Get the links of this transaction group from the API.\n */\n parseLinks: function (journalId, index) {\n axios.get('./api/v1/transaction-journals/' + journalId + '/links')\n .then(response => {\n let links = response.data.data;\n for (let i in links) {\n if (links.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n this.parseLink(links[i], journalId, index);\n }\n }\n });\n },\n\n /**\n * Process individual link from the API.\n */\n parseLink: function (link, journalId, index) {\n let promises = [];\n let opposingId = parseInt(link.attributes.inward_id);\n let linkDirection = 'inward';\n if (opposingId === journalId) {\n opposingId = parseInt(link.attributes.outward_id);\n linkDirection = 'outward';\n }\n // add meta data to promise context.\n promises.push(new Promise((resolve) => {\n resolve(\n {\n link: link,\n journalId: journalId,\n opposingId: opposingId,\n index: index,\n direction: linkDirection\n }\n );\n }));\n\n // get stuff from the API:\n promises.push(axios.get('./api/v1/transaction-journals/' + opposingId));\n promises.push(axios.get('./api/v1/transaction_links/' + link.attributes.link_type_id));\n\n Promise.all(promises).then(responses => {\n let journals = responses[1].data.data.attributes.transactions;\n let opposingId = responses[0].opposingId;\n let journal = {};\n // loop over journals to get the correct one:\n for (let i in journals) {\n if (journals.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n if (journals[i].transaction_journal_id === opposingId) {\n journal = journals[i];\n }\n }\n }\n let index = responses[0].index;\n let direction = responses[0].direction;\n let linkTypeId = responses[2].data.data.id;\n let object = {\n id: link.id,\n link_type_id: linkTypeId + '-' + direction,\n transaction_group_id: responses[1].data.data.id,\n transaction_journal_id: journal.transaction_journal_id,\n description: journal.description,\n type: journal.type,\n currency_code: journal.currency_code,\n amount: journal.amount\n };\n this.transactions[index].links.push(object);\n this.originalTransactions[index].links.push(object);\n });\n },\n /**\n * TODO same method as Create\n * Get API value.\n */\n getAllowedOpposingTypes: function () {\n axios.get('./api/v1/configuration/firefly.allowed_opposing_types')\n .then(response => {\n this.allowedOpposingTypes = response.data.data.value;\n // console.log('Set allowedOpposingTypes');\n });\n },\n /**\n * Get API value.\n */\n getCustomFields: function () {\n axios.get('./api/v1/preferences/transaction_journal_optional_fields').then(response => {\n this.customFields = response.data.data.attributes.data;\n });\n },\n uploadedAttachment: function (payload) {\n console.log('event: uploadedAttachment');\n console.log(payload);\n },\n storeLocation: function (payload) {\n this.transactions[payload.index].zoom_level = payload.zoomLevel;\n this.transactions[payload.index].longitude = payload.lng;\n this.transactions[payload.index].latitude = payload.lat;\n },\n storeAccountValue: function (payload) {\n let direction = payload.direction;\n let index = payload.index;\n this.transactions[index][direction + '_account_id'] = payload.id;\n this.transactions[index][direction + '_account_type'] = payload.type;\n this.transactions[index][direction + '_account_name'] = payload.name;\n },\n storeDate: function (payload) {\n // console.log('event: storeDate');\n // console.log(payload);\n this.date = payload.date;\n },\n storeTime: function (payload) {\n this.time = payload.time;\n // console.log('event: storeTime');\n // console.log(payload);\n },\n storeField: function (payload) {\n let field = payload.field;\n if ('category' === field) {\n field = 'category_name';\n }\n // console.log('event: storeField(' + field + ')');\n this.transactions[payload.index][field] = payload.value;\n\n },\n removeTransaction: function (payload) {\n this.transactions.splice(payload.index, 1);\n // this kills the original transactions.\n this.originalTransactions = [];\n },\n storeGroupTitle: function (payload) {\n this.groupTitle = payload;\n },\n selectedAttachments: function (payload) {\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n if (parseInt(this.transactions[i].transaction_journal_id) === parseInt(payload)) {\n // console.log('selectedAttachments ' + payload);\n this.transactions[i].selectedAttachments = true;\n }\n }\n }\n },\n addTransaction: function () {\n let newTransaction = getDefaultTransaction();\n newTransaction.errors = getDefaultErrors();\n this.transactions.push(newTransaction);\n },\n submitTransaction: function () {\n let submission = {transactions: []};\n let shouldSubmit = false;\n let shouldLinks = false;\n let shouldUpload = false;\n if (this.groupTitle !== this.originalGroupTitle) {\n submission.group_title = this.groupTitle;\n shouldSubmit = true;\n }\n let transactionCount = this.originalTransactions.length;\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n // original transaction present?\n let currentTransaction = this.transactions[i];\n let originalTransaction = this.originalTransactions.hasOwnProperty(i) ? this.originalTransactions[i] : {};\n\n let diff = {};\n\n // compare basic fields:\n let basicFields = [\n 'description',\n 'source_account_id', 'source_account_name',\n 'destination_account_id', 'destination_account_name',\n 'amount', 'foreign_amount', 'foreign_currency_id',\n 'category_name', 'budget_id', 'bill_id',\n 'interest_date', 'book_date', 'due_date', 'payment_date', 'invoice_date',\n 'external_url', 'internal_reference', 'external_id', 'notes',\n 'zoom_level', 'longitude', 'latitude'\n ];\n\n for (let ii in basicFields) {\n if (basicFields.hasOwnProperty(ii) && /^0$|^[1-9]\\d*$/.test(ii) && ii <= 4294967294) {\n let fieldName = basicFields[ii];\n if (currentTransaction[fieldName] !== originalTransaction[fieldName]) {\n // console.log('Index ' + i + ': Field ' + fieldName + ' updated (\"' + originalTransaction[fieldName] + '\" > \"' + currentTransaction[fieldName] + '\")');\n // console.log(originalTransaction[fieldName]);\n // console.log(currentTransaction[fieldName]);\n diff[fieldName] = currentTransaction[fieldName];\n shouldSubmit = true;\n }\n }\n }\n if (0 !== currentTransaction.piggy_bank_id) {\n diff.piggy_bank_id = currentTransaction.piggy_bank_id;\n shouldSubmit = true;\n }\n if (JSON.stringify(currentTransaction.tags) !== JSON.stringify(originalTransaction.tags)) {\n // console.log('tags are different');\n // console.log(currentTransaction.tags);\n // console.log(originalTransaction.tags);\n diff.tags = currentTransaction.tags;\n shouldSubmit = true;\n }\n\n // compare links:\n let newLinks = this.compareLinks(currentTransaction.links);\n let originalLinks = this.compareLinks(originalTransaction.links);\n // console.log('links are?');\n // console.log(newLinks);\n // console.log(originalLinks);\n if (newLinks !== originalLinks) {\n // console.log('links are different!');\n // console.log(newLinks);\n // console.log(originalLinks);\n shouldLinks = true;\n }\n // this.transactions[i].selectedAttachments\n // console.log(typeof currentTransaction.selectedAttachments);\n // console.log(currentTransaction.selectedAttachments);\n if (typeof currentTransaction.selectedAttachments !== 'undefined' && true === currentTransaction.selectedAttachments) {\n // must upload!\n shouldUpload = true;\n }\n\n let dateStr = 'invalid';\n if (\n this.date.toISOString() !== this.originalDate.toISOString() ||\n this.time.toISOString() !== this.originalTime.toISOString()\n ) {\n // set date and time!\n shouldSubmit = true;\n let theDate = this.date;\n // update time in date object.\n theDate.setHours(this.time.getHours());\n theDate.setMinutes(this.time.getMinutes());\n theDate.setSeconds(this.time.getSeconds());\n dateStr = toW3CString(theDate);\n submission.date = dateStr;\n }\n if (Object.keys(diff).length === 0 && transactionCount > 1) {\n diff.transaction_journal_id = originalTransaction.transaction_journal_id;\n submission.transactions.push(lodashClonedeep(diff));\n shouldSubmit = true;\n } else if (Object.keys(diff).length !== 0) {\n diff.transaction_journal_id = originalTransaction.transaction_journal_id;\n submission.transactions.push(lodashClonedeep(diff));\n shouldSubmit = true;\n }\n }\n }\n\n console.log('submitTransaction');\n console.log(shouldUpload);\n console.log(shouldLinks);\n console.log(shouldSubmit);\n if (shouldSubmit) {\n this.submitUpdate(submission, shouldLinks, shouldUpload);\n }\n if (!shouldSubmit && shouldLinks) {\n this.submitTransactionLinks();\n }\n\n //console.log(submission);\n },\n compareLinks: function (array) {\n let compare = [];\n for (let i in array) {\n if (array.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n compare.push(\n {\n amount: array[i].amount,\n currency_code: array[i].currency_code,\n description: array[i].description,\n link_type_id: array[i].link_type_id,\n transaction_group_id: array[i].transaction_group_id,\n type: array[i].type,\n }\n );\n }\n }\n // console.log('compareLinks');\n // console.log(compare);\n return JSON.stringify(compare);\n },\n submitUpdate: function (submission, shouldLinks, shouldUpload) {\n console.log('submitUpdate');\n const url = './api/v1/transactions/' + this.groupId;\n console.log(submission);\n axios.put(url, submission)\n .then(response => {\n console.log('Response is OK!');\n // report the transaction is submitted.\n this.submittedTransaction = true;\n\n // submit links and attachments (can only be done when the transaction is created)\n if (shouldLinks) {\n console.log('Need to update links.');\n this.submitTransactionLinks();\n }\n if (!shouldLinks) {\n console.log('No need to update links.');\n }\n // this.submitAttachments(data, response);\n //\n // // meanwhile, store the ID and the title in some easy to access variables.\n // this.returnedGroupId = parseInt(response.data.data.id);\n // this.returnedGroupTitle = null === response.data.data.attributes.group_title ? response.data.data.attributes.transactions[0].description : response.data.data.attributes.group_title;\n }\n )\n .catch(error => {\n console.log('error :(');\n console.log(error.response.data);\n // oh noes Firefly III has something to bitch about.\n this.enableSubmit = true;\n // report the transaction is submitted.\n this.submittedTransaction = true;\n // // also report attachments and links are submitted:\n this.submittedAttachments = true;\n this.submittedLinks = true;\n //\n // but report an error because error:\n this.inError = true;\n this.parseErrors(error.response.data);\n }\n );\n },\n parseErrors: function (errors) {\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n this.resetErrors({index: i});\n }\n }\n this.successMessage = '';\n this.errorMessage = this.$t('firefly.errors_submission');\n if (typeof errors.errors === 'undefined') {\n this.successMessage = '';\n this.errorMessage = errors.message;\n }\n\n let payload;\n let transactionIndex;\n let fieldName;\n\n // fairly basic way of exploding the error array.\n for (const key in errors.errors) {\n // console.log('Error index: \"' + key + '\"');\n if (errors.errors.hasOwnProperty(key)) {\n if (key === 'group_title') {\n this.groupTitleErrors = errors.errors[key];\n continue;\n }\n if (key !== 'group_title') {\n // lol dumbest way to explode \"transactions.0.something\" ever.\n transactionIndex = parseInt(key.split('.')[1]);\n\n fieldName = key.split('.')[2];\n\n // set error in this object thing.\n // console.log('The errors in key \"' + key + '\" are');\n // console.log(errors.errors[key]);\n switch (fieldName) {\n case 'amount':\n case 'description':\n case 'date':\n case 'tags':\n payload = {index: transactionIndex, field: fieldName, errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'budget_id':\n payload = {index: transactionIndex, field: 'budget', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'bill_id':\n payload = {index: transactionIndex, field: 'bill', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'piggy_bank_id':\n payload = {index: transactionIndex, field: 'piggy_bank', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'category_name':\n payload = {index: transactionIndex, field: 'category', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'source_name':\n case 'source_id':\n payload = {index: transactionIndex, field: 'source', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'destination_name':\n case 'destination_id':\n payload = {index: transactionIndex, field: 'destination', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'foreign_amount':\n case 'foreign_currency':\n payload = {index: transactionIndex, field: 'foreign_amount', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n }\n }\n // unique some things\n if (typeof this.transactions[transactionIndex] !== 'undefined') {\n //this.transactions[transactionIndex].errors.source = Array.from(new Set(this.transactions[transactionIndex].errors.source));\n //this.transactions[transactionIndex].errors.destination = Array.from(new Set(this.transactions[transactionIndex].errors.destination));\n }\n\n }\n }\n },\n setTransactionError: function (payload) {\n this.transactions[payload.index].errors[payload.field] = payload.errors;\n },\n resetErrors(payload) {\n this.transactions[payload.index].errors = lodashClonedeep(getDefaultErrors());\n },\n\n deleteOriginalLinks: function (transaction) {\n console.log(transaction.links);\n for (let i in transaction.links) {\n if (transaction.links.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n let current = transaction.links[i];\n let url = '/api/v1/transaction_links/' + current.id;\n axios.delete(url).then(response => {\n // TODO response\n });\n }\n }\n },\n\n /**\n * Submit transaction links.\n * TODO same method as CREATE\n */\n submitTransactionLinks() {\n let total = 0;\n let promises = [];\n\n console.log('submitTransactionLinks()');\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n // original transaction present?\n let currentTransaction = this.transactions[i];\n let originalTransaction = this.originalTransactions.hasOwnProperty(i) ? this.originalTransactions[i] : {};\n // compare links:\n let newLinks = this.compareLinks(currentTransaction.links);\n let originalLinks = this.compareLinks(originalTransaction.links);\n if (newLinks !== originalLinks) {\n if ('[]' !== originalLinks) {\n this.deleteOriginalLinks(originalTransaction);\n }\n\n console.log('links are different!');\n // console.log(newLinks);\n // console.log(originalLinks);\n for (let ii in currentTransaction.links) {\n if (currentTransaction.links.hasOwnProperty(ii) && /^0$|^[1-9]\\d*$/.test(ii) && ii <= 4294967294) {\n let currentLink = currentTransaction.links[ii];\n let linkObject = {\n inward_id: currentTransaction.transaction_journal_id,\n outward_id: currentTransaction.transaction_journal_id,\n link_type_id: 'something'\n };\n\n let parts = currentLink.link_type_id.split('-');\n linkObject.link_type_id = parts[0];\n if ('inward' === parts[1]) {\n linkObject.inward_id = currentLink.transaction_journal_id;\n }\n if ('outward' === parts[1]) {\n linkObject.outward_id = currentLink.transaction_journal_id;\n }\n\n console.log(linkObject);\n total++;\n // submit transaction link:\n promises.push(axios.post('./api/v1/transaction_links', linkObject).then(response => {\n // TODO error handling.\n }));\n }\n }\n\n // shouldLinks = true;\n }\n\n }\n }\n\n\n return;\n let result = response.data.data.attributes.transactions;\n\n // for (let i in data.transactions) {\n // if (data.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n // let submitted = data.transactions[i];\n // if (result.hasOwnProperty(i)) {\n // // found matching created transaction.\n // let received = result[i];\n // // grab ID from received, loop \"submitted\" transaction links\n // for (let ii in submitted.links) {\n // if (submitted.links.hasOwnProperty(ii) && /^0$|^[1-9]\\d*$/.test(ii) && ii <= 4294967294) {\n // let currentLink = submitted.links[ii];\n // total++;\n // if (0 === currentLink.outward_id) {\n // currentLink.outward_id = received.transaction_journal_id;\n // }\n // if (0 === currentLink.inward_id) {\n // currentLink.inward_id = received.transaction_journal_id;\n // }\n // // submit transaction link:\n // promises.push(axios.post('./api/v1/transaction_links', currentLink).then(response => {\n // // TODO error handling.\n // }));\n // }\n // }\n // }\n // }\n // }\n if (0 === total) {\n this.submittedLinks = true;\n return;\n }\n Promise.all(promises).then(function () {\n this.submittedLinks = true;\n });\n },\n }\n}\n</script>\n\n<style scoped>\n\n</style>","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Edit.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Edit.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Edit.vue?vue&type=template&id=248bc324&scoped=true&\"\nimport script from \"./Edit.vue?vue&type=script&lang=js&\"\nexport * from \"./Edit.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"248bc324\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('Alert',{attrs:{\"message\":_vm.errorMessage,\"type\":\"danger\"}}),_vm._v(\" \"),_c('Alert',{attrs:{\"message\":_vm.successMessage,\"type\":\"success\"}}),_vm._v(\" \"),_c('SplitPills',{attrs:{\"transactions\":_vm.transactions}}),_vm._v(\" \"),_c('div',{staticClass:\"tab-content\"},_vm._l((this.transactions),function(transaction,index){return _c('SplitForm',{key:index,attrs:{\"count\":_vm.transactions.length,\"transaction\":transaction,\"allowed-opposing-types\":_vm.allowedOpposingTypes,\"custom-fields\":_vm.customFields,\"date\":_vm.date,\"time\":_vm.time,\"index\":index,\"transaction-type\":_vm.transactionType,\"destination-allowed-types\":_vm.destinationAllowedTypes,\"source-allowed-types\":_vm.sourceAllowedTypes,\"allow-switch\":false,\"submitted-transaction\":_vm.submittedTransaction},on:{\"uploaded-attachments\":function($event){return _vm.uploadedAttachment($event)},\"set-marker-location\":function($event){return _vm.storeLocation($event)},\"set-account\":function($event){return _vm.storeAccountValue($event)},\"set-date\":function($event){return _vm.storeDate($event)},\"set-time\":function($event){return _vm.storeTime($event)},\"set-field\":function($event){return _vm.storeField($event)},\"remove-transaction\":function($event){return _vm.removeTransaction($event)},\"selected-attachments\":function($event){return _vm.selectedAttachments($event)}}})}),1),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\"},[(_vm.transactions.length > 1)?_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('TransactionGroupTitle',{attrs:{\"errors\":this.groupTitleErrors},on:{\"set-group-title\":function($event){return _vm.storeGroupTitle($event)}},model:{value:(this.groupTitle),callback:function ($$v) {_vm.$set(this, \"groupTitle\", $$v)},expression:\"this.groupTitle\"}})],1)])])]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-outline-primary btn-block\",on:{\"click\":_vm.addTransaction}},[_c('i',{staticClass:\"far fa-clone\"}),_vm._v(\" \"+_vm._s(_vm.$t('firefly.add_another_split'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-info btn-block\",attrs:{\"disabled\":!_vm.enableSubmit},on:{\"click\":_vm.submitTransaction}},[(_vm.enableSubmit)?_c('span',[_c('i',{staticClass:\"far fa-save\"}),_vm._v(\" \"+_vm._s(_vm.$t('firefly.update_transaction')))]):_vm._e(),_vm._v(\" \"),(!_vm.enableSubmit)?_c('span',[_c('i',{staticClass:\"fas fa-spinner fa-spin\"})]):_vm._e()])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.createAnother),expression:\"createAnother\"}],staticClass:\"form-check-input\",attrs:{\"id\":\"createAnother\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.createAnother)?_vm._i(_vm.createAnother,null)>-1:(_vm.createAnother)},on:{\"change\":function($event){var $$a=_vm.createAnother,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.createAnother=$$a.concat([$$v]))}else{$$i>-1&&(_vm.createAnother=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.createAnother=$$c}}}}),_vm._v(\" \"),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":\"createAnother\"}},[_c('span',{staticClass:\"small\"},[_vm._v(_vm._s(_vm.$t('firefly.after_update_create_another')))])])])])])])])])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * edit.js\n * Copyright (c) 2020 [email protected]\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nimport store from \"../../components/store\";\nimport Edit from \"../../components/transactions/Edit\";\nimport Vue from \"vue\";\n\nrequire('../../bootstrap');\n\nVue.config.productionTip = false;\n// i18n\nlet i18n = require('../../i18n');\n\nlet props = {};\nnew Vue({\n i18n,\n store,\n render(createElement) {\n return createElement(Edit, {props: props});\n },\n beforeCreate() {\n this.$store.commit('initialiseStore');\n this.$store.dispatch('updateCurrencyPreference');\n },\n }).$mount('#transactions_edit');\n"],"sourceRoot":""}\ No newline at end of file+{"version":3,"sources":["webpack:///src/components/transactions/Edit.vue","webpack:///./src/components/transactions/Edit.vue?f2c6","webpack:///./src/components/transactions/Edit.vue","webpack:///./src/components/transactions/Edit.vue?484a","webpack:///./src/pages/transactions/edit.js"],"names":["name","created","this","groupId","parseInt","parts","length","getTransactionGroup","getAllowedOpposingTypes","getCustomFields","data","successMessage","errorMessage","warningMessage","transactions","originalTransactions","groupTitle","originalGroupTitle","transactionType","groupTitleErrors","customFields","returnedGroupId","returnedGroupTitle","date","Date","time","originalDate","originalTime","submittedTransaction","submittedLinks","submittedAttachments","inError","allowedOpposingTypes","destinationAllowedTypes","sourceAllowedTypes","enableSubmit","stayHere","components","Alert","SplitPills","SplitForm","TransactionGroupTitle","watch","finalizeSubmit","methods","axios","get","parseTransactionGroup","attributes","group_title","hasOwnProperty","i","test","push","result","lodashClonedeep","parseLinks","transaction_journal_id","parseTransaction","index","array","type","charAt","toUpperCase","slice","source_type","destination_type","description","source_account_id","source_id","source_account_name","source_name","source_account_type","destination_account_id","destination_id","destination_account_name","destination_name","destination_account_type","amount","currency_id","foreign_amount","foreign_currency_id","category","category_name","budget_id","bill_id","tags","interest_date","substr","book_date","process_date","due_date","payment_date","invoice_date","internal_reference","external_url","external_uri","external_id","notes","location","zoom_level","longitude","latitude","errors","journalId","parseLink","opposingId","link","outward_id","linkDirection","promises","Promise","resolve","link_type_id","all","then","journals","journal","id","linkTypeId","direction","transaction_group_id","responses","currency_code","uploadedAttachment","console","log","payload","storeLocation","zoomLevel","lng","lat","storeAccountValue","storeDate","storeTime","storeField","field","value","removeTransaction","splice","storeGroupTitle","selectedAttachments","addTransaction","newTransaction","submitTransaction","submission","shouldSubmit","basicFields","ii","currentTransaction","fieldName","originalTransaction","diff","piggy_bank_id","JSON","stringify","shouldLinks","shouldUpload","theDate","setHours","getHours","setMinutes","getMinutes","setSeconds","getSeconds","dateStr","Object","keys","transactionCount","submitUpdate","submitTransactionLinks","compareLinks","compare","put","url","parseErrors","resetErrors","$t","message","key","transactionIndex","split","setTransactionError","deleteOriginalLinks","transaction","links","newLinks","originalLinks","inward_id","linkObject","currentLink","total","post","window","href","_vm","_h","$createElement","_c","_self","attrs","_v","staticClass","_l","on","$event","model","callback","$$v","$set","expression","_e","_s","directives","rawName","domProps","Array","isArray","_i","$$a","$$el","target","$$c","checked","$$i","concat","require","Vue","config","productionTip","i18n","props","store","render","createElement","Edit","beforeCreate","$store","commit","dispatch","$mount"],"mappings":"0LA+GA,QC/GoM,EDsHpM,CACEA,KAAM,OACNC,QAFF,WAGI,IAAJ,sCACIC,KAAKC,QAAUC,SAASC,EAAMA,EAAMC,OAAS,IAE7CJ,KAAKK,sBACLL,KAAKM,0BACLN,KAAKO,mBAEPC,KAVF,WAWI,MAAO,CACLC,eAAgB,GAChBC,aAAc,GACdC,eAAgB,GAGhBC,aAAc,GACdC,qBAAsB,GACtBC,WAAY,GACZC,mBAAoB,GACpBC,gBAAiB,MACjBf,QAAS,EAGTgB,iBAAkB,GAGlBC,aAAc,GAGdC,gBAAiB,EACjBC,mBAAoB,GAGpBC,KAAM,IAAIC,KACVC,KAAM,IAAID,KACVE,aAAc,IAAIF,KAClBG,aAAc,IAAIH,KAGlBI,sBAAsB,EACtBC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EAGTC,qBAAsB,GACtBC,wBAAyB,GACzBC,mBAAoB,GAGpBC,cAAc,EACdC,UAAU,IAIdC,WAAY,CACVC,MAAJ,IACIC,WAAJ,IACIC,UAAJ,IACIC,sBAAJ,KAGEC,MAAO,CACLd,qBAAsB,WAEpB1B,KAAKyC,kBAEPd,eAAgB,WAEd3B,KAAKyC,kBAEP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EAAG+J,EAAY,UAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIc,EAAIxB,EAAI/J,SAASwL,EAAKf,EAAOgB,OAAOC,IAAIF,EAAKG,QAAuB,GAAGP,MAAMC,QAAQE,GAAK,CAAC,IAAaK,EAAI7B,EAAIuB,GAAGC,EAAhB,MAA4BC,EAAKG,QAASC,EAAI,IAAI7B,EAAI/J,SAASuL,EAAIM,OAAO,CAA1E,QAAuFD,GAAK,IAAI7B,EAAI/J,SAASuL,EAAI3J,MAAM,EAAEgK,GAAKC,OAAON,EAAI3J,MAAMgK,EAAI,UAAW7B,EAAI/J,SAAS0L,MAAS3B,EAAIM,GAAG,KAAKH,EAAG,QAAQ,CAACI,YAAY,mBAAmBF,MAAM,CAAC,IAAM,aAAa,CAACF,EAAG,OAAO,CAACI,YAAY,SAAS,CAACP,EAAIM,GAAGN,EAAIiB,GAAGjB,EAAIlB,GAAG,4DAA4D,KAChgI,IDUpB,EACA,KACA,WACA,M,wBEUFiD,EAAQ,IAERC,IAAIC,OAAOC,eAAgB,EAE3B,IAAIC,EAAOJ,EAAQ,IAEfK,EAAQ,GACZ,IAAIJ,IAAI,CACIG,OACAE,UACAC,OAHJ,SAGWC,GACH,OAAOA,EAAcC,EAAM,CAACJ,MAAOA,KAEvCK,aANJ,WAOQ1O,KAAK2O,OAAOC,OAAO,mBACnB5O,KAAK2O,OAAOE,SAAS,+BAE1BC,OAAO,wB","file":"/public/js/transactions/edit.js","sourcesContent":["<!--\n - Edit.vue\n - Copyright (c) 2021 [email protected]\n -\n - This file is part of Firefly III (https://github.com/firefly-iii).\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <https://www.gnu.org/licenses/>.\n -->\n\n<template>\n <div>\n <Alert :message=\"errorMessage\" type=\"danger\"/>\n <Alert :message=\"successMessage\" type=\"success\"/>\n <Alert :message=\"warningMessage\" type=\"warning\"/>\n <SplitPills :transactions=\"transactions\"/>\n\n <div class=\"tab-content\">\n <SplitForm\n v-for=\"(transaction, index) in this.transactions\"\n v-bind:key=\"index\"\n :count=\"transactions.length\"\n :transaction=\"transaction\"\n :allowed-opposing-types=\"allowedOpposingTypes\"\n :custom-fields=\"customFields\"\n :date=\"date\"\n :time=\"time\"\n :index=\"index\"\n :transaction-type=\"transactionType\"\n :destination-allowed-types=\"destinationAllowedTypes\"\n :source-allowed-types=\"sourceAllowedTypes\"\n :allow-switch=\"false\"\n :submitted-transaction=\"submittedTransaction\"\n v-on:uploaded-attachments=\"uploadedAttachment($event)\"\n v-on:set-marker-location=\"storeLocation($event)\"\n v-on:set-account=\"storeAccountValue($event)\"\n v-on:set-date=\"storeDate($event)\"\n v-on:set-time=\"storeTime($event)\"\n v-on:set-field=\"storeField($event)\"\n v-on:remove-transaction=\"removeTransaction($event)\"\n v-on:selected-attachments=\"selectedAttachments($event)\"\n />\n </div>\n\n <!-- bottom buttons etc -->\n <div class=\"row\">\n <!-- group title -->\n <div class=\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n <div v-if=\"transactions.length > 1\" class=\"card\">\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col\">\n <TransactionGroupTitle v-model=\"this.groupTitle\" :errors=\"this.groupTitleErrors\" v-on:set-group-title=\"storeGroupTitle($event)\"/>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n <!-- buttons -->\n <div class=\"card\">\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"text-xs d-none d-lg-block d-xl-block\">\n \n </div>\n <button class=\"btn btn-outline-primary btn-block\" @click=\"addTransaction\"><i class=\"far fa-clone\"></i> {{ $t('firefly.add_another_split') }}\n </button>\n </div>\n <div class=\"col\">\n <div class=\"text-xs d-none d-lg-block d-xl-block\">\n \n </div>\n <button :disabled=\"!enableSubmit\" class=\"btn btn-info btn-block\" @click=\"submitTransaction\">\n <span v-if=\"enableSubmit\"><i class=\"far fa-save\"></i> {{ $t('firefly.update_transaction') }}</span>\n <span v-if=\"!enableSubmit\"><i class=\"fas fa-spinner fa-spin\"></i></span>\n </button>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col\">\n \n </div>\n <div class=\"col\">\n <div class=\"form-check\">\n <input id=\"stayHere\" v-model=\"stayHere\" class=\"form-check-input\" type=\"checkbox\">\n <label class=\"form-check-label\" for=\"stayHere\">\n <span class=\"small\">{{ $t('firefly.after_update_create_another') }}</span>\n </label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nconst lodashClonedeep = require('lodash.clonedeep');\nimport Alert from '../partials/Alert';\nimport SplitPills from \"./SplitPills\";\nimport SplitForm from \"./SplitForm\";\nimport TransactionGroupTitle from \"./TransactionGroupTitle\";\nimport {getDefaultErrors, getDefaultTransaction, toW3CString} from '../shared/transactions';\n\nexport default {\n name: \"Edit\",\n created() {\n let parts = window.location.pathname.split('/');\n this.groupId = parseInt(parts[parts.length - 1]);\n\n this.getTransactionGroup();\n this.getAllowedOpposingTypes();\n this.getCustomFields();\n },\n data() {\n return {\n successMessage: '',\n errorMessage: '',\n warningMessage: '',\n\n // transaction props\n transactions: [],\n originalTransactions: [],\n groupTitle: '',\n originalGroupTitle: '',\n transactionType: 'any',\n groupId: 0,\n\n // errors in the group title:\n groupTitleErrors: [],\n\n // which custom fields to show\n customFields: {},\n\n // group ID + title once submitted:\n returnedGroupId: 0,\n returnedGroupTitle: '',\n\n // date and time of the transaction,\n date: new Date,\n time: new Date,\n originalDate: new Date,\n originalTime: new Date,\n\n // things the process is done working on (3 phases):\n submittedTransaction: false,\n submittedLinks: false,\n submittedAttachments: false,\n inError: false,\n\n // meta data for accounts\n allowedOpposingTypes: {},\n destinationAllowedTypes: [],\n sourceAllowedTypes: [],\n\n // states for the form (makes sense right)\n enableSubmit: true,\n stayHere: false,\n\n }\n },\n components: {\n Alert,\n SplitPills,\n SplitForm,\n TransactionGroupTitle\n },\n\n watch: {\n submittedTransaction: function () {\n // see finalizeSubmit()\n this.finalizeSubmit();\n },\n submittedLinks: function () {\n // see finalizeSubmit()\n this.finalizeSubmit();\n },\n submittedAttachments: function () {\n // see finalizeSubmit()\n this.finalizeSubmit();\n }\n },\n\n methods: {\n /**\n * Grap transaction group from URL and submit GET.\n */\n getTransactionGroup: function () {\n axios.get('./api/v1/transactions/' + this.groupId)\n .then(response => {\n this.parseTransactionGroup(response.data);\n }\n ).catch(error => {\n // console.log('I failed :(');\n // console.log(error);\n });\n },\n /**\n * Parse transaction group. Title is easy, transactions have their own method.\n * @param response\n */\n parseTransactionGroup: function (response) {\n // console.log('Will now parse');\n // console.log(response);\n let attributes = response.data.attributes;\n let transactions = attributes.transactions.reverse();\n this.groupTitle = attributes.group_title;\n this.originalGroupTitle = attributes.group_title;\n\n for (let i in transactions) {\n if (transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n let result = this.parseTransaction(parseInt(i), transactions[i]);\n this.transactions.push(result);\n this.originalTransactions.push(lodashClonedeep(result));\n // pick up the links of this transaction:\n this.parseLinks(parseInt(result.transaction_journal_id), parseInt(i));\n }\n }\n },\n /**\n * Parse a single transaction.\n *\n * @param index\n * @param array\n */\n parseTransaction: function (index, array) {\n //console.log('index: ' + index);\n if (0 === index) {\n this.transactionType = array.type.charAt(0).toUpperCase() + array.type.slice(1);\n this.sourceAllowedTypes = [array.source_type];\n this.destinationAllowedTypes = [array.destination_type];\n this.date = new Date(array.date);\n this.time = new Date(array.date);\n this.originalDate = new Date(array.date);\n this.originalTime = new Date(array.date);\n }\n let result = getDefaultTransaction();\n // parsing here:\n result.description = array.description;\n result.transaction_journal_id = parseInt(array.transaction_journal_id);\n // accounts:\n result.source_account_id = array.source_id;\n result.source_account_name = array.source_name;\n result.source_account_type = array.source_type;\n\n result.destination_account_id = array.destination_id;\n result.destination_account_name = array.destination_name;\n result.destination_account_type = array.destination_type;\n\n // amount:\n result.amount = array.amount;\n result.currency_id = array.currency_id;\n result.foreign_amount = array.foreign_amount;\n result.foreign_currency_id = array.foreign_currency_id;\n\n // meta data\n result.category = array.category_name;\n result.budget_id = array.budget_id;\n result.bill_id = array.bill_id ?? 0;\n\n result.tags = array.tags;\n\n // optional date fields (6x):\n result.interest_date = array.interest_date ? array.interest_date.substr(0, 10) : '';\n result.book_date = array.book_date ? array.book_date.substr(0, 10) : '';\n result.process_date = array.process_date ? array.process_date.substr(0, 10) : '';\n result.due_date = array.due_date ? array.due_date.substr(0, 10) : '';\n result.payment_date = array.payment_date ? array.payment_date.substr(0, 10) : '';\n result.invoice_date = array.invoice_date ? array.invoice_date.substr(0, 10) : '';\n\n // optional other fields:\n result.internal_reference = array.internal_reference;\n result.external_url = array.external_uri;\n result.external_id = array.external_id;\n result.notes = array.notes;\n // location:\n result.location = {\n zoom_level: array.zoom_level,\n longitude: array.longitude,\n latitude: array.latitude,\n };\n result.zoom_level = array.zoom_level;\n result.longitude = array.longitude;\n result.latitude = array.latitude;\n\n // error handling\n result.errors = getDefaultErrors();\n return result;\n },\n /**\n * Get the links of this transaction group from the API.\n */\n parseLinks: function (journalId, index) {\n axios.get('./api/v1/transaction-journals/' + journalId + '/links')\n .then(response => {\n let links = response.data.data;\n for (let i in links) {\n if (links.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n this.parseLink(links[i], journalId, index);\n }\n }\n });\n },\n\n /**\n * Process individual link from the API.\n */\n parseLink: function (link, journalId, index) {\n let promises = [];\n let opposingId = parseInt(link.attributes.inward_id);\n let linkDirection = 'inward';\n if (opposingId === journalId) {\n opposingId = parseInt(link.attributes.outward_id);\n linkDirection = 'outward';\n }\n // add meta data to promise context.\n promises.push(new Promise((resolve) => {\n resolve(\n {\n link: link,\n journalId: journalId,\n opposingId: opposingId,\n index: index,\n direction: linkDirection\n }\n );\n }));\n\n // get stuff from the API:\n promises.push(axios.get('./api/v1/transaction-journals/' + opposingId));\n promises.push(axios.get('./api/v1/transaction_links/' + link.attributes.link_type_id));\n\n Promise.all(promises).then(responses => {\n let journals = responses[1].data.data.attributes.transactions;\n let opposingId = responses[0].opposingId;\n let journal = {};\n // loop over journals to get the correct one:\n for (let i in journals) {\n if (journals.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n if (journals[i].transaction_journal_id === opposingId) {\n journal = journals[i];\n }\n }\n }\n let index = responses[0].index;\n let direction = responses[0].direction;\n let linkTypeId = responses[2].data.data.id;\n let object = {\n id: link.id,\n link_type_id: linkTypeId + '-' + direction,\n transaction_group_id: responses[1].data.data.id,\n transaction_journal_id: journal.transaction_journal_id,\n description: journal.description,\n type: journal.type,\n currency_code: journal.currency_code,\n amount: journal.amount\n };\n this.transactions[index].links.push(object);\n this.originalTransactions[index].links.push(object);\n });\n },\n /**\n * TODO same method as Create\n * Get API value.\n */\n getAllowedOpposingTypes: function () {\n axios.get('./api/v1/configuration/firefly.allowed_opposing_types')\n .then(response => {\n this.allowedOpposingTypes = response.data.data.value;\n // console.log('Set allowedOpposingTypes');\n });\n },\n /**\n * Get API value.\n */\n getCustomFields: function () {\n axios.get('./api/v1/preferences/transaction_journal_optional_fields').then(response => {\n this.customFields = response.data.data.attributes.data;\n });\n },\n uploadedAttachment: function (payload) {\n console.log('event: uploadedAttachment');\n console.log(payload);\n },\n storeLocation: function (payload) {\n this.transactions[payload.index].zoom_level = payload.zoomLevel;\n this.transactions[payload.index].longitude = payload.lng;\n this.transactions[payload.index].latitude = payload.lat;\n },\n storeAccountValue: function (payload) {\n let direction = payload.direction;\n let index = payload.index;\n this.transactions[index][direction + '_account_id'] = payload.id;\n this.transactions[index][direction + '_account_type'] = payload.type;\n this.transactions[index][direction + '_account_name'] = payload.name;\n },\n storeDate: function (payload) {\n // console.log('event: storeDate');\n // console.log(payload);\n this.date = payload.date;\n },\n storeTime: function (payload) {\n this.time = payload.time;\n // console.log('event: storeTime');\n // console.log(payload);\n },\n storeField: function (payload) {\n let field = payload.field;\n if ('category' === field) {\n field = 'category_name';\n }\n // console.log('event: storeField(' + field + ')');\n this.transactions[payload.index][field] = payload.value;\n\n },\n removeTransaction: function (payload) {\n this.transactions.splice(payload.index, 1);\n // this kills the original transactions.\n this.originalTransactions = [];\n },\n storeGroupTitle: function (payload) {\n this.groupTitle = payload;\n },\n selectedAttachments: function (payload) {\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n if (parseInt(this.transactions[i].transaction_journal_id) === parseInt(payload)) {\n // console.log('selectedAttachments ' + payload);\n this.transactions[i].selectedAttachments = true;\n }\n }\n }\n },\n addTransaction: function () {\n let newTransaction = getDefaultTransaction();\n newTransaction.errors = getDefaultErrors();\n this.transactions.push(newTransaction);\n },\n submitTransaction: function () {\n let submission = {transactions: []};\n let shouldSubmit = false;\n let shouldLinks = false;\n let shouldUpload = false;\n if (this.groupTitle !== this.originalGroupTitle) {\n submission.group_title = this.groupTitle;\n shouldSubmit = true;\n }\n let transactionCount = this.originalTransactions.length;\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n // original transaction present?\n let currentTransaction = this.transactions[i];\n let originalTransaction = this.originalTransactions.hasOwnProperty(i) ? this.originalTransactions[i] : {};\n\n let diff = {};\n\n // compare basic fields:\n let basicFields = [\n 'description',\n 'source_account_id', 'source_account_name',\n 'destination_account_id', 'destination_account_name',\n 'amount', 'foreign_amount', 'foreign_currency_id',\n 'category_name', 'budget_id', 'bill_id',\n 'interest_date', 'book_date', 'due_date', 'payment_date', 'invoice_date',\n 'external_url', 'internal_reference', 'external_id', 'notes',\n 'zoom_level', 'longitude', 'latitude'\n ];\n\n for (let ii in basicFields) {\n if (basicFields.hasOwnProperty(ii) && /^0$|^[1-9]\\d*$/.test(ii) && ii <= 4294967294) {\n let fieldName = basicFields[ii];\n if (currentTransaction[fieldName] !== originalTransaction[fieldName]) {\n // console.log('Index ' + i + ': Field ' + fieldName + ' updated (\"' + originalTransaction[fieldName] + '\" > \"' + currentTransaction[fieldName] + '\")');\n // console.log(originalTransaction[fieldName]);\n // console.log(currentTransaction[fieldName]);\n diff[fieldName] = currentTransaction[fieldName];\n shouldSubmit = true;\n }\n }\n }\n if (0 !== currentTransaction.piggy_bank_id) {\n diff.piggy_bank_id = currentTransaction.piggy_bank_id;\n shouldSubmit = true;\n }\n if (JSON.stringify(currentTransaction.tags) !== JSON.stringify(originalTransaction.tags)) {\n // console.log('tags are different');\n // console.log(currentTransaction.tags);\n // console.log(originalTransaction.tags);\n diff.tags = currentTransaction.tags;\n shouldSubmit = true;\n }\n\n // compare links:\n let newLinks = this.compareLinks(currentTransaction.links);\n let originalLinks = this.compareLinks(originalTransaction.links);\n // console.log('links are?');\n // console.log(newLinks);\n // console.log(originalLinks);\n if (newLinks !== originalLinks) {\n // console.log('links are different!');\n // console.log(newLinks);\n // console.log(originalLinks);\n shouldLinks = true;\n }\n // this.transactions[i].selectedAttachments\n // console.log(typeof currentTransaction.selectedAttachments);\n // console.log(currentTransaction.selectedAttachments);\n if (typeof currentTransaction.selectedAttachments !== 'undefined' && true === currentTransaction.selectedAttachments) {\n // must upload!\n shouldUpload = true;\n }\n\n let dateStr = 'invalid';\n if (\n this.date.toISOString() !== this.originalDate.toISOString() ||\n this.time.toISOString() !== this.originalTime.toISOString()\n ) {\n // set date and time!\n shouldSubmit = true;\n let theDate = this.date;\n // update time in date object.\n theDate.setHours(this.time.getHours());\n theDate.setMinutes(this.time.getMinutes());\n theDate.setSeconds(this.time.getSeconds());\n dateStr = toW3CString(theDate);\n submission.date = dateStr;\n }\n if (Object.keys(diff).length === 0 && transactionCount > 1) {\n diff.transaction_journal_id = originalTransaction.transaction_journal_id;\n submission.transactions.push(lodashClonedeep(diff));\n shouldSubmit = true;\n } else if (Object.keys(diff).length !== 0) {\n diff.transaction_journal_id = originalTransaction.transaction_journal_id;\n submission.transactions.push(lodashClonedeep(diff));\n shouldSubmit = true;\n }\n }\n }\n\n console.log('submitTransaction');\n console.log('shouldUpload : ' + shouldUpload);\n console.log('shouldLinks : ' + shouldLinks);\n console.log('shouldSubmit : ' + shouldSubmit);\n if (shouldSubmit) {\n this.submitUpdate(submission, shouldLinks, shouldUpload);\n }\n if (!shouldSubmit) {\n this.submittedTransaction = true;\n }\n if (!shouldLinks) {\n this.submittedLinks = true;\n }\n if (!shouldUpload) {\n this.submittedAttachments = true;\n }\n if (!shouldSubmit && shouldLinks) {\n this.submitTransactionLinks();\n }\n\n if (!shouldSubmit && shouldLinks) {\n // TODO\n //this.submittedAttachments();\n }\n console.log('Done with submit methd.');\n //console.log(submission);\n },\n compareLinks: function (array) {\n let compare = [];\n for (let i in array) {\n if (array.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n compare.push(\n {\n amount: array[i].amount,\n currency_code: array[i].currency_code,\n description: array[i].description,\n link_type_id: array[i].link_type_id,\n transaction_group_id: array[i].transaction_group_id,\n type: array[i].type,\n }\n );\n }\n }\n // console.log('compareLinks');\n // console.log(compare);\n return JSON.stringify(compare);\n },\n submitUpdate: function (submission, shouldLinks, shouldUpload) {\n console.log('submitUpdate');\n this.inError = false;\n const url = './api/v1/transactions/' + this.groupId;\n console.log(submission);\n axios.put(url, submission)\n .then(response => {\n console.log('Response is OK!');\n // report the transaction is submitted.\n this.submittedTransaction = true;\n\n // submit links and attachments (can only be done when the transaction is created)\n if (shouldLinks) {\n console.log('Need to update links.');\n this.submitTransactionLinks();\n }\n if (!shouldLinks) {\n console.log('No need to update links.');\n }\n // TODO attachments:\n // this.submitAttachments(data, response);\n //\n // // meanwhile, store the ID and the title in some easy to access variables.\n this.returnedGroupId = parseInt(response.data.data.id);\n this.returnedGroupTitle = null === response.data.data.attributes.group_title ? response.data.data.attributes.transactions[0].description : response.data.data.attributes.group_title;\n\n\n }\n )\n .catch(error => {\n console.log('error :(');\n console.log(error.response.data);\n // oh noes Firefly III has something to bitch about.\n this.enableSubmit = true;\n // report the transaction is submitted.\n this.submittedTransaction = true;\n // // also report attachments and links are submitted:\n this.submittedAttachments = true;\n this.submittedLinks = true;\n //\n // but report an error because error:\n this.inError = true;\n this.parseErrors(error.response.data);\n }\n );\n },\n parseErrors: function (errors) {\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n this.resetErrors({index: i});\n }\n }\n this.successMessage = '';\n this.errorMessage = this.$t('firefly.errors_submission');\n if (typeof errors.errors === 'undefined') {\n this.successMessage = '';\n this.errorMessage = errors.message;\n }\n\n let payload;\n let transactionIndex;\n let fieldName;\n\n // fairly basic way of exploding the error array.\n for (const key in errors.errors) {\n // console.log('Error index: \"' + key + '\"');\n if (errors.errors.hasOwnProperty(key)) {\n if (key === 'group_title') {\n this.groupTitleErrors = errors.errors[key];\n continue;\n }\n if (key !== 'group_title') {\n // lol dumbest way to explode \"transactions.0.something\" ever.\n transactionIndex = parseInt(key.split('.')[1]);\n\n fieldName = key.split('.')[2];\n\n // set error in this object thing.\n // console.log('The errors in key \"' + key + '\" are');\n // console.log(errors.errors[key]);\n switch (fieldName) {\n case 'amount':\n case 'description':\n case 'date':\n case 'tags':\n payload = {index: transactionIndex, field: fieldName, errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'budget_id':\n payload = {index: transactionIndex, field: 'budget', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'bill_id':\n payload = {index: transactionIndex, field: 'bill', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'piggy_bank_id':\n payload = {index: transactionIndex, field: 'piggy_bank', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'category_name':\n payload = {index: transactionIndex, field: 'category', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'source_name':\n case 'source_id':\n payload = {index: transactionIndex, field: 'source', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'destination_name':\n case 'destination_id':\n payload = {index: transactionIndex, field: 'destination', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n case 'foreign_amount':\n case 'foreign_currency':\n payload = {index: transactionIndex, field: 'foreign_amount', errors: errors.errors[key]};\n this.setTransactionError(payload);\n break;\n }\n }\n // unique some things\n if (typeof this.transactions[transactionIndex] !== 'undefined') {\n //this.transactions[transactionIndex].errors.source = Array.from(new Set(this.transactions[transactionIndex].errors.source));\n //this.transactions[transactionIndex].errors.destination = Array.from(new Set(this.transactions[transactionIndex].errors.destination));\n }\n\n }\n }\n },\n setTransactionError: function (payload) {\n this.transactions[payload.index].errors[payload.field] = payload.errors;\n },\n resetErrors(payload) {\n this.transactions[payload.index].errors = lodashClonedeep(getDefaultErrors());\n },\n\n deleteOriginalLinks: function (transaction) {\n console.log(transaction.links);\n for (let i in transaction.links) {\n if (transaction.links.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n let current = transaction.links[i];\n let url = '/api/v1/transaction_links/' + current.id;\n axios.delete(url).then(response => {\n // TODO response\n });\n }\n }\n },\n\n /**\n * Submit transaction links.\n * TODO same method as CREATE\n */\n submitTransactionLinks() {\n let total = 0;\n let promises = [];\n\n console.log('submitTransactionLinks()');\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n // original transaction present?\n let currentTransaction = this.transactions[i];\n let originalTransaction = this.originalTransactions.hasOwnProperty(i) ? this.originalTransactions[i] : {};\n // compare links:\n let newLinks = this.compareLinks(currentTransaction.links);\n let originalLinks = this.compareLinks(originalTransaction.links);\n if (newLinks !== originalLinks) {\n if ('[]' !== originalLinks) {\n this.deleteOriginalLinks(originalTransaction);\n }\n\n console.log('links are different!');\n // console.log(newLinks);\n // console.log(originalLinks);\n for (let ii in currentTransaction.links) {\n if (currentTransaction.links.hasOwnProperty(ii) && /^0$|^[1-9]\\d*$/.test(ii) && ii <= 4294967294) {\n let currentLink = currentTransaction.links[ii];\n let linkObject = {\n inward_id: currentTransaction.transaction_journal_id,\n outward_id: currentTransaction.transaction_journal_id,\n link_type_id: 'something'\n };\n\n let parts = currentLink.link_type_id.split('-');\n linkObject.link_type_id = parts[0];\n if ('inward' === parts[1]) {\n linkObject.inward_id = currentLink.transaction_journal_id;\n }\n if ('outward' === parts[1]) {\n linkObject.outward_id = currentLink.transaction_journal_id;\n }\n\n console.log(linkObject);\n total++;\n // submit transaction link:\n promises.push(axios.post('./api/v1/transaction_links', linkObject).then(response => {\n // TODO error handling.\n }));\n }\n }\n // shouldLinks = true;\n }\n\n }\n }\n if (0 === total) {\n this.submittedLinks = true;\n return;\n }\n Promise.all(promises).then(function () {\n this.submittedLinks = true;\n });\n },\n finalizeSubmit: function () {\n console.log('now in finalizeSubmit()');\n console.log('submittedTransaction : ' + this.submittedTransaction);\n console.log('submittedLinks : ' + this.submittedLinks);\n console.log('submittedAttachments : ' + this.submittedAttachments);\n\n if (this.submittedTransaction && this.submittedAttachments && this.submittedLinks) {\n console.log('all true');\n console.log('inError = ' + this.inError);\n console.log('stayHere = ' + this.stayHere);\n console.log('returnedGroupId = ' + this.returnedGroupId);\n\n // no error + no changes + no redirect\n if (true === this.stayHere && false === this.inError && 0 === this.returnedGroupId) {\n console.log('no error + no changes + no redirect');\n // show message:\n this.errorMessage = '';\n this.successMessage = '';\n // maybe nothing changed in post\n this.warningMessage = this.$t('firefly.transaction_updated_no_changes', {ID: this.returnedGroupId, title: this.returnedGroupTitle});\n }\n\n // no error + no changes + redirect\n if (false === this.stayHere && false === this.inError && 0 === this.returnedGroupId) {\n console.log('no error + no changes + redirect');\n window.location.href = (window.previousURL ?? '/') + '?transaction_group_id=' + this.groupId + '&message=no_change';\n }\n // no error + changes + no redirect\n if (true === this.stayHere && false === this.inError && 0 !== this.returnedGroupId) {\n console.log('no error + changes + redirect');\n // show message:\n this.errorMessage = '';\n this.warningMessage = '';\n // maybe nothing changed in post\n this.successMessage = this.$t('firefly.transaction_updated_link', {ID: this.returnedGroupId, title: this.returnedGroupTitle});\n }\n\n // no error + changes + redirect\n if (false === this.stayHere && false === this.inError && 0 !== this.returnedGroupId) {\n console.log('no error + changes + redirect');\n window.location.href = (window.previousURL ?? '/') + '?transaction_group_id=' + this.groupId + '&message=updated';\n }\n console.log('end of the line');\n // enable flags:\n this.enableSubmit = true;\n this.submittedTransaction = false;\n this.submittedLinks = false;\n this.submittedAttachments = false;\n this.inError = false;\n\n // reset attachments (always do this)\n for (let i in this.transactions) {\n if (this.transactions.hasOwnProperty(i) && /^0$|^[1-9]\\d*$/.test(i) && i <= 4294967294) {\n if (this.transactions.hasOwnProperty(i)) {\n // TODO\n }\n }\n }\n }\n }\n }\n}\n</script>\n\n<style scoped>\n\n</style>","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Edit.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Edit.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Edit.vue?vue&type=template&id=41467208&scoped=true&\"\nimport script from \"./Edit.vue?vue&type=script&lang=js&\"\nexport * from \"./Edit.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"41467208\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('Alert',{attrs:{\"message\":_vm.errorMessage,\"type\":\"danger\"}}),_vm._v(\" \"),_c('Alert',{attrs:{\"message\":_vm.successMessage,\"type\":\"success\"}}),_vm._v(\" \"),_c('Alert',{attrs:{\"message\":_vm.warningMessage,\"type\":\"warning\"}}),_vm._v(\" \"),_c('SplitPills',{attrs:{\"transactions\":_vm.transactions}}),_vm._v(\" \"),_c('div',{staticClass:\"tab-content\"},_vm._l((this.transactions),function(transaction,index){return _c('SplitForm',{key:index,attrs:{\"count\":_vm.transactions.length,\"transaction\":transaction,\"allowed-opposing-types\":_vm.allowedOpposingTypes,\"custom-fields\":_vm.customFields,\"date\":_vm.date,\"time\":_vm.time,\"index\":index,\"transaction-type\":_vm.transactionType,\"destination-allowed-types\":_vm.destinationAllowedTypes,\"source-allowed-types\":_vm.sourceAllowedTypes,\"allow-switch\":false,\"submitted-transaction\":_vm.submittedTransaction},on:{\"uploaded-attachments\":function($event){return _vm.uploadedAttachment($event)},\"set-marker-location\":function($event){return _vm.storeLocation($event)},\"set-account\":function($event){return _vm.storeAccountValue($event)},\"set-date\":function($event){return _vm.storeDate($event)},\"set-time\":function($event){return _vm.storeTime($event)},\"set-field\":function($event){return _vm.storeField($event)},\"remove-transaction\":function($event){return _vm.removeTransaction($event)},\"selected-attachments\":function($event){return _vm.selectedAttachments($event)}}})}),1),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\"},[(_vm.transactions.length > 1)?_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('TransactionGroupTitle',{attrs:{\"errors\":this.groupTitleErrors},on:{\"set-group-title\":function($event){return _vm.storeGroupTitle($event)}},model:{value:(this.groupTitle),callback:function ($$v) {_vm.$set(this, \"groupTitle\", $$v)},expression:\"this.groupTitle\"}})],1)])])]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-outline-primary btn-block\",on:{\"click\":_vm.addTransaction}},[_c('i',{staticClass:\"far fa-clone\"}),_vm._v(\" \"+_vm._s(_vm.$t('firefly.add_another_split'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-info btn-block\",attrs:{\"disabled\":!_vm.enableSubmit},on:{\"click\":_vm.submitTransaction}},[(_vm.enableSubmit)?_c('span',[_c('i',{staticClass:\"far fa-save\"}),_vm._v(\" \"+_vm._s(_vm.$t('firefly.update_transaction')))]):_vm._e(),_vm._v(\" \"),(!_vm.enableSubmit)?_c('span',[_c('i',{staticClass:\"fas fa-spinner fa-spin\"})]):_vm._e()])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.stayHere),expression:\"stayHere\"}],staticClass:\"form-check-input\",attrs:{\"id\":\"stayHere\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.stayHere)?_vm._i(_vm.stayHere,null)>-1:(_vm.stayHere)},on:{\"change\":function($event){var $$a=_vm.stayHere,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.stayHere=$$a.concat([$$v]))}else{$$i>-1&&(_vm.stayHere=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.stayHere=$$c}}}}),_vm._v(\" \"),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":\"stayHere\"}},[_c('span',{staticClass:\"small\"},[_vm._v(_vm._s(_vm.$t('firefly.after_update_create_another')))])])])])])])])])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * edit.js\n * Copyright (c) 2020 [email protected]\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nimport store from \"../../components/store\";\nimport Edit from \"../../components/transactions/Edit\";\nimport Vue from \"vue\";\n\nrequire('../../bootstrap');\n\nVue.config.productionTip = false;\n// i18n\nlet i18n = require('../../i18n');\n\nlet props = {};\nnew Vue({\n i18n,\n store,\n render(createElement) {\n return createElement(Edit, {props: props});\n },\n beforeCreate() {\n this.$store.commit('initialiseStore');\n this.$store.dispatch('updateCurrencyPreference');\n },\n }).$mount('#transactions_edit');\n"],"sourceRoot":""}\ No newline at end of filediff --git a/resources/assets/js/locales/en.json b/resources/assets/js/locales/en.jsonindex 41f2057004..8bcc9151b2 100644--- a/resources/assets/js/locales/en.json+++ b/resources/assets/js/locales/en.json@@ -9,7 +9,7 @@"split": "Split","single_split": "Split","transaction_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID} (\"{title}\")<\/a> has been stored.",- "transaction_updated_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID}<\/a> has been updated.",+ "transaction_updated_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID}<\/a> (\"{title}\") has been updated.","transaction_new_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID}<\/a> has been stored.","transaction_journal_information": "Transaction information","no_budget_pointer": "You seem to have no budgets yet. You should create some on the <a href=\"budgets\">budgets<\/a>-page. Budgets can help you keep track of expenses.",diff --git a/resources/lang/bg_BG/firefly.php b/resources/lang/bg_BG/firefly.phpindex 7bd2f2db00..c0733efa91 100644--- a/resources/lang/bg_BG/firefly.php+++ b/resources/lang/bg_BG/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Тегленето ":description" бе обновено','updated_deposit' => 'Депозитът ":description" бе обновен','updated_transfer' => 'Прехвърлянето ":description" бе обновено',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Изтрий тегленето ":description"','delete_deposit' => 'Изтрий депозита ":description"','delete_transfer' => 'Изтрий прехвърлянето ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Тази транзакция е свързана със сметка <a href=":route">:name </a>. За да изтриете връзката, премахнете отметката от квадратчето. Използвайте правила, за да я свържете с друга сметка.','transaction_stored_link' => '<a href="transactions/show/{ID}">Транзакция #{ID}("{title}")</a> беше записана.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Транзакция #{ID}</a> беше записана.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Транзакция #{ID}</a> беше обновена.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/cs_CZ/firefly.php b/resources/lang/cs_CZ/firefly.phpindex e1aeef81da..45a364aeaa 100644--- a/resources/lang/cs_CZ/firefly.php+++ b/resources/lang/cs_CZ/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Aktualizován výběr „:description“','updated_deposit' => 'Aktualizován vklad „:description“','updated_transfer' => 'Aktualizován převod „:description“',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Smazat výběr „:description“','delete_deposit' => 'Smazat vklad „:description“','delete_transfer' => 'Smazat převod „:description“',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'This transaction is linked to bill <a href=":route">:name</a>. To remove the connection, uncheck the checkbox. Use rules to connect it to another bill.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.phpindex 805a36b632..7fd2442db7 100644--- a/resources/lang/de_DE/firefly.php+++ b/resources/lang/de_DE/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Ausgabe ":description" aktualisiert','updated_deposit' => 'Einnahme ":description" aktualisiert','updated_transfer' => 'Umbuchung ":description" aktualisiert',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Ausgabe ":description" löschen','delete_deposit' => 'Einnahme ":description" löschen','delete_transfer' => 'Umbuchung ":description" löschen',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Diese Buchung ist mit der Rechnung <a href=":route">:name</a> verknüpft. Um diese Verbindung aufzuheben, deaktivieren Sie das Kontrollkästchen. Verwenden Sie Regeln, um es mit einer anderen Rechnung zu verbinden.','transaction_stored_link' => '<a href="transactions/show/{ID}">Buchung #{ID} ("{title}")</a> wurde gespeichert.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Buchung #{ID}</a> wurde gespeichert.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Buchung#{ID}</a> wurde aktualisiert.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'Die erste Aufteilung bestimmt den Wert dieses Feldes','first_split_overrules_source' => 'Die erste Aufteilung könnte das Quellkonto überschreiben','first_split_overrules_destination' => 'Die erste Aufteilung könnte das Zielkonto überschreiben',diff --git a/resources/lang/el_GR/firefly.php b/resources/lang/el_GR/firefly.phpindex dd642a3a77..fb967db142 100644--- a/resources/lang/el_GR/firefly.php+++ b/resources/lang/el_GR/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Ενημερώθηκε η ανάληψη ":description"','updated_deposit' => 'Ενημερώθηκε η κατάθεση ":description"','updated_transfer' => 'Ενημερώθηκε η μεταφορά ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Διαγραφή ανάληψης ":description"','delete_deposit' => 'Διαγραφή κατάθεσης ":description"','delete_transfer' => 'Διαγραφή μεταφοράς ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Αυτή η συναλλαγή συνδέεται με το πάγιο έξοδο <a href=":route">:name</a>. Για να καταργήσετε τη σύνδεση, καταργήστε την επιλογή στο κουτάκι. Χρησιμοποιήστε κανόνες για να το συνδέσετε με ένα άλλο πάγιο έξοδο.','transaction_stored_link' => '<a href="transactions/show/{ID}">Η συναλλαγή #{ID} ("{title}")</a> έχει αποθηκευτεί.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Η συναλλαγή #{ID}</a> έχει αποθηκευτεί.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Η συναλλαγή #{ID}</a> έχει ενημερωθεί.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/en_GB/firefly.php b/resources/lang/en_GB/firefly.phpindex abf4734f04..8f0cb7b527 100644--- a/resources/lang/en_GB/firefly.php+++ b/resources/lang/en_GB/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Updated withdrawal ":description"','updated_deposit' => 'Updated deposit ":description"','updated_transfer' => 'Updated transfer ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Delete withdrawal ":description"','delete_deposit' => 'Delete deposit ":description"','delete_transfer' => 'Delete transfer ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'This transaction is linked to bill <a href=":route">:name</a>. To remove the connection, untick the checkbox. Use rules to connect it to another bill.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex 4eb85e912f..248c83fb3f 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Updated withdrawal ":description"','updated_deposit' => 'Updated deposit ":description"','updated_transfer' => 'Updated transfer ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Delete withdrawal ":description"','delete_deposit' => 'Delete deposit ":description"','delete_transfer' => 'Delete transfer ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'This transaction is linked to bill <a href=":route">:name</a>. To remove the connection, uncheck the checkbox. Use rules to connect it to another bill.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/es_ES/firefly.php b/resources/lang/es_ES/firefly.phpindex 12cb40d692..acb524fc84 100644--- a/resources/lang/es_ES/firefly.php+++ b/resources/lang/es_ES/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Retiro actualizado','updated_deposit' => 'Actualización de deposito ":description"','updated_transfer' => 'Transferencia actualizada ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Eliminar ":description"','delete_deposit' => 'Eliminar deposito ":description"','delete_transfer' => 'Eliminar transferencia ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Esta transacción está vinculada a la factura <a href=":route">:name</a>. Para eliminar la conexión, desmarca la casilla de verificación. Usa reglas para conectarla a otra factura.','transaction_stored_link' => '<a href="transactions/show/{ID}">La transacción #{ID} ("{title}")</a> ha sido almacenada.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">La transacción #{ID}</a> ha sido guardada.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">La transacción #{ID}</a> ha sido actualizada.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/fi_FI/firefly.php b/resources/lang/fi_FI/firefly.phpindex c217a649ae..5531fb6912 100644--- a/resources/lang/fi_FI/firefly.php+++ b/resources/lang/fi_FI/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Päivitettiin nosto ":description"','updated_deposit' => 'Päivitettiin talletus ":description"','updated_transfer' => 'Päivitettiin siirto ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Poista nosto ":description"','delete_deposit' => 'Poista talletus ":description"','delete_transfer' => 'Poista siirto ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Tämä tapahtuma liittyy laskuun <a href=":route">:name</a>. Jos haluat poistaa yhteyden, poista valinta liitos-valintaruudusta. Käytä sääntöjä yhdistääksesi tapahtuma toiseen laskuun.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.phpindex 613183ba8c..834624588a 100644--- a/resources/lang/fr_FR/firefly.php+++ b/resources/lang/fr_FR/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Dépense ":description" mise à jour','updated_deposit' => 'Dépôt ":description" mis à jour','updated_transfer' => 'Transfert ":description" mis à jour',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Supprimer la dépense ":description"','delete_deposit' => 'Supprimer le dépôt ":description"','delete_transfer' => 'Supprimer le transfert ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Cette opération est liée à la facture <a href=":route">:name</a>. Pour supprimer l\'association, décocher la case. Utilisez les règles pour la connecter à une autre facture.','transaction_stored_link' => '<a href="transactions/show/{ID}">L\'opération n°{ID} ("{title}")</a> a été enregistrée.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">L\'opération n°{ID}</a> a été enregistrée.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">L\'opération n°{ID}</a> a été mise à jour.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'La première ventilation détermine la valeur de ce champ','first_split_overrules_source' => 'La première ventilation peut remplacer le compte source','first_split_overrules_destination' => 'La première ventilation peut remplacer le compte de destination',diff --git a/resources/lang/hu_HU/firefly.php b/resources/lang/hu_HU/firefly.phpindex 58e5ed8c10..ad802163f7 100644--- a/resources/lang/hu_HU/firefly.php+++ b/resources/lang/hu_HU/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Költség frissítve ":description"','updated_deposit' => '":description" bevétel frissítve','updated_transfer' => 'Átvezetés frissítve ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Költség törölve ":description"','delete_deposit' => '":description" bevétel törlése','delete_transfer' => 'Átvezetés törlése ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Ez a tranzakció <a href=":route">:name</a> számlához van csatolva. A kapcsolat eltávolításához ki kell venni a jelölést a jelölőnégyzetből. Szabályok használatával másik számlához lehet csatolni.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> mentve.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> mentve.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/id_ID/firefly.php b/resources/lang/id_ID/firefly.phpindex 15d6569947..39342989d7 100644--- a/resources/lang/id_ID/firefly.php+++ b/resources/lang/id_ID/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Penarikan yang telah diupdate ":description"','updated_deposit' => 'Deposit Diperbarui ":description"','updated_transfer' => 'Transfer yang diperbarui ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Hapus penarikan ":description"','delete_deposit' => 'Hapus deposit ":description"','delete_transfer' => 'Hapus transfer ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'This transaction is linked to bill <a href=":route">:name</a>. To remove the connection, uncheck the checkbox. Use rules to connect it to another bill.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/it_IT/firefly.php b/resources/lang/it_IT/firefly.phpindex 62be627593..acd4c9a9dd 100644--- a/resources/lang/it_IT/firefly.php+++ b/resources/lang/it_IT/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Prelievo ":description" aggiornato','updated_deposit' => 'Entrata aggiornata ":description"','updated_transfer' => 'Trasferimento ":description" aggiornato',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Elimina prelievo ":description"','delete_deposit' => 'Elimina entrata ":description"','delete_transfer' => 'Elimina trasferimento ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Questa transazione è collegata alla bolletta <a href=":route">:name</a>. Per rimuovere il collegamento, deseleziona la casella di controllo. Usa le regole per collegarla ad un\'altra bolletta.','transaction_stored_link' => 'La <a href="transactions/show/{ID}">transazione #{ID} ("{title}")</a> è stata salvata.','transaction_new_stored_link' => 'La <a href="transactions/show/{ID}">transazione #{ID}</a> è stata salvata.',- 'transaction_updated_link' => 'La <a href="transactions/show/{ID}">transazione #{ID}</a> è stata aggiornata.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'La prima suddivisione determina il valore di questo campo','first_split_overrules_source' => 'La prima suddivisione potrebbe sovrascrivere l\'account di origine','first_split_overrules_destination' => 'La prima suddivisione potrebbe sovrascrivere l\'account di destinazione',diff --git a/resources/lang/nb_NO/firefly.php b/resources/lang/nb_NO/firefly.phpindex ba64794a5b..d10ddc0641 100644--- a/resources/lang/nb_NO/firefly.php+++ b/resources/lang/nb_NO/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Oppdatert uttak ":description"','updated_deposit' => 'Oppdatert innskudd ":description"','updated_transfer' => 'Oppdatert overføring ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Slett uttak ":description"','delete_deposit' => 'Slett innskudd ":description"','delete_transfer' => 'Slett overføring ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Denne transaksjonen er knyttet til regning <a href=":route">:name</a>. Hvis du vil fjerne knytningen, fjerner du avmerkingen. Bruke regler for å koble den til en annen regning.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.phpindex a96ef6a791..95abf012c7 100644--- a/resources/lang/nl_NL/firefly.php+++ b/resources/lang/nl_NL/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Uitgave ":description" geüpdatet','updated_deposit' => 'Inkomsten ":description" geüpdatet','updated_transfer' => 'Overschrijving ":description" geüpdatet',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Verwijder uitgave ":description"','delete_deposit' => 'Verwijder inkomsten ":description"','delete_transfer' => 'Verwijder overschrijving ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Deze transactie is gekoppeld aan contract <a href=":route">:name</a>. Om de verbinding te verwijderen haal je het vinkje weg. Gebruik regels om een ander contract te koppelen.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transactie #{ID} ("{title}")</a> is opgeslagen.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transactie #{ID}</a> is opgeslagen.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transactie #{ID}</a> is geüpdatet.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'De eerste split bepaalt wat hier staat','first_split_overrules_source' => 'De eerste split kan de bronrekening overschrijven','first_split_overrules_destination' => 'De eerste split kan de doelrekening overschrijven',diff --git a/resources/lang/pl_PL/firefly.php b/resources/lang/pl_PL/firefly.phpindex c9e2b426c5..51c3388474 100644--- a/resources/lang/pl_PL/firefly.php+++ b/resources/lang/pl_PL/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Zaktualizowano wypłatę ":description"','updated_deposit' => 'Zaktualizowano wpłatę ":description"','updated_transfer' => 'Zaktualizowano transfer ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Usunięto wypłatę ":description"','delete_deposit' => 'Usuń wpłatę ":description"','delete_transfer' => 'Usuń transfer ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Ta transakcja jest powiązana z rachunkiem <a href=":route">:name</a>. Aby usunąć to powiązanie odznacz pole wyboru. Użyj reguł aby połączyć ją z innym rachunkiem.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transakcja #{ID} ("{title}")</a> została zapisana.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transakcja #{ID}</a> została zapisana.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transakcja #{ID}</a> została zaktualizowana.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'Pierwszy podział określa wartość tego pola','first_split_overrules_source' => 'Pierwszy podział może nadpisać konto źródłowe','first_split_overrules_destination' => 'Pierwszy podział może nadpisać konto docelowe',diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.phpindex 43e3f31e0e..9960d51819 100644--- a/resources/lang/pt_BR/firefly.php+++ b/resources/lang/pt_BR/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Retirada Atualizada ":description"','updated_deposit' => 'Depósito atualizado ":description"','updated_transfer' => 'Transferência atualizada ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Excluir a retirada ":description"','delete_deposit' => 'Apagar depósito ":description"','delete_transfer' => 'Apagar transferência ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Esta transação está ligada à conta <a href=":route">:name</a>. Para remover a conexão, desmarque a caixa de seleção. Use as regras para conectá-la a outra conta.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transação #{ID} ("{title}")</a> foi salva.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transação #{ID}</a> foi salva.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transação #{ID}</a> foi atualizada.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'A primeira divisão determina o valor deste campo','first_split_overrules_source' => 'A primeira divisão pode anular a conta de origem','first_split_overrules_destination' => 'A primeira divisão pode anular a conta de destino',diff --git a/resources/lang/pt_PT/firefly.php b/resources/lang/pt_PT/firefly.phpindex 97482118df..735ce9b04a 100644--- a/resources/lang/pt_PT/firefly.php+++ b/resources/lang/pt_PT/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Alterar levantamento ":description"','updated_deposit' => 'Alterar deposito ":description"','updated_transfer' => 'Alterar transferencia ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Apagar levantamento ":description"','delete_deposit' => 'Apagar deposito ":description"','delete_transfer' => 'Apagar transferencia ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Esta transacção está ligada à conta <a href=":route">:name</a>. Para remover a ligação, desmarque a caixa de selecção. Utilize as regras para conectá-la a outra conta.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transação #{ID} ("{title}")</a> foi guardada.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transação#{ID}</a> foi guardada.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transação#{ID}</a> foi atualizada.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'A primeira divisão determina o valor deste campo','first_split_overrules_source' => 'A primeira divisão pode anular a conta de origem','first_split_overrules_destination' => 'A primeira divisão pode anular a conta de destino',diff --git a/resources/lang/ro_RO/firefly.php b/resources/lang/ro_RO/firefly.phpindex 01f9bfc967..0bcc25926b 100644--- a/resources/lang/ro_RO/firefly.php+++ b/resources/lang/ro_RO/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Retragerea ":description" actualizată','updated_deposit' => 'Depozitul ":description" actualizat','updated_transfer' => 'Transferul ":description" actualizat',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Șterge retragere ":description"','delete_deposit' => 'Șterge depozit ":description"','delete_transfer' => 'Șterge transfer ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Această tranzacție este legată de factura <a href=":route">:nume </a>. Pentru a elimina conexiunea, debifați caseta de selectare. Utilizați regulile pentru conectarea la o altă factură.','transaction_stored_link' => '<a href="transactions/show/{ID}">Tranzacția #{ID} ("{title}")</a> a fost stocată.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Tranzacția #{ID}</a> a fost stocată.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Tranzacția #{ID}</a> a fost actualizată.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/ru_RU/firefly.php b/resources/lang/ru_RU/firefly.phpindex bccfad90c0..4b4713a414 100644--- a/resources/lang/ru_RU/firefly.php+++ b/resources/lang/ru_RU/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Расход ":description" обновлён','updated_deposit' => 'Доход ":description" обновлён','updated_transfer' => 'Перевод ":description" обновлён',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Удалить расход ":description"','delete_deposit' => 'Удалить доход ":description"','delete_transfer' => 'Удалить перевод ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Эта транзакция связана со счётом на оплату <a href=":route">:name</a>. Чтобы удалить эту связь, снимите галочку. Используйте правила для связи с другим счётом на оплату.','transaction_stored_link' => '<a href="transactions/show/{ID}">Транзакция #{ID} ("{title}")</a> сохранена.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Транзакция #{ID}</a> сохранена.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Транзакция #{ID}</a> обновлена.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'В данном поле используется значение из первой части разделенной транзакции','first_split_overrules_source' => 'Значение из первой части транзакции может изменить счет источника','first_split_overrules_destination' => 'Значение из первой части транзакции может изменить счет назначения',diff --git a/resources/lang/sk_SK/firefly.php b/resources/lang/sk_SK/firefly.phpindex f02cf9cd4a..2d64ec6df1 100644--- a/resources/lang/sk_SK/firefly.php+++ b/resources/lang/sk_SK/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Výber „:description“ bol upravený','updated_deposit' => 'Vklad „:description“ bol upravený','updated_transfer' => 'Prevod „:description“ bol upravený',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Výber bol „:description“ upravený','delete_deposit' => 'Odstrániť vklad „:description“','delete_transfer' => 'Odstrániť prevod „:description“',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Táto transakcia je prepojená s účtom <a href=":route">:name</a>. Ak chcete odstrániť prepojenie, odznačte ho. Pre prepojenie s iným účtom použite pravidlá.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transakcia #{ID} ("{title}")</a> bola uložená.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transakcia #{ID}</a> bola uložená.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transakcia #{ID}</a> bola aktualizovaná.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/sv_SE/firefly.php b/resources/lang/sv_SE/firefly.phpindex 646836b8d0..41d359b11b 100644--- a/resources/lang/sv_SE/firefly.php+++ b/resources/lang/sv_SE/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Uppdatera uttag ":description"','updated_deposit' => 'Uppdatera insättning ":description"','updated_transfer' => 'Uppdatera överföring ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Ta bort uttag ":description"','delete_deposit' => 'Ta bort insättning ":description"','delete_transfer' => 'Ta bort överföring ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Transaktion länkad till nota <a href=":route">:name</a>. För att ta bort koppling, avmarkera kryssrutan. Använd regler för att koppla den till en annan nota.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaktion #{ID} ("{title}")</a> sparades.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaktion #{ID}</a> sparades.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaktion #{ID}</a> uppdaterades.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/tr_TR/firefly.php b/resources/lang/tr_TR/firefly.phpindex 69f2da9a84..dba991251c 100644--- a/resources/lang/tr_TR/firefly.php+++ b/resources/lang/tr_TR/firefly.php@@ -1156,6 +1156,9 @@ return ['updated_withdrawal' => 'Para çekme güncellendi ":description"','updated_deposit' => 'Güncellenmiş depozito ":description"','updated_transfer' => 'Güncellenmiş ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Çekimi sil ":description"','delete_deposit' => 'Mevduat sil ":description"','delete_transfer' => 'Aktarımı sil ":description"',@@ -1236,7 +1239,8 @@ return ['journal_link_bill' => 'This transaction is linked to bill <a href=":route">:name</a>. To remove the connection, uncheck the checkbox. Use rules to connect it to another bill.','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/vi_VN/firefly.php b/resources/lang/vi_VN/firefly.phpindex 41d611c36c..96ab2f9156 100644--- a/resources/lang/vi_VN/firefly.php+++ b/resources/lang/vi_VN/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => 'Cập nhật rút tiền ":description"','updated_deposit' => 'Tiền gửi cập nhật ":description"','updated_transfer' => 'Chuyển khoản cập nhật ":description"',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => 'Xóa rút tiền ":description"','delete_deposit' => 'Xóa tiền gửi ":description"','delete_transfer' => 'Xóa chuyển ":description"',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => 'Giao dịch này được liên kết với hóa đơn <a href=":route">:name</a>. Để xóa kết nối, bỏ chọn hộp kiểm. Sử dụng quy tắc để kết nối nó với hóa đơn khác.','transaction_stored_link' => '<a href="transactions/show/{ID}">Giao dịch #{ID} ("{title}")</a> đã được lưu trữ.','transaction_new_stored_link' => '<a href="transactions/show/{ID}"> Giao dịch #{ID}</a> đã được lưu trữ.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Giao dịch#{ID}</a> đã được cập nhật.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/lang/zh_CN/firefly.php b/resources/lang/zh_CN/firefly.phpindex 56e0b71134..a7512fd7ef 100644--- a/resources/lang/zh_CN/firefly.php+++ b/resources/lang/zh_CN/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => '已更新支出“:description“','updated_deposit' => '已更新收入“:description”','updated_transfer' => '已更新转账“:description”',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => '删除支出“:description”','delete_deposit' => '删除收入“:description”','delete_transfer' => '删除转账“:description”',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => '此交易已与帐单 <a href=":route">:name</a> 关联。若要移除关联,取消勾选复选框,使用规则将其与其他账单关联。','transaction_stored_link' => '<a href="transactions/show/{ID}">交易 #{ID} (“{title}”)</a> 已保存。','transaction_new_stored_link' => '<a href="transactions/show/{ID}">交易 #{ID}</a> 已保存。',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">交易 #{ID}</a> 已更新。',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => '首笔拆分决定此字段的值','first_split_overrules_source' => '首笔拆分可能覆盖来源账户','first_split_overrules_destination' => '首笔拆分可能覆盖目标账户',diff --git a/resources/lang/zh_TW/firefly.php b/resources/lang/zh_TW/firefly.phpindex f379646ac2..5be16744b0 100644--- a/resources/lang/zh_TW/firefly.php+++ b/resources/lang/zh_TW/firefly.php@@ -1155,6 +1155,9 @@ return ['updated_withdrawal' => '已更新提款 “:description“','updated_deposit' => '已更新存款 ”:description“','updated_transfer' => '已更新轉帳 “:description”',+ 'no_changes_withdrawal' => 'Withdrawal ":description" was not changed.',+ 'no_changes_deposit' => 'Deposit ":description" was not changed.',+ 'no_changes_transfer' => 'Transfer ":description" was not changed.','delete_withdrawal' => '刪除提款 “:description”','delete_deposit' => '刪除存款 “:description”','delete_transfer' => '刪除轉帳 “:description”',@@ -1235,7 +1238,8 @@ return ['journal_link_bill' => '此交易已與帳單 <a href=":route">:name</a> 鏈結。如要移除鏈結,取消核選方塊,使用規則將它與其他帳單鏈結。','transaction_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID} ("{title}")</a> has been stored.','transaction_new_stored_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been stored.',- 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> has been updated.',+ 'transaction_updated_link' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") has been updated.',+ 'transaction_updated_no_changes' => '<a href="transactions/show/{ID}">Transaction #{ID}</a> ("{title}") did not receive any changes.','first_split_decides' => 'The first split determines the value of this field','first_split_overrules_source' => 'The first split may overrule the source account','first_split_overrules_destination' => 'The first split may overrule the destination account',diff --git a/resources/views/v2/partials/layout/flashes.twig b/resources/views/v2/partials/layout/flashes.twigindex 683b516a86..7b0b15d815 100644--- a/resources/views/v2/partials/layout/flashes.twig+++ b/resources/views/v2/partials/layout/flashes.twig@@ -3,7 +3,7 @@<div class="row"><div class="col"><!-- alert from URL -->- <div class="alert alert-success alert-dismissible" v-if="successMessage.length > 0">+ <div class="alert alert-success alert-dismissible"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h5><i class="icon fas fa-thumbs-up"></i> {{ 'flash_success'|_ }}</h5><span>@@ -18,4 +18,25 @@</div></div></div>+{% endif %}++{% if session_has('warning') %}+ <div class="row">+ <div class="col">+ <!-- alert from URL -->+ <div class="alert alert-warning alert-dismissible">+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>+ <h5><i class="icon fas fa-exclamation-triangle"></i> {{ 'flash_warning'|_ }}</h5>+ <span>+ {% if session_has('warning_uri') %}+ <a href="{{ session('warning_uri') }}" style="color:rgb(31, 45, 61);">+ {% endif %}+ {{ session('warning') }}+ {% if session_has('warning_uri') %}+ </a>+ {% endif %}+ </span>+ </div>+ </div>+ </div>{% endif %}\ No newline at end of file