{"version":3,"sources":["webpack:///./src/views/subscriptions/SubscriptionListMachine.ts","webpack:///./src/views/subscriptions/SubscriptionActive.vue?35fc","webpack:///./src/views/subscriptions/SubscriptionActive.vue?b5ff","webpack:///./src/views/subscriptions/SubscriptionActive.vue?9f53","webpack:///./src/views/subscriptions/SubscriptionActive.vue","webpack:///./src/util/GenderHelper.ts"],"names":["subscriptionListMachine","Machine","id","initial","states","idle","on","RELOAD","loading","RESOLVE","REJECT","error","type","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","state","matches","response","total","headers","items","options","currentPage","$t","$event","$router","push","name","params","subscriptionId","updateOptions","scopedSlots","_u","key","fn","ref","item","_v","_s","toLocalDateStringShort","startDate","isFirstSubscription","getGender","gender","subscriptionStart","subscriptionEnd","birthDate","toLocalDateTimeStringShort","approvedDate","suspendedFrom","suspendedTo","model","value","callback","$$v","search","expression","isDownloading","exportData","onExport","proxy","staticRenderFns","defineComponent","components","ExportComponent","setup","_useMachine","useMachine","requestListMachine","service","api","SubscriptionApi","reactive","selectedProject","computed","Store","getters","page","itemsPerPage","sortBy","sortDesc","groupBy","groupDesc","multiSort","mustSort","text","i18n","t","toString","fetchResults","_fetchResults","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","_selectedProject$valu2","request","_yield$api$subscripti","data","wrap","_context2","prev","next","projectId","abrupt","descending","rowsPerPage","subscriptionGetSubscriptionsActiveTable","sent","send","t0","stop","opts","_selectedProject$valu","subscriptionExportActiveSubscriptionsToExcel","responseType","then","catch","onMounted","_callee","_context","subscribe","s","watch","component","VBtn","VCard","VCardText","VCol","VDataTable","VRow","VSpacer","VTextField","VToolbar","VToolbarTitle","Gender","Female","Male","X","Unknown"],"mappings":"kHAAA,gBAEMA,EAA0BC,eAAQ,CACtCC,GAAI,0BACJC,QAAS,OACTC,OAAQ,CACNC,KAAM,CACJC,GAAI,CACFC,OAAQ,YAGZC,QAAS,CACPF,GAAI,CACFG,QAAS,OACTC,OAAQ,UAGZC,MA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,GAAiB,WACrBgB,OAGK,CACLtE,UACAE,UACAkC,SACAjC,cACAP,QACAE,WACAsB,8BACAQ,kCACAjB,gBACA2B,gBACAC,aACAC,WACAjB,qBC5Sud,I,yJCOzdoF,EAAY,eACd,EACAxH,EACAuD,GACA,EACA,KACA,KACA,MAIa,aAAAiE,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-24607e5c.04186278.js","sourcesContent":["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',[_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.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.suspendedFrom\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateStringShort(item.suspendedFrom))+\" \")]}},{key:\"item.suspendedTo\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.toLocalDateStringShort(item.suspendedTo))+\" \")]}},{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.active\"))+\" \")])],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\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 {\r\n toLocalDateStringShort,\r\n toLocalDateTimeStringShort,\r\n} from \"@/util/date\";\r\nimport i18n from \"@/i18n\";\r\nimport getGender from \"@/util/GenderHelper\";\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 page: 1,\r\n itemsPerPage: 10,\r\n sortBy: [\"lastName\"],\r\n sortDesc: [false],\r\n groupBy: [],\r\n groupDesc: [],\r\n multiSort: false,\r\n mustSort: false,\r\n });\r\n\r\n const headers: DataTableHeader[] = [\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.bfnl-number\").toString(),\r\n value: \"subscriptionId\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.suspend-from\").toString(),\r\n value: \"suspendedFrom\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.suspend-till\").toString(),\r\n value: \"suspendedTo\",\r\n },\r\n {\r\n text: i18n.t(\"subscription.table.department\").toString(),\r\n value: \"department\",\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.subscriptionGetSubscriptionsActiveTable(\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 .subscriptionExportActiveSubscriptionsToExcel(\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 fetchResults();\r\n });\r\n\r\n return {\r\n headers,\r\n options,\r\n search,\r\n currentPage,\r\n state,\r\n response,\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!./SubscriptionActive.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!./SubscriptionActive.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SubscriptionActive.vue?vue&type=template&id=446a22c2&\"\nimport script from \"./SubscriptionActive.vue?vue&type=script&lang=ts&\"\nexport * from \"./SubscriptionActive.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":""}