{"version":3,"sources":["webpack:///./src/views/Users/Detail.vue?7d2c","webpack:///./node_modules/core-js/modules/es.array.join.js","webpack:///./src/util/formatDate.ts","webpack:///./src/views/Users/Detail.vue?f128","webpack:///./src/views/Users/Detail.vue","webpack:///./src/views/Users/Detail.vue?cb5b","webpack:///./src/views/Users/Detail.vue?8b66"],"names":["$","IndexedObject","toIndexedObject","arrayMethodIsStrict","nativeJoin","join","ES3_STRINGS","Object","STRICT_METHOD","target","proto","forced","separator","call","this","undefined","formatDate","date","objDate","Date","getFullYear","months","concat","getDate","getMonth","render","_vm","_h","$createElement","_c","_self","currentUser","employeeDetails","staticClass","_v","currentStateIs","states","ERROR","_e","COMPLETE","_s","fullName","address","postalCode","city","gender","getGender","phonePersonal","emailAddress","phoneBusiness","iban","ibanAccountHolder","birthDate","attrs","name","allSubscriptionsCancelled","showDialog","closeDialog","confirmDialog","formattedSportLocationNames","staticRenderFns","UserDetail","_mixins","_inherits","_super","_createSuper","_this","_classCallCheck","_createClass","key","get","$store","state","distinctSportLocationNames","sportLocationNames","_this$currentUser$emp","_this$currentUser$sub","subscription","subscriptionStatus","SubscriptionStatus","Active","_this$currentUser","hasActiveSubscription","value","Gender","Female","Male","X","Unknown","_confirmDialog","_asyncToGenerator","_regeneratorRuntime","mark","_callee","api","wrap","_context","prev","next","LOADING","SubscriptionApi","subscriptionDeleteDetails","t0","stop","apply","arguments","mixins","State","__decorate","Component","components","Content","Toolbar","Dialog","FormButton","component"],"mappings":"gHAAA,W,kCCCA,IAAIA,EAAI,EAAQ,QACZC,EAAgB,EAAQ,QACxBC,EAAkB,EAAQ,QAC1BC,EAAsB,EAAQ,QAE9BC,EAAa,GAAGC,KAEhBC,EAAcL,GAAiBM,OAC/BC,EAAgBL,EAAoB,OAAQ,KAIhDH,EAAE,CAAES,OAAQ,QAASC,OAAO,EAAMC,OAAQL,IAAgBE,GAAiB,CACzEH,KAAM,SAAcO,GAClB,OAAOR,EAAWS,KAAKX,EAAgBY,WAAqBC,IA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TC,WAAY,CACVC,eACAC,eACAC,oBACAC,sBAIiBrD,WCxG8X,I,wBCQ/YsD,EAAY,eACd,EACA1F,EACAmC,GACA,EACA,KACA,WACA,MAIa,aAAAuD,E","file":"js/chunk-76de7e25.7d37f92d.js","sourcesContent":["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!./Detail.vue?vue&type=style&index=0&id=7bb51d4b&prod&lang=scss&scoped=true&\"","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","export function formatDate (date: string) {\r\n if (date === '') {\r\n return date\r\n }\r\n\r\n const objDate = new Date(date)\r\n if (!objDate) {\r\n return date\r\n }\r\n if (objDate.getFullYear() === 1) {\r\n return ''\r\n }\r\n const months = [\r\n 'januari',\r\n 'februari',\r\n 'maart',\r\n 'april',\r\n 'mei',\r\n 'juni',\r\n 'juli',\r\n 'augustus',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n return `${objDate.getDate()} ${months[objDate.getMonth()]} ${objDate.getFullYear()}`\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (\n _vm.currentUser &&\n _vm.currentUser.employeeDetails\n )?_c('div',{staticClass:\"view view--toolbar\"},[_c('Toolbar',[_c('h2',{},[_vm._v(\"Mijn gegevens\")])]),_c('Content',[(_vm.currentStateIs(this.states.ERROR))?_c('AlertError',[_vm._v(\" Oops, er is een onbekende fout opgetreden bij het verwijderen van de gegevens. \")]):_vm._e(),(_vm.currentStateIs(this.states.COMPLETE))?_c('AlertSuccess',[_vm._v(\" Bedankt voor het doorgeven van je wijziging, je ontvangt een mail met meer informatie. \")]):_vm._e(),_c('h3',[_vm._v(\"Naam\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" \"+_vm._s(_vm.currentUser.employeeDetails.fullName)),_c('br')]),_c('h3',[_vm._v(\"Adres\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" \"+_vm._s(_vm.currentUser.employeeDetails.address)),_c('br'),_vm._v(\" \"+_vm._s(_vm.currentUser.employeeDetails.postalCode)+\" \"+_vm._s(_vm.currentUser.employeeDetails.city)+\" \")]),(_vm.currentUser.employeeDetails && _vm.currentUser.employeeDetails.gender)?[_c('h3',[_vm._v(\"Geslacht\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(_vm._s(_vm.getGender(_vm.currentUser.employeeDetails.gender)))])]:_vm._e(),(_vm.currentUser.employeeDetails && _vm.currentUser.employeeDetails.phonePersonal)?[_c('h3',[_vm._v(\"Telefoonnummer\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(_vm._s(_vm.currentUser.employeeDetails.phonePersonal))])]:_vm._e(),(_vm.currentUser.employeeDetails && _vm.currentUser.employeeDetails.emailAddress)?[_c('h3',[_vm._v(\"E-mailadres\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(_vm._s(_vm.currentUser.employeeDetails.emailAddress))])]:_vm._e(),(_vm.currentUser.employeeDetails && _vm.currentUser.employeeDetails.phoneBusiness)?[_c('h3',[_vm._v(\"Telefoonnummer zakelijk\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(_vm._s(_vm.currentUser.employeeDetails.phoneBusiness))])]:_vm._e(),(_vm.currentUser.employeeDetails.iban)?[_c('h3',[_vm._v(\"IBAN\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" \"+_vm._s(_vm.currentUser.employeeDetails.iban ? _vm.currentUser.employeeDetails.iban : '—')+\" \"),_c('br'),[_vm._v(_vm._s(_vm.currentUser.employeeDetails && _vm.currentUser.employeeDetails.ibanAccountHolder ? (\"T.n.v. \" + (_vm.currentUser.employeeDetails.ibanAccountHolder)) : ''))]],2)]:_vm._e(),_c('h3',[_vm._v(\"Geboortedatum\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(_vm._s(_vm.birthDate || '-'))]),_c('p',[(_vm.canEditDetails)?_c('router-link',{staticClass:\"link link--button\",attrs:{\"to\":{ name: 'detailEdit' }}},[_c('font-awesome-icon',{attrs:{\"icon\":['fal', 'pencil']}}),_vm._v(\" Mijn gegevens aanpassen \")],1):_vm._e()],1),(_vm.currentUser.allSubscriptionsCancelled && false)?_c('FormButton',{attrs:{\"caption\":'Gegevens verwijderen',\"loading\":_vm.currentStateIs(this.states.LOADING)},on:{\"click\":function($event){_vm.showDialog = true}}}):_vm._e()],2),_c('Dialog',{attrs:{\"show\":_vm.showDialog,\"cancel\":_vm.closeDialog,\"confirm\":_vm.confirmDialog,\"title\":\"Gegevens verwijderen\",\"description\":'Weet je zeker dat je jouw persoonsgegevens wilt verwijderen?
Jouw gegevens worden verwijderd bij de volgende sportscholen:
' + _vm.formattedSportLocationNames}})],1):_vm._e()}\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\r\nimport Component, { mixins } from 'vue-class-component'\r\nimport { User } from '@/types'\r\nimport { State } from '@/mixins/state'\r\n\r\nimport Content from '@/components/Content.vue'\r\nimport Toolbar from '@/components/Layout/Toolbar.vue'\r\nimport { Gender, SubscriptionStatus, SubscriptionApi } from '@/api'\r\nimport { formatDate } from '@/util/formatDate'\r\nimport Dialog from '@/components/Global/Dialog.vue'\r\nimport FormButton from '@/components/Form/Button.vue'\r\n\r\n@Component({\r\n components: {\r\n Content,\r\n Toolbar,\r\n Dialog,\r\n FormButton\r\n }\r\n})\r\n\r\nexport default class UserDetail extends mixins(State) {\r\n public constructor () {\r\n super()\r\n this.showDialog = false\r\n }\r\n\r\n get currentUser (): User {\r\n return this.$store.state.currentUser\r\n }\r\n\r\n get sportLocationNames (): Array {\r\n return this.$store.state.distinctSportLocationNames\r\n }\r\n\r\n get formattedSportLocationNames (): string {\r\n return this.sportLocationNames.join('
')\r\n }\r\n\r\n get birthDate () {\r\n return formatDate(this.currentUser.employeeDetails?.birthDate || '')\r\n }\r\n\r\n get hasActiveSubscription () {\r\n return this.currentUser.subscription?.subscriptionStatus === SubscriptionStatus.Active\r\n }\r\n\r\n get canEditDetails () {\r\n return this.currentUser?.subscription && this.hasActiveSubscription\r\n }\r\n\r\n public showDialog: boolean\r\n\r\n public 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\r\n public async confirmDialog () {\r\n this.showDialog = false\r\n this.state = this.states.LOADING\r\n const api = new SubscriptionApi()\r\n try {\r\n await api.subscriptionDeleteDetails({})\r\n this.state = this.states.COMPLETE\r\n } catch (error) {\r\n this.state = this.states.ERROR\r\n }\r\n }\r\n\r\n public closeDialog () {\r\n this.showDialog = false\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Detail.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Detail.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Detail.vue?vue&type=template&id=7bb51d4b&scoped=true&\"\nimport script from \"./Detail.vue?vue&type=script&lang=ts&\"\nexport * from \"./Detail.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Detail.vue?vue&type=style&index=0&id=7bb51d4b&prod&lang=scss&scoped=true&\"\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 \"7bb51d4b\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}