{"version":3,"sources":["webpack:///./modules/invoices/pages/MyInvoices.vue?0677","webpack:///./modules/invoices/components/InvoiceTable.vue?87ce","webpack:///./modules/invoices/components/InvoiceTable.vue","webpack:///./modules/invoices/components/InvoiceTable.vue?e704","webpack:///./modules/invoices/components/InvoiceTable.vue?0ae0","webpack:///./modules/invoices/pages/MyInvoices.vue","webpack:///./modules/invoices/pages/MyInvoices.vue?4283","webpack:///./modules/invoices/pages/MyInvoices.vue?58f9","webpack:///./shared/filters/money.ts","webpack:///./shared/filters/dateflip.ts","webpack:///./shared/global/components/DownloadButton.vue?b3ee","webpack:///./shared/global/components/DownloadButton.vue","webpack:///./shared/global/components/DownloadButton.vue?88ac","webpack:///./shared/global/components/DownloadButton.vue?c2ac"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","allInvoices","staticRenderFns","staticClass","headers","invoices","pagination","rowsPerPageItems","on","$event","scopedSlots","_u","key","fn","props","_v","_s","item","invoice_id","invoice_description","_f","invoice_date","amount_excl_vat","amount_incl_vat","url","InvoiceTable","text","t","value","sortable","rowsPerPage","sortBy","descending","$t","toString","required","filters","dateFlip","money","component","GDownloadButton","VDataTable","iStore","snackStore","MyInvoices","fetchInvoices","catch","defaultError","Getter","Action","Mutation","components","VContainer","VFlex","VLayout","v","Math","round","Number","parts","split","replace","padEnd","join","reverse","downloadLink","label","base","location","endsWith","protocol","hostname","port","type","String","default","VBtn"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQ,GAAG,eAAe,KAAK,CAACF,EAAG,WAAW,CAACE,MAAM,CAAC,IAAM,GAAG,KAAO,KAAK,CAACF,EAAG,SAAS,CAACE,MAAM,CAAC,KAAO,GAAG,IAAM,KAAK,CAACF,EAAG,gBAAgB,CAACE,MAAM,CAAC,SAAWN,EAAIO,gBAAgB,IAA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A,EAAM,GAAKA,EAAM,GAAK,IAAIG,OAAO,EAAG,KACzC,KAAOH,EAAMI,KAAK,O,oCCPb,gBAAWR,GACvB,OAAKA,EACEA,EAAEK,MAAM,KAAKI,UAAUD,KAAK,KADpB,K,oCCDjB,IAAItE,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAON,EAAIuE,aAAa,OAAS,SAAS,MAAQ,GAAG,MAAQ,UAAU,KAAO,GAAG,YAAY,oBAAoB,CAACvE,EAAIqB,GAAG,OAAOrB,EAAIsB,GAAGtB,EAAIwE,OAAO,SACjQhE,EAAkB,G,uuDCiBtB,IAAqB,EAArB,wHAIE,WACE,IAAIiE,EAAO,eAAU,UAAWxE,KAAKyE,UAErC,OADAD,GAAQA,EAAKE,SAAS,KAAO,GAAK,IAC3BF,EAAOxE,KAAK6B,MAPvB,oBAUE,WACE,OACE4C,SAASE,SACT,KACAF,SAASG,UACRH,SAASI,KAAO,IAAMJ,SAASI,KAAO,QAf7C,GAA4C,QACF,gBAAvC,eAAK,CAAErC,UAAU,EAAMsC,KAAMC,U,0BACe,gBAA5C,eAAK,CAAED,KAAMC,OAAQC,QAAS,c,4BAFZ,EAAc,gBADlC,QACoB,WClBsY,I,6CCOvZpC,EAAY,eACd,EACA9C,EACAS,GACA,EACA,KACA,KACA,MAIa,OAAAqC,EAAiB,QAKhC,IAAkBA,EAAW,CAACqC,OAAA","file":"js/chunk-2e3b85f3.3e328c69.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{attrs:{\"fluid\":\"\",\"grid-list-lg\":\"\"}},[_c('v-layout',{attrs:{\"row\":\"\",\"wrap\":\"\"}},[_c('v-flex',{attrs:{\"xs12\":\"\",\"xl9\":\"\"}},[_c('invoice-table',{attrs:{\"invoices\":_vm.allInvoices}})],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-data-table',{staticClass:\"elevation-1\",attrs:{\"headers\":_vm.headers,\"items\":_vm.invoices,\"pagination\":_vm.pagination,\"rows-per-page-items\":_vm.rowsPerPageItems},on:{\"update:pagination\":function($event){_vm.pagination=$event}},scopedSlots:_vm._u([{key:\"items\",fn:function(props){return [_c('td',{attrs:{\"data-name\":\"invoice-table-id\"}},[_vm._v(_vm._s(props.item.invoice_id))]),_c('td',[_vm._v(_vm._s(props.item.invoice_description))]),_c('td',[_vm._v(_vm._s(_vm._f(\"dateFlip\")(props.item.invoice_date)))]),_c('td',[_vm._v(_vm._s(_vm._f(\"money\")(props.item.amount_excl_vat)))]),_c('td',[_vm._v(_vm._s(_vm._f(\"money\")(props.item.amount_incl_vat)))]),_c('td',[_c('g-download-button',{attrs:{\"url\":props.item.url}})],1)]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Prop } from \"vue-property-decorator\";\nimport { InvoiceModel } from \"../models\";\nimport dateFlip from \"shared/filters/dateflip\";\nimport money from \"shared/filters/money\";\n\n@Component({\n filters: {\n dateFlip,\n money,\n },\n})\nexport default class InvoiceTable extends Vue {\n @Prop({ required: true })\n invoices!: InvoiceModel[];\n\n headers = [\n { text: this.t(\"invoiceID\"), value: \"invoice_id\" },\n { text: this.t(\"description\"), value: \"invoice_description\" },\n { text: this.t(\"invoiceDate\"), value: \"invoice_date\" },\n { text: this.t(\"amountExclVat\"), value: \"amount_excl_vat\" },\n { text: this.t(\"amountInclVat\"), value: \"amount_incl_vat\" },\n { text: this.t(\"download\"), value: \"invoice_id\", sortable: false },\n ];\n\n pagination = {\n rowsPerPage: 15,\n sortBy: \"invoice_date\",\n descending: true,\n };\n\n rowsPerPageItems = [\n 5,\n 15,\n 25,\n { text: \"$vuetify.dataIterator.rowsPerPageAll\", value: -1 },\n ];\n\n private t(key: string): string {\n return this.$t(\"invoices.table.\" + key).toString();\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--12-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceTable.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--12-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceTable.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./InvoiceTable.vue?vue&type=template&id=54831818&\"\nimport script from \"./InvoiceTable.vue?vue&type=script&lang=ts&\"\nexport * from \"./InvoiceTable.vue?vue&type=script&lang=ts&\"\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 null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport GDownloadButton from 'shared/global/components/DownloadButton.vue'\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\ninstallComponents(component, {GDownloadButton,VDataTable})\n","\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\nimport { InvoiceModel } from \"../models\";\n\nimport InvoiceTable from \"../components/InvoiceTable.vue\";\n\nconst iStore = namespace(\"invoices\");\nconst snackStore = namespace(\"snackbar\");\n\n@Component({\n components: { InvoiceTable },\n})\nexport default class MyInvoices extends Vue {\n @iStore.Getter allInvoices!: InvoiceModel;\n\n @iStore.Action fetchInvoices!: () => Promise;\n\n @snackStore.Mutation defaultError!: () => void;\n\n mounted(): void {\n this.fetchInvoices().catch(() => {\n this.defaultError();\n });\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--12-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MyInvoices.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--12-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MyInvoices.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./MyInvoices.vue?vue&type=template&id=2c18307a&\"\nimport script from \"./MyInvoices.vue?vue&type=script&lang=ts&\"\nexport * from \"./MyInvoices.vue?vue&type=script&lang=ts&\"\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 null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VFlex } from 'vuetify/lib/components/VGrid';\nimport { VLayout } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VContainer,VFlex,VLayout})\n","export default function (v: string | number | null): string {\n if (!v) return \"€ 0,00\";\n\n v = (Math.round(Number(v) * 100) / 100).toString();\n const parts = v.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n parts[1] = (parts[1] ? parts[1] : \"\").padEnd(2, \"0\");\n return \"€ \" + parts.join(\",\");\n}\n","export default function (v: string | null): string {\n if (!v) return \"\";\n return v.split(\"-\").reverse().join(\"-\");\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-btn',{attrs:{\"href\":_vm.downloadLink,\"target\":\"_blank\",\"small\":\"\",\"color\":\"primary\",\"dark\":\"\",\"data-name\":\"download-button\"}},[_vm._v(\"\\n \"+_vm._s(_vm.label)+\"\\n\")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Prop } from \"vue-property-decorator\";\nimport envLoader from \"shared/env-loader\";\n\n@Component\nexport default class DownloadButton extends Vue {\n @Prop({ required: true, type: String }) public url!: string;\n @Prop({ type: String, default: \"Download\" }) public label!: string;\n\n get downloadLink(): string {\n let base = envLoader(\"API_URL\", this.location);\n base += base.endsWith(\"/\") ? \"\" : \"/\";\n return base + this.url;\n }\n\n get location(): string {\n return (\n location.protocol +\n \"//\" +\n location.hostname +\n (location.port ? \":\" + location.port : \"\")\n );\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--12-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DownloadButton.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--12-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DownloadButton.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DownloadButton.vue?vue&type=template&id=65572db0&\"\nimport script from \"./DownloadButton.vue?vue&type=script&lang=ts&\"\nexport * from \"./DownloadButton.vue?vue&type=script&lang=ts&\"\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 null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\ninstallComponents(component, {VBtn})\n"],"sourceRoot":""}