{"version":3,"sources":["webpack:///./src/mixins/formatDateMixin.js","webpack:///./src/components/invoices/invoice-file-preview.vue?a3be","webpack:///src/components/invoices/invoice-file-preview.vue","webpack:///./src/components/invoices/invoice-file-preview.vue?5e78","webpack:///./src/components/invoices/invoice-file-preview.vue","webpack:///./src/router/views/finance.vue?348c","webpack:///./src/components/invoices/invoices-list.vue?8451","webpack:///src/components/invoices/invoices-list.vue","webpack:///./src/components/invoices/invoices-list.vue?5d2b","webpack:///../../../src/components/VPagination/VPagination.ts","webpack:///./src/components/invoices/invoices-list.vue","webpack:///src/router/views/finance.vue","webpack:///./src/router/views/finance.vue?6030","webpack:///./src/router/views/finance.vue","webpack:///./src/components/general/file-preview-container.vue?2db5","webpack:///./src/components/general/file-preview-container.vue?9e32","webpack:///src/components/general/file-preview-container.vue","webpack:///./src/components/general/file-preview-container.vue?a107","webpack:///./src/components/general/file-preview-container.vue"],"names":["methods","renderDate","dateTime","timeZone","format","date","dayjs","tz","this","$d","renderTime","time","renderTime24","render","_vm","_h","$createElement","_c","_self","attrs","on","$event","$emit","model","value","callback","$$v","show","expression","_v","_s","$t","invoice","staticClass","isDownloadingFile","fileData","fileDefinition","staticRenderFns","name","components","FilePreviewContainer","mixins","baseMixin","props","type","Object","required","Boolean","data","computed","watch","n","o","downloadFile","downloadInvoiceFile","result","invoiceID","isSuccess","fileName","component","VBtn","VCard","VCardText","VCardTitle","VDialog","VIcon","downloadInvoice","showDownloadDialog","headers","invoices","pageSize","isLoadingInvoices","currentPage","scopedSlots","_u","key","fn","ref","item","invoiceNumber","invoiceDateUTC","locationTimeZone","datePaidUTC","renderIssuedTo","$n","exGSTAmount","taxAmount","_g","_b","viewInvoice","serverCurrentPage","pageCount","updatePage","formatDateMixin","invoicesTotal","currentUser","Math","floor","created","page","$route","query","pageInt","parseInt","mounted","async","getInvoices","groupInvoice","groupName","multipleLocations","clientName","locationName","invoiceId","$router","push","invoiceItem","$vuetify","goTo","onVisible","directives","Resize","circle","disabled","length","default","validator","val","nextIcon","prevIcon","totalVisible","Number","pageAriaLabel","currentPageAriaLabel","previousAriaLabel","nextAriaLabel","wrapperAriaLabel","maxButtons","selected","themeClasses","maxLength","range","even","left","right","firstItem","lastItem","start","end","secondItem","beforeLastItem","setTimeout","width","$el","parentElement","window","e","from","i","h","class","label","click","color","isCurrentPage","ariaLabel","setBackgroundColor","lang","t","items","map","index","isNaN","genItem","modifiers","quiet","onResize","classes","children","genIcon","rtl","genItems","role","genList","VDataTable","VPagination","VTooltip","title","meta","rerender","_e","staticStyle","fileType","emptyStateTitle","emptyStateDescription","EmptyStateBlock","String","loading","includes","$nextTick","VImg","VSkeletonLoader"],"mappings":"2IAAA,gBACe,QACbA,QAAS,CACPC,WAAWC,EAAUC,EAAUC,EAAS,MACtC,IAAIC,EAAOC,eAAMJ,GAAUK,GAAGJ,GAE9B,OADAE,EAAiB,MAAVD,EAAiBC,EAAOA,EAAKD,OAAOA,GACpCI,KAAKC,GAAGJ,IAEjBK,WAAWR,GACT,MAAMS,EAAOL,eAAMJ,GACnB,OAAOM,KAAKC,GAAGE,EAAM,SAEvBC,aAAaV,GACX,MAAMS,EAAOL,eAAMJ,GACnB,OAAOM,KAAKC,GAAGE,EAAM,c,oCCd3B,IAAIE,EAAS,WAAa,IAAIC,EAAIN,KAASO,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,UAAU,CAACA,EAAG,WAAW,CAACE,MAAM,CAAC,WAAa,GAAG,eAAe,GAAG,WAAa,GAAG,qBAAqB,GAAG,WAAa,4BAA4BC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOP,EAAIQ,MAAM,iBAAiBC,MAAM,CAACC,MAAOV,EAAQ,KAAEW,SAAS,SAAUC,GAAMZ,EAAIa,KAAKD,GAAKE,WAAW,SAAS,CAACX,EAAG,SAAS,CAACA,EAAG,eAAe,CAACH,EAAIe,GAAGf,EAAIgB,GAAKhB,EAAIiB,GAAG,uBAA0B,KA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B,SAAS,KAAOrB,EAAIiL,eAAe,GAAxf9K,EAAG,UAAU,CAACA,EAAG,kBAAkB,CAACE,MAAM,CAAC,KAAO,WAAW,MAAQL,EAAIkL,iBAAmBlL,EAAIiB,GAAG,yCAAyC,YAAcjB,EAAImL,sBAAsB,OAAS,OAAO,IAAwT,IAC5xB5J,EAAkB,G,oCCkCtB,GACEC,KAAM,uBACNC,WAAY,CACV2J,gBAAJ,QAEEzJ,OAAQ,CAACC,EAAX,MACEC,MAAO,CACLR,SAAU,CACRS,KAAMuJ,OACNrJ,UAAU,GAEZV,eAAgB,CACdQ,KAAMC,OACNC,UAAU,GAEZsJ,QAAS,CACPxJ,KAAMG,SAERiJ,gBAAiB,CACfpJ,KAAMuJ,OACNvE,QAAS,IAEXqE,sBAAuB,CACrBrJ,KAAMuJ,OACNvE,QAAS,KAGb5E,KAAM,KACG,CACL4I,UAAU,IAGd3I,SAAU,CACR,WACE,IAAN,MACQ,OAAO,OAAf,aAAe,CAAf,8DACA,MACQ,OAAO,OAGX,YACE,MAAML,EAAOpC,KAAKuL,SAClB,QAAKnJ,GACEA,EAAKyJ,SAAS,WAGzBnJ,MAAO,CACLf,SAAU,CACR,gBACE3B,KAAKoL,UAAW,QACVpL,KAAK8L,YACX9L,KAAKoL,UAAW,MCtFuV,I,qECQ3WjI,EAAY,eACd,EACA9C,EACAwB,GACA,EACA,KACA,KACA,MAIa,OAAAsB,EAAiB,QAMhC,IAAkBA,EAAW,CAAC4I,OAAA,KAAKC,kBAAA,Q","file":"js/chunk-102d8a90.d9b409f2.js","sourcesContent":["import dayjs from '@/services/date'\nexport default {\n  methods: {\n    renderDate(dateTime, timeZone, format = null) {\n      let date = dayjs(dateTime).tz(timeZone)\n      date = format == null ? date : date.format(format)\n      return this.$d(date)\n    },\n    renderTime(dateTime) {\n      const time = dayjs(dateTime)\n      return this.$d(time, 'time')\n    },\n    renderTime24(dateTime) {\n      const time = dayjs(dateTime)\n      return this.$d(time, 'time24')\n    },\n  },\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('v-dialog',{attrs:{\"fullscreen\":\"\",\"hide-overlay\":\"\",\"persistent\":\"\",\"no-click-animation\":\"\",\"transition\":\"dialog-bottom-transition\"},on:{\"input\":function($event){return _vm.$emit('update:show')}},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-card',[_c('v-card-title',[_vm._v(_vm._s(((_vm.$t('finance.invoiceText')) + \" #\" + (_vm.invoice.invoiceNumber)))+\" \"),_c('v-btn',{staticClass:\"ml-auto\",attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.$emit('update:show', false)}}},[_c('v-icon',[_vm._v(\"mdi-close\")])],1)],1),_c('v-card-text',[_c('FilePreviewContainer',{staticClass:\"mt-4\",attrs:{\"loading\":_vm.isDownloadingFile,\"file-data\":_vm.fileData,\"file-definition\":_vm.fileDefinition,\"empty-state-title\":_vm.$t('finance.invoiceFileNotAvailableText')}})],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<script>\nimport { mapActions, mapGetters } from 'vuex'\nimport baseMixin from '@/mixins/baseMixin'\nimport FilePreviewContainer from '../general/file-preview-container.vue'\n\nexport default {\n  name: 'InvoiceFilePreview',\n  components: {\n    FilePreviewContainer,\n  },\n  mixins: [baseMixin],\n  props: {\n    invoice: {\n      type: Object,\n      required: true,\n    },\n    show: {\n      type: Boolean,\n      required: true,\n    },\n  },\n  data: () => {\n    return {\n      fileData: '',\n      fileDefinition: {},\n    }\n  },\n  computed: {\n    ...mapGetters({\n      isDownloadingFile: 'invoices/isDownloadingFile',\n    }),\n  },\n  watch: {\n    show(n, o) {\n      if (n) {\n        this.downloadFile()\n      } else {\n        this.fileData = ''\n        this.fileDefinition = {}\n      }\n    },\n  },\n  methods: {\n    ...mapActions({\n      downloadInvoiceFile: 'invoices/downloadInvoiceFile',\n    }),\n    async downloadFile() {\n      const result = await this.downloadInvoiceFile(this.invoice.invoiceID)\n\n      if (!result.isSuccess) return\n\n      this.fileData = result.data\n      this.fileDefinition = {\n        fileName: 'invoice.pdf',\n      }\n    },\n  },\n}\n</script>\n\n<template>\n  <section>\n    <v-dialog\n      v-model=\"show\"\n      fullscreen\n      hide-overlay\n      persistent\n      no-click-animation\n      transition=\"dialog-bottom-transition\"\n      @input=\"$emit('update:show')\"\n    >\n      <v-card>\n        <v-card-title\n          >{{ `${$t('finance.invoiceText')} #${invoice.invoiceNumber}` }}\n          <v-btn class=\"ml-auto\" icon @click=\"$emit('update:show', false)\">\n            <v-icon>mdi-close</v-icon>\n          </v-btn>\n        </v-card-title>\n        <v-card-text>\n          <FilePreviewContainer\n            :loading=\"isDownloadingFile\"\n            :file-data=\"fileData\"\n            :file-definition=\"fileDefinition\"\n            :empty-state-title=\"$t('finance.invoiceFileNotAvailableText')\"\n            class=\"mt-4\"\n          />\n        </v-card-text>\n      </v-card>\n    </v-dialog>\n  </section>\n</template>\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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./invoice-file-preview.vue?vue&type=script&lang=js&\"; 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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./invoice-file-preview.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./invoice-file-preview.vue?vue&type=template&id=02eb1300&\"\nimport script from \"./invoice-file-preview.vue?vue&type=script&lang=js&\"\nexport * from \"./invoice-file-preview.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  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';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\ninstallComponents(component, {VBtn,VCard,VCardText,VCardTitle,VDialog,VIcon})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Layout',[_c('BasePageTitle',{attrs:{\"title\":_vm.$t('finance.financePageTitle')}}),_c('InvoicesList',{on:{\"downloadInvoice\":_vm.downloadInvoice}}),_c('InvoiceFilePreview',{attrs:{\"show\":_vm.showDownloadDialog,\"invoice\":_vm.invoice},on:{\"update:show\":function($event){_vm.showDownloadDialog=$event}}})],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('div',[_c('v-data-table',{staticClass:\"elevation-1 mt-2\",attrs:{\"id\":\"invoicesTable\",\"headers\":_vm.headers,\"items\":_vm.invoices,\"items-per-page\":_vm.pageSize,\"loading\":_vm.isLoadingInvoices,\"mobile-breakpoint\":960,\"no-data-text\":_vm.$t('finance.noInvoicesText'),\"page\":_vm.currentPage,\"hide-default-footer\":\"\",\"loading-text\":_vm.$t('finance.invoicesLoadingText')},on:{\"update:page\":function($event){_vm.currentPage=$event}},scopedSlots:_vm._u([{key:\"item.paidStatus\",fn:function(ref){\nvar item = ref.item;\nreturn [(item.datePaidUTC)?_c('span',{staticClass:\"paid-status-span green--text\"},[_vm._v(\" \"+_vm._s(_vm.$t('finance.invoicePaidText'))+\" \")]):_c('span',{staticClass:\"paid-status-span red--text\"},[_vm._v(\" \"+_vm._s(_vm.$t('finance.invoiceNotPaidText'))+\" \")])]}},{key:\"item.invoiceNumber\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{staticClass:\"font-monospace\"},[_vm._v(_vm._s(item.invoiceNumber))])]}},{key:\"item.invoiceDateUTC\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{staticClass:\"font-monospace\"},[_vm._v(_vm._s(_vm.renderDate(item.invoiceDateUTC, item.locationTimeZone)))])]}},{key:\"item.datePaidUTC\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{staticClass:\"font-monospace\"},[_vm._v(_vm._s(item.datePaidUTC ? _vm.renderDate(item.datePaidUTC, item.locationTimeZone) : ''))])]}},{key:\"item.issuedTo\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{staticClass:\"issued-to-span\"},[_vm._v(_vm._s(_vm.renderIssuedTo(item)))])]}},{key:\"item.amount\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('span',{staticClass:\"amount-span font-monospace\"},[_vm._v(\" \"+_vm._s(_vm.$n(item.exGSTAmount + item.taxAmount, 'currency'))+\" \")])]}},{key:\"item.action\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex justify-end\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary\",\"dark\":\"\",\"small\":\"\",\"text\":\"\"},on:{\"click\":function($event){return _vm.downloadInvoice(item)}}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\" mdi-cloud-download \")])],1)]}}],null,true)},[_c('span',[_vm._v(_vm._s(_vm.$t('finance.invoiceDownloadButtonTip')))])]),_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary\",\"dark\":\"\",\"small\":\"\",\"text\":\"\"},on:{\"click\":function($event){return _vm.viewInvoice(item.invoiceNumber)}}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\" mdi-text-box-search-outline \")])],1)]}}],null,true)},[_c('span',[_vm._v(_vm._s(_vm.$t('finance.invoiceViewButtonTip')))])])],1)]}}],null,true)}),_c('v-pagination',{staticClass:\"my-4\",attrs:{\"value\":_vm.serverCurrentPage,\"length\":_vm.pageCount},on:{\"input\":_vm.updatePage}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<script>\nimport { mapActions, mapGetters } from 'vuex'\nimport formatDateMixin from '@/mixins/formatDateMixin'\n\nexport default {\n  name: 'InvoicesList',\n  mixins: [formatDateMixin],\n  data() {\n    return {\n      headers: [\n        {\n          text: this.$t('finance.invoicePaidStatusHeader'),\n          sortable: false,\n          value: 'paidStatus',\n        },\n        {\n          text: this.$t('finance.invoiceNumberHeader'),\n          sortable: false,\n          value: 'invoiceNumber',\n          align: 'right',\n        },\n        {\n          text: this.$t('finance.invoiceDateHeader'),\n          sortable: false,\n          value: 'invoiceDateUTC',\n        },\n        {\n          text: this.$t('finance.invoicePaidDateHeader'),\n          sortable: false,\n          value: 'datePaidUTC',\n        },\n        {\n          text: this.$t('finance.invoiceIssuedToHeader'),\n          sortable: false,\n          value: 'issuedTo',\n        },\n        {\n          text: this.$t('finance.invoiceAmountHeader'),\n          align: 'end',\n          sortable: false,\n          value: 'amount',\n        },\n        {\n          text: this.$t('finance.invoiceActionHeader'),\n          value: 'action',\n          sortable: false,\n          align: 'end',\n        },\n      ],\n      pageSize: 50,\n      currentPage: 1,\n    }\n  },\n  computed: {\n    ...mapGetters({\n      isLoadingInvoices: 'invoices/isLoading',\n      invoices: 'invoices/invoices',\n      invoicesTotal: 'invoices/invoicesTotal',\n      currentUser: 'auth/currentUser',\n      serverCurrentPage: 'invoices/serverCurrentPage',\n    }),\n    pageCount: function() {\n      if (this.invoicesTotal <= 0) {\n        return 0\n      }\n      return Math.floor(this.invoicesTotal / this.pageSize) + 1\n    },\n  },\n  created: function() {\n    let page = 1\n    if (this.$route.query.page) {\n      const pageInt = parseInt(this.$route.query.page)\n      if (pageInt) {\n        page = pageInt\n      }\n    }\n    this.currentPage = page\n  },\n  mounted: async function() {\n    await this.getInvoices({\n      page: this.currentPage,\n      pageSize: this.pageSize,\n    })\n  },\n  methods: {\n    ...mapActions({\n      getInvoices: 'invoices/loadInvoices',\n    }),\n    renderIssuedTo(invoice) {\n      if (invoice.groupInvoice) return invoice.groupName\n\n      if (invoice.multipleLocations) return invoice.clientName\n\n      return invoice.locationName\n    },\n    viewInvoice(invoiceId) {\n      this.$router.push({ path: `/finance/invoices/${invoiceId}` })\n    },\n    downloadInvoice(invoiceItem) {\n      this.$emit('downloadInvoice', {\n        invoiceID: invoiceItem.invoiceID,\n        invoiceNumber: invoiceItem.invoiceNumber,\n      })\n    },\n    updatePage(page) {\n      this.$vuetify.goTo('#invoicesTable')\n      this.$router.push({ path: this.$route.path + `?page=${page}` })\n    },\n  },\n}\n</script>\n\n<template>\n  <div>\n    <v-data-table\n      id=\"invoicesTable\"\n      :headers=\"headers\"\n      :items=\"invoices\"\n      :items-per-page=\"pageSize\"\n      :loading=\"isLoadingInvoices\"\n      :mobile-breakpoint=\"960\"\n      :no-data-text=\"$t('finance.noInvoicesText')\"\n      :page.sync=\"currentPage\"\n      hide-default-footer\n      :loading-text=\"$t('finance.invoicesLoadingText')\"\n      class=\"elevation-1 mt-2\"\n    >\n      <template v-slot:[`item.paidStatus`]=\"{ item }\">\n        <span v-if=\"item.datePaidUTC\" class=\"paid-status-span green--text\">\n          {{ $t('finance.invoicePaidText') }}\n        </span>\n        <span v-else class=\"paid-status-span red--text\">\n          {{ $t('finance.invoiceNotPaidText') }}\n        </span>\n      </template>\n      <template v-slot:[`item.invoiceNumber`]=\"{ item }\">\n        <span class=\"font-monospace\">{{ item.invoiceNumber }}</span>\n      </template>\n      <template v-slot:[`item.invoiceDateUTC`]=\"{ item }\">\n        <span class=\"font-monospace\">{{\n          renderDate(item.invoiceDateUTC, item.locationTimeZone)\n        }}</span>\n      </template>\n      <template v-slot:[`item.datePaidUTC`]=\"{ item }\">\n        <span class=\"font-monospace\">{{\n          item.datePaidUTC\n            ? renderDate(item.datePaidUTC, item.locationTimeZone)\n            : ''\n        }}</span>\n      </template>\n      <template v-slot:[`item.issuedTo`]=\"{ item }\">\n        <span class=\"issued-to-span\">{{ renderIssuedTo(item) }}</span>\n      </template>\n      <template v-slot:[`item.amount`]=\"{ item }\">\n        <span class=\"amount-span font-monospace\">\n          {{ $n(item.exGSTAmount + item.taxAmount, 'currency') }}\n        </span>\n      </template>\n      <template v-slot:[`item.action`]=\"{ item }\">\n        <div class=\"d-flex justify-end\">\n          <v-tooltip bottom>\n            <template v-slot:activator=\"{ on, attrs }\">\n              <v-btn\n                color=\"primary\"\n                dark\n                small\n                text\n                v-bind=\"attrs\"\n                v-on=\"on\"\n                @click=\"downloadInvoice(item)\"\n              >\n                <v-icon>\n                  mdi-cloud-download\n                </v-icon>\n              </v-btn>\n            </template>\n            <span>{{ $t('finance.invoiceDownloadButtonTip') }}</span>\n          </v-tooltip>\n          <v-tooltip bottom>\n            <template v-slot:activator=\"{ on, attrs }\">\n              <v-btn\n                color=\"primary\"\n                dark\n                small\n                text\n                v-bind=\"attrs\"\n                v-on=\"on\"\n                @click=\"viewInvoice(item.invoiceNumber)\"\n              >\n                <v-icon>\n                  mdi-text-box-search-outline\n                </v-icon>\n              </v-btn>\n            </template>\n            <span>{{ $t('finance.invoiceViewButtonTip') }}</span>\n          </v-tooltip>\n        </div>\n      </template>\n    </v-data-table>\n    <v-pagination\n      :value=\"serverCurrentPage\"\n      class=\"my-4\"\n      :length=\"pageCount\"\n      @input=\"updatePage\"\n    ></v-pagination>\n  </div>\n</template>\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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./invoices-list.vue?vue&type=script&lang=js&\"; 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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./invoices-list.vue?vue&type=script&lang=js&\"","import './VPagination.sass'\n\nimport VIcon from '../VIcon'\n\n// Directives\nimport Resize from '../../directives/resize'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Intersectable from '../../mixins/intersectable'\nimport Themeable from '../../mixins/themeable'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode, CreateElement, VNodeChildrenArrayContents } from 'vue'\n\n/* @vue/component */\nexport default mixins(\n  Colorable,\n  Intersectable({ onVisible: ['init'] }),\n  Themeable\n).extend({\n  name: 'v-pagination',\n\n  directives: { Resize },\n\n  props: {\n    circle: Boolean,\n    disabled: Boolean,\n    length: {\n      type: Number,\n      default: 0,\n      validator: (val: number) => val % 1 === 0,\n    },\n    nextIcon: {\n      type: String,\n      default: '$next',\n    },\n    prevIcon: {\n      type: String,\n      default: '$prev',\n    },\n    totalVisible: [Number, String],\n    value: {\n      type: Number,\n      default: 0,\n    },\n    pageAriaLabel: {\n      type: String,\n      default: '$vuetify.pagination.ariaLabel.page',\n    },\n    currentPageAriaLabel: {\n      type: String,\n      default: '$vuetify.pagination.ariaLabel.currentPage',\n    },\n    previousAriaLabel: {\n      type: String,\n      default: '$vuetify.pagination.ariaLabel.previous',\n    },\n    nextAriaLabel: {\n      type: String,\n      default: '$vuetify.pagination.ariaLabel.next',\n    },\n    wrapperAriaLabel: {\n      type: String,\n      default: '$vuetify.pagination.ariaLabel.wrapper',\n    },\n  },\n\n  data () {\n    return {\n      maxButtons: 0,\n      selected: null as number | null,\n    }\n  },\n\n  computed: {\n    classes (): object {\n      return {\n        'v-pagination': true,\n        'v-pagination--circle': this.circle,\n        'v-pagination--disabled': this.disabled,\n        ...this.themeClasses,\n      }\n    },\n\n    items (): (string | number)[] {\n      const totalVisible = parseInt(this.totalVisible, 10)\n\n      if (totalVisible === 0) {\n        return []\n      }\n\n      const maxLength = Math.min(\n        Math.max(0, totalVisible) || this.length,\n        Math.max(0, this.maxButtons) || this.length,\n        this.length\n      )\n\n      if (this.length <= maxLength) {\n        return this.range(1, this.length)\n      }\n\n      const even = maxLength % 2 === 0 ? 1 : 0\n      const left = Math.floor(maxLength / 2)\n      const right = this.length - left + 1 + even\n\n      if (this.value > left && this.value < right) {\n        const firstItem = 1\n        const lastItem = this.length\n        const start = this.value - left + 2\n        const end = this.value + left - 2 - even\n        const secondItem = start - 1 === firstItem + 1 ? 2 : '...'\n        const beforeLastItem = end + 1 === lastItem - 1 ? end + 1 : '...'\n\n        return [1, secondItem, ...this.range(start, end), beforeLastItem, this.length]\n      } else if (this.value === left) {\n        const end = this.value + left - 1 - even\n        return [...this.range(1, end), '...', this.length]\n      } else if (this.value === right) {\n        const start = this.value - left + 1\n        return [1, '...', ...this.range(start, this.length)]\n      } else {\n        return [\n          ...this.range(1, left),\n          '...',\n          ...this.range(right, this.length),\n        ]\n      }\n    },\n  },\n\n  watch: {\n    value () {\n      this.init()\n    },\n  },\n\n  mounted () {\n    this.init()\n  },\n\n  methods: {\n    init () {\n      this.selected = null\n\n      this.$nextTick(this.onResize)\n      // TODO: Change this (f75dee3a, cbdf7caa)\n      setTimeout(() => (this.selected = this.value), 100)\n    },\n    onResize () {\n      const width = this.$el && this.$el.parentElement\n        ? this.$el.parentElement.clientWidth\n        : window.innerWidth\n\n      this.maxButtons = Math.floor((width - 96) / 42)\n    },\n    next (e: Event) {\n      e.preventDefault()\n      this.$emit('input', this.value + 1)\n      this.$emit('next')\n    },\n    previous (e: Event) {\n      e.preventDefault()\n      this.$emit('input', this.value - 1)\n      this.$emit('previous')\n    },\n    range (from: number, to: number) {\n      const range = []\n\n      from = from > 0 ? from : 1\n\n      for (let i = from; i <= to; i++) {\n        range.push(i)\n      }\n\n      return range\n    },\n    genIcon (h: CreateElement, icon: string, disabled: boolean, fn: EventListener, label: String): VNode {\n      return h('li', [\n        h('button', {\n          staticClass: 'v-pagination__navigation',\n          class: {\n            'v-pagination__navigation--disabled': disabled,\n          },\n          attrs: {\n            disabled,\n            type: 'button',\n            'aria-label': label,\n          },\n          on: disabled ? {} : { click: fn },\n        }, [h(VIcon, [icon])]),\n      ])\n    },\n    genItem (h: CreateElement, i: string | number): VNode {\n      const color: string | false = (i === this.value) && (this.color || 'primary')\n      const isCurrentPage = i === this.value\n      const ariaLabel = isCurrentPage ? this.currentPageAriaLabel : this.pageAriaLabel\n\n      return h('button', this.setBackgroundColor(color, {\n        staticClass: 'v-pagination__item',\n        class: {\n          'v-pagination__item--active': i === this.value,\n        },\n        attrs: {\n          type: 'button',\n          'aria-current': isCurrentPage,\n          'aria-label': this.$vuetify.lang.t(ariaLabel, i),\n        },\n        on: {\n          click: () => this.$emit('input', i),\n        },\n      }), [i.toString()])\n    },\n    genItems (h: CreateElement): VNode[] {\n      return this.items.map((i, index) => {\n        return h('li', { key: index }, [\n          isNaN(Number(i)) ? h('span', { class: 'v-pagination__more' }, [i.toString()]) : this.genItem(h, i),\n        ])\n      })\n    },\n    genList (h: CreateElement, children: VNodeChildrenArrayContents): VNode {\n      return h('ul', {\n        directives: [{\n          modifiers: { quiet: true },\n          name: 'resize',\n          value: this.onResize,\n        }],\n        class: this.classes,\n      }, children)\n    },\n  },\n\n  render (h): VNode {\n    const children = [\n      this.genIcon(h,\n        this.$vuetify.rtl ? this.nextIcon : this.prevIcon,\n        this.value <= 1,\n        this.previous,\n        this.$vuetify.lang.t(this.previousAriaLabel)),\n      this.genItems(h),\n      this.genIcon(h,\n        this.$vuetify.rtl ? this.prevIcon : this.nextIcon,\n        this.value >= this.length,\n        this.next,\n        this.$vuetify.lang.t(this.nextAriaLabel)),\n    ]\n\n    return h('nav', {\n      attrs: {\n        role: 'navigation',\n        'aria-label': this.$vuetify.lang.t(this.wrapperAriaLabel),\n      },\n    }, [this.genList(h, children)])\n  },\n})\n","import { render, staticRenderFns } from \"./invoices-list.vue?vue&type=template&id=d8b40748&\"\nimport script from \"./invoices-list.vue?vue&type=script&lang=js&\"\nexport * from \"./invoices-list.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  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';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VPagination } from 'vuetify/lib/components/VPagination';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VBtn,VDataTable,VIcon,VPagination,VTooltip})\n","<script>\nimport Layout from '@layouts/main.vue'\nimport InvoicesList from '@components/invoices/invoices-list.vue'\nimport InvoiceFilePreview from '@components/invoices/invoice-file-preview.vue'\n\nexport default {\n  name: 'FinanceView',\n  metaInfo() {\n    return {\n      title: this.$route?.meta?.title,\n      meta: [{ name: 'description', content: 'The Finance page.' }],\n    }\n  },\n  components: { Layout, InvoicesList, InvoiceFilePreview },\n  data() {\n    return {\n      showDownloadDialog: false,\n      invoice: {},\n    }\n  },\n  methods: {\n    downloadInvoice(invoice) {\n      this.showDownloadDialog = true\n      this.invoice = invoice\n    },\n  },\n}\n</script>\n\n<template>\n  <Layout>\n    <BasePageTitle :title=\"$t('finance.financePageTitle')\" />\n    <InvoicesList @downloadInvoice=\"downloadInvoice\" />\n    <InvoiceFilePreview :show.sync=\"showDownloadDialog\" :invoice=\"invoice\" />\n  </Layout>\n</template>\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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./finance.vue?vue&type=script&lang=js&\"; 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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./finance.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./finance.vue?vue&type=template&id=28914ff6&\"\nimport script from \"./finance.vue?vue&type=script&lang=js&\"\nexport * from \"./finance.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  null,\n  null\n  \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./file-preview-container.vue?vue&type=style&index=0&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.rerender)?_c('section',{staticClass:\"w-100\",staticStyle:{\"height\":\"800px\"}},[(_vm.loading)?_c('v-skeleton-loader',{staticClass:\"file-preview-loader\",attrs:{\"type\":\"image\"}}):(!_vm.fileData)?_c('article',[_c('EmptyStateBlock',{attrs:{\"icon\":\"mdi-file\",\"title\":_vm.emptyStateTitle || _vm.$t('error.noFilesAvailableEmptyStateTitle'),\"description\":_vm.emptyStateDescription,\"border\":\"\"}})],1):_c('article',{staticClass:\"h-100 w-100\"},[(_vm.isAnImage)?_c('v-img',{staticClass:\"h-100\",attrs:{\"contain\":\"\",\"src\":_vm.fileData,\"max-width\":\"800px\"}}):_c('object',{staticClass:\"h-100 w-100\",attrs:{\"data\":_vm.fileData,\"type\":_vm.fileType}},[_c('embed',{attrs:{\"src\":_vm.fileData,\"type\":_vm.fileType}})])],1)],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <section v-if=\"!rerender\" style=\"height: 800px;\" class=\"w-100\">\n    <v-skeleton-loader\n      v-if=\"loading\"\n      class=\"file-preview-loader\"\n      type=\"image\"\n    />\n    <article v-else-if=\"!fileData\">\n      <EmptyStateBlock\n        icon=\"mdi-file\"\n        :title=\"emptyStateTitle || $t('error.noFilesAvailableEmptyStateTitle')\"\n        :description=\"emptyStateDescription\"\n        border\n      />\n    </article>\n    <article v-else class=\"h-100 w-100\">\n      <v-img\n        v-if=\"isAnImage\"\n        contain\n        :src=\"fileData\"\n        class=\"h-100\"\n        max-width=\"800px\"\n      />\n      <object v-else :data=\"fileData\" :type=\"fileType\" class=\"h-100 w-100\">\n        <embed :src=\"fileData\" :type=\"fileType\" />\n      </object>\n    </article>\n  </section>\n</template>\n\n<script>\nimport baseMixin from '@/mixins/baseMixin'\nimport { getType } from 'mime'\nimport EmptyStateBlock from '@components/general/empty-state-block.vue'\n\nexport default {\n  name: 'FilePreviewContainer',\n  components: {\n    EmptyStateBlock,\n  },\n  mixins: [baseMixin],\n  props: {\n    fileData: {\n      type: String,\n      required: true,\n    },\n    fileDefinition: {\n      type: Object,\n      required: true,\n    },\n    loading: {\n      type: Boolean,\n    },\n    emptyStateTitle: {\n      type: String,\n      default: '',\n    },\n    emptyStateDescription: {\n      type: String,\n      default: '',\n    },\n  },\n  data: () => {\n    return {\n      rerender: false,\n    }\n  },\n  computed: {\n    fileType() {\n      try {\n        return getType(this.fileDefinition?.fileName)\n      } catch {\n        return null\n      }\n    },\n    isAnImage() {\n      const type = this.fileType\n      if (!type) return false\n      return type.includes('image')\n    },\n  },\n  watch: {\n    fileData: {\n      async handler() {\n        this.rerender = true\n        await this.$nextTick()\n        this.rerender = false\n      },\n    },\n  },\n}\n</script>\n\n<style lang=\"scss\">\n.file-preview-loader .v-skeleton-loader__image {\n  height: 100%;\n}\n</style>\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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./file-preview-container.vue?vue&type=script&lang=js&\"; 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/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./file-preview-container.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./file-preview-container.vue?vue&type=template&id=6bee2843&\"\nimport script from \"./file-preview-container.vue?vue&type=script&lang=js&\"\nexport * from \"./file-preview-container.vue?vue&type=script&lang=js&\"\nimport style0 from \"./file-preview-container.vue?vue&type=style&index=0&lang=scss&\"\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 { VImg } from 'vuetify/lib/components/VImg';\nimport { VSkeletonLoader } from 'vuetify/lib/components/VSkeletonLoader';\ninstallComponents(component, {VImg,VSkeletonLoader})\n"],"sourceRoot":""}