{"version":3,"sources":["webpack:///./src/util/currency.ts","webpack:///./src/views/subscriptions/SubscriptionListMachine.ts","webpack:///./src/views/subscriptions/SubscriptionExpensive.vue?bcaa","webpack:///./src/views/subscriptions/SubscriptionExpensive.vue?9be7","webpack:///./src/views/subscriptions/SubscriptionExpensive.vue?433e","webpack:///./src/views/subscriptions/SubscriptionExpensive.vue","webpack:///./src/util/GenderHelper.ts"],"names":["formatCurrency","amount","Intl","NumberFormat","style","currency","format","subscriptionListMachine","Machine","id","initial","states","idle","on","RELOAD","loading","RESOLVE","REJECT","error","type","render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_s","selectedProject","expensiveSubscriptionCheckThreshold","expensiveSubscriptionCheckWarning","_e","attrs","state","matches","response","total","headers","items","options","currentPage","$t","$event","$router","push","name","params","subscriptionId","updateOptions","scopedSlots","_u","key","fn","ref","item","subscriptionPrice","toLocalDateStringShort","startDate","isFirstSubscription","getGender","gender","subscriptionStart","subscriptionEnd","birthDate","toLocalDateTimeStringShort","approvedDate","model","value","callback","$$v","search","expression","isDownloading","exportData","onExport","proxy","staticRenderFns","defineComponent","components","ExportComponent","setup","_useMachine","useMachine","requestListMachine","service","api","SubscriptionApi","reactive","computed","Store","getters","groupBy","groupDesc","itemsPerPage","multiSort","mustSort","page","sortBy","sortDesc","text","i18n","t","toString","fetchResults","_fetchResults","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","_selectedProject$valu3","request","_yield$api$subscripti","data","wrap","_context2","prev","next","projectId","abrupt","descending","rowsPerPage","subscriptionGetSubscriptionsExpensiveTable","sent","send","t0","stop","opts","_selectedProject$valu","subscriptionExportSubscriptionsExpensiveToExcel","responseType","then","catch","onMounted","_callee","_context","subscribe","s","watch","_selectedProject$valu2","expensiveSubscriptionCheckActive","router","component","VBtn","VCard","VCardText","VCol","VDataTable","VRow","VSpacer","VTextField","VToolbar","VToolbarTitle","Gender","Female","Male","X","Unknown"],"mappings":"kHAAA,SAASA,EAAeC,GACtB,OA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AC,SAAA0B,IAAA,OAAA3B,iBAAAO,MAAA,SAAAqB,GAAA,eAAAA,EAAAnB,KAAAmB,EAAAlB,MAAA,OACRlC,EAAQqD,WAAU,SAACC,GACbA,EAAExG,QAAQ,YACZqE,OAED,wBAAAiC,EAAAT,UAAAQ,QAGLI,oBACE,kBAAMrE,EAAOH,SACb,WACE3B,EAAY2B,MAAQ,EACpBoC,OAIJoC,mBAAM/G,GAAiB,WAAK,IAAAgH,GAEsC,KAAvC,QAArBA,EAAAhH,EAAgBuC,aAAK,IAAAyE,OAAA,EAArBA,EAAuBC,mCACzBC,OAAOlG,KAAK,CAAEC,KAAM,cAEtB0D,OAGK,CACL3E,kBACAS,UACAE,UACA+B,SACA9B,cACAP,QACAE,WACArC,sBACA0D,8BACAQ,kCACAhB,gBACAwB,gBACAC,aACAC,WACAf,qBChU0d,I,yJCO5doF,EAAY,eACd,EACA7H,EACA0D,GACA,EACA,KACA,KACA,MAIa,aAAAmE,EAAiB,QAchC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,UAAA,OAAUC,OAAA,KAAKC,aAAA,KAAWC,OAAA,KAAKC,UAAA,KAAQC,aAAA,KAAWC,WAAA,KAASC,cAAA,U,kCChCpG,kDAEc,SAAU9F,EAAUC,GAChC,OAAQA,GACN,KAAK8F,OAAOC,OACV,MAAO,QACT,KAAKD,OAAOE,KACV,MAAO,MACT,KAAKF,OAAOG,EACV,MAAO,IACT,KAAKH,OAAOI,QACV,MAAO,qBACT,QACE,MAAO","file":"js/chunk-f85812d2.e2e9ca58.js","sourcesContent":["function formatCurrency(amount: number): string {\r\n return new Intl.NumberFormat(\"nl-NL\", {\r\n style: \"currency\",\r\n currency: \"EUR\",\r\n }).format(amount);\r\n}\r\n\r\nexport { formatCurrency };\r\n","import { Machine } from \"xstate\";\r\n\r\nconst subscriptionListMachine = Machine({\r\n id: \"subscriptionListMachine\",\r\n initial: \"idle\",\r\n states: {\r\n idle: {\r\n on: {\r\n RELOAD: \"loading\",\r\n },\r\n },\r\n loading: {\r\n on: {\r\n RESOLVE: \"idle\",\r\n REJECT: \"error\",\r\n },\r\n },\r\n error: {\r\n type: \"final\",\r\n },\r\n },\r\n});\r\n\r\nexport default subscriptionListMachine;\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-card',{staticClass:\"mb-5\"},[_c('v-card-text',[(_vm.selectedProject)?[_vm._v(\" De volgende abonnementen zit dichtbij (of zijn al over) de maximumprijs van \"+_vm._s(_vm.formatCurrency( _vm.selectedProject.expensiveSubscriptionCheckThreshold || 0 ))+\". \"),_c('br'),_vm._v(\" Abonnementen van \"+_vm._s(_vm.formatCurrency( _vm.selectedProject.expensiveSubscriptionCheckWarning || 0 ))+\" of meer worden meegenomen in dit overzicht. \"),_c('br')]:_vm._e()],2)],1),_c('v-card',{staticClass:\"mb-5\"},[_c('v-card-text',[_c('v-data-table',{staticClass:\"row-pointer\",attrs:{\"loading\":_vm.state.matches('loading'),\"disabled\":_vm.state.matches('loading'),\"server-items-length\":_vm.response.total,\"headers\":_vm.headers,\"items\":_vm.response.items,\"options\":_vm.options,\"page\":_vm.currentPage,\"loading-text\":_vm.$t('datatable.loading-text'),\"no-data-text\":_vm.$t('datatable.no-data-text'),\"no-results-text\":_vm.$t('datatable.no-results-text'),\"footer-props\":{\n 'items-per-page-text': _vm.$t('datatable.items-per-page-text'),\n 'items-per-page-options': [10, 25, 50, 100],\n }},on:{\"click:row\":function($event){return _vm.$router.push({\n name: 'subscriptions-detail',\n params: { id: $event.subscriptionId },\n })},\"update:options\":_vm.updateOptions,\"update:page\":function($event){_vm.currentPage=$event}},scopedSlots:_vm._u([{key:\"item.subscriptionPrice\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.formatCurrency(item.subscriptionPrice))+\" \")]}},{key:\"item.startDate\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateStringShort(item.startDate))+\" \")]}},{key:\"item.isFirstSubscription\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.isFirstSubscription ? \"Aanmelding\" : \"Verlenging\")+\" \")]}},{key:\"item.gender\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.getGender(item.gender))+\" \")]}},{key:\"item.subscriptionStart\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateStringShort(item.subscriptionStart))+\" \")]}},{key:\"item.subscriptionEnd\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateStringShort(item.subscriptionEnd))+\" \")]}},{key:\"item.birthDate\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateStringShort(item.birthDate))+\" \")]}},{key:\"item.approvedDate\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateTimeStringShort(item.approvedDate))+\" \")]}},{key:\"item.actions\",fn:function(ref){return [_c('v-btn',{attrs:{\"color\":\"primary\",\"outlined\":\"\",\"x-small\":\"\"}},[_vm._v(_vm._s(_vm.$t(\"generic.details\")))])]}},{key:\"top\",fn:function(){return [_c('v-toolbar',{staticClass:\"mb-4\",attrs:{\"flat\":\"\"}},[_c('v-row',{attrs:{\"no-gutters\":\"\"}},[_c('v-col',{attrs:{\"align-self\":\"center\"}},[_c('v-toolbar-title',{staticClass:\"headline primary--text\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"subscription.expensive\"))+\" \")])],1),_c('v-spacer'),_c('v-col',[_c('v-spacer'),_c('v-text-field',{attrs:{\"filled\":\"\",\"append-icon\":\"mdi-magnify\",\"label\":_vm.$t('generic.search'),\"single-line\":\"\",\"dense\":\"\",\"hide-details\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_c('v-col',{staticClass:\"flex-grow-0 ml-8\",attrs:{\"align-self\":\"center\"}},[_c('ExportComponent',{attrs:{\"is-downloading\":_vm.isDownloading,\"data\":_vm.exportData},on:{\"download-excel\":function($event){return _vm.onExport()}}})],1)],1)],1)]},proxy:true}],null,true)})],1)],1)],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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport {\r\n defineComponent,\r\n onMounted,\r\n ref,\r\n watch,\r\n reactive,\r\n computed,\r\n} from \"@vue/composition-api\";\r\nimport { useMachine } from \"@xstate/vue\";\r\nimport { AxiosResponse } from \"axios\";\r\n\r\nimport {\r\n GetSubscriptionTableRequest,\r\n ProjectDto,\r\n SubscriptionApi,\r\n VueTableResponseOfSubscriptionsTableDto,\r\n} from \"@/api\";\r\nimport ExportComponent from \"@/components/export/ExportComponent.vue\";\r\nimport { DataTableHeader, DataOptions } from \"vuetify\";\r\nimport Store from \"@/store\";\r\nimport { formatCurrency } from \"@/util/currency\";\r\nimport {\r\n toLocalDateStringShort,\r\n toLocalDateTimeStringShort,\r\n} from \"@/util/date\";\r\nimport i18n from \"@/i18n\";\r\nimport getGender from \"@/util/GenderHelper\";\r\nimport router from \"@/router\";\r\nimport requestListMachine from \"./SubscriptionListMachine\";\r\n\r\nexport default defineComponent({\r\n components: { ExportComponent },\r\n setup() {\r\n const { state, service } = useMachine(requestListMachine);\r\n const api = new SubscriptionApi();\r\n\r\n const search = ref(\"\");\r\n const currentPage = ref(0);\r\n const isDownloading = ref(false);\r\n const exportData = ref>();\r\n\r\n const response: VueTableResponseOfSubscriptionsTableDto = reactive({\r\n items: [],\r\n total: 0,\r\n });\r\n\r\n const selectedProject = computed(\r\n () => Store.getters[\"User/getSelectedProject\"]\r\n );\r\n\r\n let options: DataOptions = reactive({\r\n groupBy: [],\r\n groupDesc: [],\r\n itemsPerPage: 10,\r\n multiSort: false,\r\n mustSort: false,\r\n page: 1,\r\n sortBy: [\"lastName\"],\r\n sortDesc: [false],\r\n });\r\n\r\n const headers: DataTableHeader[] = [\r\n {\r\n text: i18n.t(\"subscription.table.price\").toString(),\r\n value: \"subscriptionPrice\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.name\").toString(),\r\n value: \"lastName\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.first-name\").toString(),\r\n value: \"firstName\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.gender\").toString(),\r\n value: \"gender\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.birth-date\").toString(),\r\n value: \"birthDate\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.employee-number\").toString(),\r\n value: \"employeeNr\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.type\").toString(),\r\n value: \"isFirstSubscription\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.month\").toString(),\r\n value: \"renewalPeriod\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.start\").toString(),\r\n value: \"subscriptionStart\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.end\").toString(),\r\n value: \"subscriptionEnd\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.status\").toString(),\r\n value: \"status\",\r\n },\r\n {\r\n text: \"\",\r\n value: \"actions\",\r\n },\r\n ];\r\n\r\n async function fetchResults() {\r\n if (!selectedProject.value?.projectId) return;\r\n\r\n try {\r\n const request: GetSubscriptionTableRequest = {\r\n sortBy: options.sortBy,\r\n descending: options.sortDesc,\r\n page: options.page,\r\n rowsPerPage: options.itemsPerPage,\r\n search: search.value,\r\n projectId: selectedProject.value.projectId,\r\n };\r\n\r\n const { data } = await api.subscriptionGetSubscriptionsExpensiveTable(\r\n request\r\n );\r\n response.items = data.items;\r\n response.total = data.total;\r\n service.send(\"RESOLVE\");\r\n } catch (e) {\r\n service.send(\"REJECT\");\r\n }\r\n }\r\n\r\n function updateOptions(opts: DataOptions) {\r\n options = opts;\r\n service.send(\"RELOAD\");\r\n }\r\n\r\n function onExport() {\r\n if (!selectedProject.value?.projectId) return;\r\n\r\n isDownloading.value = true;\r\n\r\n api\r\n .subscriptionExportSubscriptionsExpensiveToExcel(\r\n { projectId: selectedProject.value.projectId },\r\n {\r\n responseType: \"arraybuffer\",\r\n }\r\n )\r\n .then((data) => {\r\n isDownloading.value = false;\r\n exportData.value = data;\r\n })\r\n .catch(() => {\r\n isDownloading.value = false;\r\n });\r\n }\r\n\r\n onMounted(async () => {\r\n service.subscribe((s) => {\r\n if (s.matches(\"loading\")) {\r\n fetchResults();\r\n }\r\n });\r\n });\r\n\r\n watch(\r\n () => search.value,\r\n () => {\r\n currentPage.value = 1;\r\n fetchResults();\r\n }\r\n );\r\n\r\n watch(selectedProject, () => {\r\n // Return to dashboard if no access to this page.\r\n if (selectedProject.value?.expensiveSubscriptionCheckActive !== true) {\r\n router.push({ name: \"dashboard\" });\r\n }\r\n fetchResults();\r\n });\r\n\r\n return {\r\n selectedProject,\r\n headers,\r\n options,\r\n search,\r\n currentPage,\r\n state,\r\n response,\r\n formatCurrency,\r\n toLocalDateStringShort,\r\n toLocalDateTimeStringShort,\r\n updateOptions,\r\n isDownloading,\r\n exportData,\r\n onExport,\r\n getGender,\r\n };\r\n },\r\n});\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/vuetify-loader/lib/loader.js??ref--20-0!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionExpensive.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/vuetify-loader/lib/loader.js??ref--20-0!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionExpensive.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SubscriptionExpensive.vue?vue&type=template&id=42a3963e&\"\nimport script from \"./SubscriptionExpensive.vue?vue&type=script&lang=ts&\"\nexport * from \"./SubscriptionExpensive.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';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\nimport { VToolbarTitle } from 'vuetify/lib/components/VToolbar';\ninstallComponents(component, {VBtn,VCard,VCardText,VCol,VDataTable,VRow,VSpacer,VTextField,VToolbar,VToolbarTitle})\n","import { Gender } from \"@/api\";\r\n\r\nexport default function getGender(gender: Gender) {\r\n switch (gender) {\r\n case Gender.Female:\r\n return \"Vrouw\";\r\n case Gender.Male:\r\n return \"Man\";\r\n case Gender.X:\r\n return \"X\";\r\n case Gender.Unknown:\r\n return \"Zeg ik liever niet\";\r\n default:\r\n return \"Onbekend\";\r\n }\r\n}\r\n"],"sourceRoot":""}