2021-01-03 07:11:44 +01:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{301:function(t,e,n){t.exports=n(412)},412:function(t,e,n){"use strict";n.r(e);var i=n(22),r=n(3),s=n(33),a=n(32);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=Object(r.b)("transactions/create"),d=(l.mapState,l.mapGetters),p=(l.mapActions,l.mapMutations),f={props:["index"],components:{VueTypeaheadBootstrap:s.a},name:"TransactionDescription",data:function(){return{descriptions:[],query:"",initialSet:[]}},created:function(){var t=this;axios.get(this.getACURL("")).then((function(e){t.descriptions=e.data,t.initialSet=e.data}))},methods:o(o({},p(["updateField"])),{},{clearDescription:function(){this.selectedDescription=""},getACURL:function(t){return document.getElementsByTagName("base")[0].href+"api/v1/autocomplete/transactions?query="+t},lookupDescription:Object(a.debounce)((function(){var t=this;axios.get(this.getACURL(this.query)).then((function(e){t.descriptions=e.data}))}),300)}),computed:o(o({},d(["transactionType","transactions"])),{},{selectedDescription:{get:function(){return this.transactions[this.index].description},set:function(t){this.updateField({field:"description",index:this.index,value:t})}}})},h=n(1),m=Object(h.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"form-group"},[n("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n "+t._s(t.$t("firefly.description"))+"\n ")]),t._v(" "),n("vue-typeahead-bootstrap",{attrs:{inputName:"description[]",data:t.descriptions,placeholder:t.$t("firefly.description"),showOnFocus:!0,autofocus:"",minMatchingChars:3,serializer:function(t){return t.description}},on:{hit:function(e){t.selectedDescription=e},input:t.lookupDescription},model:{value:t.query,callback:function(e){t.query=e},expression:"query"}},[n("template",{slot:"append"},[n("div",{staticClass:"input-group-append"},[n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.clearDescription}},[n("i",{staticClass:"far fa-trash-alt"})])])])],2)],1)}),[],!1,null,"6b4b3ea7",null).exports;function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=Object(r.b)("transactions/create"),_=(g.mapState,g.mapGetters),O=(g.mapActions,{name:"TransactionDate",props:["value","index"],methods:b({},(0,g.mapMutations)(["updateField"])),computed:b(b({},_(["transactionType","transactions"])),{},{date:{get:function(){return this.transactions[0].date},set:function(t){this.updateField({field:"date",index:this.index,value:t})}},time:{get:function(){return this.transactions[0].time},set:function(t){this.updateField({field:"time",index:this.index,value:t})}}})}),x=Object(h.a)(O,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"form-group"},[n("div",{staticClass:"text-xs d-none d-lg-block d-x
|