{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.object.values.js","webpack:///./src/views/Subscription/Cancel.vue?fb8c","webpack:///./src/views/Subscription/Cancel.vue?47ef","webpack:///./src/views/Subscription/Cancel.vue?e714","webpack:///./src/views/Subscription/Cancel.vue?a79a","webpack:///./src/views/Subscription/Cancel.vue?20b8","webpack:///./src/util/formatDate.ts"],"names":["$","$values","values","target","stat","O","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","on","back","_v","name","$event","$router","replace","undefined","queuedCancellationInfo","$route","query","aborted","_e","currentStateIs","states","INITIAL","LOADING","ERROR","preventDefault","cancelSubscription","currentUser","subscriptionDetails","sportLocationNumber","startsWith","subscriptionExpires","_s","formatDate","firstCancellationDate","goToSuspend","_l","field","index","key","ref","refInFor","contactSupportReason","inputFields","upload","hidden","isProcessed","processDate","isLeavingWork","cancellationDate","deleteCancellation","staticRenderFns","SubscriptionCancel","_mixins","_inherits","_super","_createSuper","_this","_classCallCheck","value","required","type","options","placeholder","errors","reason","customErrorMessage","info","inputExplanationParagraph","explanation","onError","isLoading","reasons","showMedicalReasonNotification","_createClass","get","CancelReasonId","MedicalReason","_this$queuedCancellat","cancelReasonId","LeavingWork","Moving","Other","CancelledAtSportLocation","$store","state","subscription","cancel","cancellation","_this$currentUser$sub","renewalNumber","isMoving","isMedicalReason","_this$subscription","subscriptionStatus","isOther","isCancelledAtSportLocation","_this$currentUser$sub2","_this$currentUser$sub3","_this2","_this$subscription2","isLoadingEndDates","isLoadingCancelReasons","isLoadingQueueInfo","cancellationInfo","endDate","cancelExplanation","api","SubscriptionApi","endDatesQuery","subscriptionId","subscriptionGetPossibleSubscriptionEndDates","then","data","dates","length","forEach","item","push","label","catch","subscriptionGetCancelReasons","toString","queuedQuery","subscriptionGetQueuedCancellationInfo","error","response","status","_deleteCancellation","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this$currentUser$sub4","fields","_this3","wrap","_context","prev","next","subscriptionDeleteSubscriptionCancellation","setErrors","stop","apply","arguments","_cancelSubscription","_callee2","_context2","clearErrors","validate","abrupt","commit","cancelUploadGuid","_this4","Object","entries","_ref","_ref2","_slicedToArray","errorKey","errorValue","_ref3","_ref4","fieldKey","fieldValue","toLowerCase","_this5","valid","$refs","Array","isArray","every","inputField","mixins","State","__decorate","Watch","Component","components","Content","Toolbar","FormInput","FormButton","methods","component","date","objDate","Date","getFullYear","months","concat","getDate","getMonth"],"mappings":"qGAAA,IAAIA,EAAI,EAAQ,QACZC,EAAU,EAAQ,QAAgCC,OAItDF,EAAE,CAAEG,OAAQ,SAAUC,MAAM,GAAQ,CAClCF,OAAQ,SAAgBG,GACtB,OAAOJ,EAAQI,O,oECPnB,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,UAAU,CAACG,MAAM,CAAC,mBAAoB,GAAMC,GAAG,CAAC,KAAOR,EAAIS,OAAO,CAACL,EAAG,KAAK,GAAG,CAACJ,EAAIU,GAAG,2BAA4BV,EAAa,UAAEI,EAAG,UAAU,CAACA,EAAG,WAAW,GAAIJ,EAAW,QAAEI,EAAG,UAAU,CAACA,EAAG,KAAK,CAACJ,EAAIU,GAAG,mCAAmCN,EAAG,IAAI,CAACJ,EAAIU,GAAG,gLAAgLN,EAAG,cAAc,CAACE,YAAY,OAAOC,MAAM,CAAC,GAAK,CAAEI,KAAM,UAAU,CAACP,EAAG,OAAO,CAACJ,EAAIU,GAAG,wBAAwBV,EAAIU,GAAG,OAAO,GAAGN,EAAG,aAAa,CAACG,MAAM,CAAC,QAAU,kBAAkBC,GAAG,CAAC,MAAQ,SAASI,GAAQ,OAAOZ,EAAIa,QAAQC,QAAQ,CAAEH,KAAM,eAAgB,QAAmCI,IAA/Bf,EAAIgB,uBAAsCZ,EAAG,UAAU,CAACA,EAAG,KAAK,CAACJ,EAAIU,GAAG,qC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MAIa,aAAAqI,E,2CCnBf,W,8ECAM,SAAUvJ,EAAYwJ,GAC1B,GAAa,KAATA,EACF,OAAOA,EAGT,IAAMC,EAAU,IAAIC,KAAKF,GACzB,IAAKC,EACH,OAAOD,EAET,GAA8B,IAA1BC,EAAQE,cACV,MAAO,GAET,IAAMC,EAAS,CACb,UACA,WACA,QACA,QACA,MACA,OACA,OACA,WACA,YACA,UACA,WACA,YAEF,MAAO,GAAPC,OAAUJ,EAAQK,UAAS,KAAAD,OAAID,EAAOH,EAAQM,YAAW,KAAAF,OAAIJ,EAAQE","file":"js/chunk-bea924b0.7721d8cd.js","sourcesContent":["var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"view view--toolbar\"},[_c('Toolbar',{attrs:{\"hasCustomCallback\":true},on:{\"back\":_vm.back}},[_c('h2',{},[_vm._v(\"Abonnement opzeggen\")])]),(_vm.isLoading)?_c('Content',[_c('Loader')],1):(_vm.onError)?_c('Content',[_c('h3',[_vm._v(\"Helaas er is iets fout gegaan\")]),_c('p',[_vm._v(\" Helaas er is iets fout gegaan. Ga terug naar het overzicht en probeer het nogmaals. Als het probleem zich blijft voordoen neem dan contact op met de BFNL helpdesk via het \"),_c('router-link',{staticClass:\"link\",attrs:{\"to\":{ name: 'help'}}},[_c('span',[_vm._v(\"contactformulier\")])]),_vm._v(\". \")],1),_c('FormButton',{attrs:{\"caption\":'Naar overzicht'},on:{\"click\":function($event){return _vm.$router.replace({ name: 'users' })}}})],1):(_vm.queuedCancellationInfo === undefined)?_c('Content',[_c('h2',[_vm._v(\"Ik wil mijn abonnement opzeggen\")]),((_vm.$route.query.aborted && _vm.$route.query.aborted === 'true'))?_c('AlertInfo',[_vm._v(\" Je hebt de je opzegging afgebroken. Je abonnement is niet aangepast. \")]):_vm._e(),(\n _vm.currentStateIs(_vm.states.INITIAL) ||\n _vm.currentStateIs(_vm.states.LOADING) ||\n _vm.currentStateIs(_vm.states.ERROR)\n )?_c('form',{attrs:{\"novalidate\":\"\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.cancelSubscription()}}},[(_vm.currentUser.subscriptionDetails.sportLocationNumber.startsWith('FC7000'))?[_c('p',{staticClass:\"paragraph\"},[_vm._v(\" Wil je jouw abonnement opzeggen? Jammer! Je maakt de opzegging in orde met onderstaand formulier. \")]),_c('p',[_vm._v(\" Een opzegging geef je eenvoudig aan ons door via het onderstaande formulier. Omdat je gebruik maakt van Workit is jouw abonnement maandelijks opzegbaar. \")])]:[_c('p',{staticClass:\"paragraph\"},[_vm._v(\" Wil je jouw abonnement opzeggen? Jammer! Je maakt de opzegging in orde met onderstaand formulier. \")]),(!_vm.subscriptionExpires)?[_c('h3',[_vm._v(\"tussentijds opzeggen\")]),_c('p',[_vm._v(\" De eerste 6 of 12 maanden van jouw abonnement zijn een vaste looptijd. Tussentijds beƫindigen is dan niet mogelijk. Vanaf de eerste automatische verlenging kan je opzeggen met een abonnementsmaand opzegtermijn. \")]),_c('h3',[_vm._v(\"abonnementsmaand opzegtermijn\")]),_c('p',[_vm._v(\" Een abonnementsmaand opzegtermijn is de lopende abonnementsmaand van jouw abonnement plus 1 maand. De einddatum van je abonnement kan dus ook middenin een kalendermaand zijn. \")]),_c('p',[_vm._v(\" De eerst mogelijke einddatum van jouw abonnement vind je in onderstaand formulier. \")])]:_vm._e()],_c('hr'),(!_vm.subscriptionExpires)?_c('div',{staticClass:\"paragraph\"},[_vm._v(\" Abonnement kan opgezegd worden per:\"),_c('br'),_c('strong',[_vm._v(_vm._s(this.formatDate(_vm.firstCancellationDate)))])]):_vm._e(),_c('div',[(_vm.showMedicalReasonNotification)?_c('AlertInfo',[_vm._v(\" Wist je dat je jouw abonnement ook tijdelijk kan opschorten in verband met een medische reden? Je hoeft je abonnement dan niet te beƫindigen. \"),_c('a',{staticClass:\"link\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){return _vm.goToSuspend()}}},[_vm._v(\" Klik hier om een opschorting door te geven. \")])]):_vm._e()],1),_vm._l((_vm.inputFields),function(field,index){return _c('FormInput',{key:(\"field-\" + (field.name)),ref:index,refInFor:true,attrs:{\"inputField\":field}})}),(_vm.contactSupportReason)?_c('AlertInfo',[_vm._v(\" In het geval je jouw abonnement vervroegd wenst op te zeggen vanwege \"),(_vm.isMedicalReason)?[_vm._v(\" een medische oorzaak\")]:_vm._e(),(_vm.isMoving)?[_vm._v(\" een verhuizing\")]:_vm._e(),_vm._v(\", neem dan contact op met de klantenservice. Wij helpen je graag verder. \")],2):_vm._e(),_c('FormButton',{attrs:{\"caption\":'Abonnement opzeggen',\"loading\":_vm.currentStateIs(_vm.states.LOADING),\"disabled\":_vm.contactSupportReason}}),(!_vm.inputFields.upload.hidden)?_c('p',{staticClass:\"footnote\"},[_vm._v(\" *Maximaal 4 maanden eerder dan de getoonde einddatum. \")]):_vm._e()],2):_vm._e()],1):(_vm.queuedCancellationInfo.isProcessed === false && _vm.queuedCancellationInfo.processDate !== undefined && _vm.isLeavingWork)?_c('Content',[_c('h2',[_vm._v(\"Ik wil mijn abonnement opzeggen\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" Jouw werkgever heeft ons een uitdienstmelding doorgegeven, jouw abonnement wordt opgezegd per \"),_c('strong',[_vm._v(_vm._s(_vm.formatDate(_vm.queuedCancellationInfo.cancellationDate)))]),_vm._v(\". \")])]):(_vm.queuedCancellationInfo.isProcessed === false && _vm.queuedCancellationInfo.processDate !== undefined)?_c('Content',[_c('h2',[_vm._v(\"Ik wil mijn abonnement opzeggen\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" Jouw abonnement wordt opgezegd per \"),_c('strong',[_vm._v(_vm._s(_vm.formatDate(_vm.queuedCancellationInfo.cancellationDate)))]),_vm._v(\". Twee maanden voor de door jou gekozen einddatum ontvang je van ons de bevestiging van de opzegging per e-mail. \")]),_c('p',[_vm._v(\" Je hebt tot \"),_c('b',[_vm._v(_vm._s(_vm.formatDate(_vm.queuedCancellationInfo.processDate)))]),_vm._v(\" de tijd om je opzegging ongedaan te maken. Wil je toch blijven sporten met je huidige abonnement? Klik dan op de onderstaande button: \")]),_c('FormButton',{attrs:{\"caption\":'Opzegging annuleren'},on:{\"click\":function($event){return _vm.deleteCancellation()}}})],1):_c('Content',[_c('h2',[_vm._v(\"Ik wil mijn abonnement opzeggen\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" Jouw abonnement is opgezegd per \"),_c('strong',[_vm._v(_vm._s(_vm.formatDate(_vm.queuedCancellationInfo.cancellationDate)))]),_vm._v(\". \")]),_c('FormButton',{attrs:{\"caption\":'Naar overzicht'},on:{\"click\":function($event){return _vm.$router.replace({ name: 'users' })}}})],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\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 { State } from '@/mixins/state'\r\n\r\nimport {\r\n SubscriptionApi,\r\n GetPossibleSubscriptionEndDatesQuery,\r\n GetQueuedCancellationQuery,\r\n DeleteQueuedSubscriptionCancellationCommand,\r\n CancelReasonDto,\r\n QueuedCancellationDto,\r\n CancelReasonId\r\n} from '@/api'\r\n\r\nimport Content from '@/components/Content.vue'\r\nimport Toolbar from '@/components/Layout/Toolbar.vue'\r\nimport FormInput, { InputField, FormInputInstance } from '@/components/Form/Input.vue'\r\nimport FormButton from '@/components/Form/Button.vue'\r\nimport { Cancellation, User } from '@/types'\r\nimport { Watch } from 'vue-property-decorator'\r\nimport { formatDate } from '@/util/formatDate'\r\n\r\ninterface InputFields {\r\n cancellationDate: InputField;\r\n reason: InputField;\r\n upload: InputField;\r\n explanation: InputField;\r\n}\r\n\r\n@Component({\r\n components: {\r\n Content,\r\n Toolbar,\r\n FormInput,\r\n FormButton\r\n },\r\n methods: {\r\n formatDate\r\n }\r\n})\r\nexport default class SubscriptionCancel extends mixins(State) {\r\n inputFields: InputFields = {\r\n cancellationDate: {\r\n name: 'cancellationDate',\r\n value: '',\r\n required: true,\r\n type: 'select',\r\n options: [],\r\n placeholder: 'Graag opzeggen per',\r\n errors: []\r\n },\r\n\r\n reason: {\r\n name: 'reason',\r\n value: '',\r\n required: true,\r\n type: 'select',\r\n placeholder: 'Reden van opzeggen?',\r\n errors: [],\r\n options: []\r\n },\r\n\r\n upload: {\r\n name: 'upload',\r\n value: '',\r\n required: false,\r\n type: 'file',\r\n placeholder: 'Upload een verklaring van opzegging',\r\n errors: [],\r\n hidden: true,\r\n customErrorMessage: 'Vergeet niet je bestand te uploaden',\r\n info: 'Je kunt de volgende bestandstypen uploaden: .jpg, .png, .pdf',\r\n inputExplanationParagraph: 'Op de getoonde einddatum loopt jouw abonnement af. Je hebt aangegeven al bij de sportlocatie opgezegd te hebben. Is dit per een eerdere einddatum? Upload een bevestiging, dan kijken we of je in aanmerking komt voor onze coulanceregeling*. We sturen je een e-mail met daarin de definitieve einddatum van jouw abonnement.'\r\n },\r\n\r\n explanation: {\r\n name: 'explanation',\r\n value: '',\r\n required: false,\r\n type: 'textarea',\r\n placeholder: 'Eventuele toelichting',\r\n errors: [],\r\n hidden: true\r\n }\r\n }\r\n\r\n onError = false\r\n isLoading = true\r\n queuedCancellationInfo: QueuedCancellationDto|undefined = undefined\r\n reasons: CancelReasonDto[] = []\r\n showMedicalReasonNotification = false;\r\n\r\n firstCancellationDate = ''\r\n\r\n get isMedicalReason () {\r\n return CancelReasonId[this.inputFields.reason.value as keyof typeof CancelReasonId] === CancelReasonId.MedicalReason\r\n }\r\n\r\n get isLeavingWork () {\r\n return this.queuedCancellationInfo?.cancelReasonId === CancelReasonId.LeavingWork\r\n }\r\n\r\n get isMoving () {\r\n // relocate to another home / rehousing\r\n return CancelReasonId[this.inputFields.reason.value as keyof typeof CancelReasonId] === CancelReasonId.Moving\r\n }\r\n\r\n get isOther () {\r\n return CancelReasonId[this.inputFields.reason.value as keyof typeof CancelReasonId] === CancelReasonId.Other\r\n }\r\n\r\n get isCancelledAtSportLocation () {\r\n return CancelReasonId[this.inputFields.reason.value as keyof typeof CancelReasonId] === CancelReasonId.CancelledAtSportLocation\r\n }\r\n\r\n get currentUser (): User {\r\n return this.$store.state.currentUser\r\n }\r\n\r\n get subscription () {\r\n return this.currentUser.subscription\r\n }\r\n\r\n get cancellationInfo (): Cancellation {\r\n return this.$store.state.cancel.cancellation\r\n }\r\n\r\n get contactSupportReason () {\r\n if (!this.inputFields || !this.inputFields.reason) {\r\n return false\r\n }\r\n return this.currentUser.subscriptionDetails?.renewalNumber === 0 && (this.isMoving || this.isMedicalReason)\r\n }\r\n\r\n get subscriptionExpires () {\r\n return this.subscription?.subscriptionStatus === 'Expires'\r\n }\r\n\r\n @Watch('inputFields.reason.value')\r\n onInputValueChanged () {\r\n // Hide when contacting customer support, or when reason is not 'Other'.\r\n this.inputFields.explanation.hidden = this.contactSupportReason || !this.isOther\r\n\r\n if (this.isCancelledAtSportLocation) {\r\n this.inputFields.explanation.hidden = false\r\n this.inputFields.upload.hidden = false\r\n this.inputFields.upload.required = true\r\n } else if (this.isMedicalReason) {\r\n this.showMedicalReasonNotification = true\r\n } else {\r\n this.inputFields.upload.hidden = true\r\n this.inputFields.upload.required = false\r\n this.showMedicalReasonNotification = false\r\n }\r\n }\r\n\r\n mounted () {\r\n this.queuedCancellationInfo = undefined\r\n this.isLoading = true\r\n let isLoadingEndDates = true\r\n let isLoadingCancelReasons = true\r\n let isLoadingQueueInfo = true\r\n\r\n const cancellationInfo = this.cancellationInfo\r\n if (this.subscriptionExpires) {\r\n this.inputFields.cancellationDate.hidden = true\r\n this.inputFields.cancellationDate.value = this.subscription?.endDate || ''\r\n } else {\r\n this.inputFields.cancellationDate.value = cancellationInfo.cancellationDate\r\n }\r\n this.inputFields.reason.value = cancellationInfo.cancelReasonId\r\n this.inputFields.explanation.value = cancellationInfo.cancelExplanation || ''\r\n const api = new SubscriptionApi()\r\n\r\n const endDatesQuery: GetPossibleSubscriptionEndDatesQuery = {\r\n subscriptionId: this.currentUser.subscription?.subscriptionId || 0\r\n }\r\n api.subscriptionGetPossibleSubscriptionEndDates(endDatesQuery)\r\n .then((data) => {\r\n const dates = data.data\r\n // Show error when no end dates are returned.\r\n if (dates.length === 0) {\r\n this.onError = true\r\n }\r\n\r\n this.firstCancellationDate = dates[0]\r\n\r\n dates.forEach(item => {\r\n if (this.inputFields.cancellationDate.options) {\r\n this.inputFields.cancellationDate.options.push({\r\n value: item,\r\n label: formatDate(item)\r\n })\r\n }\r\n })\r\n\r\n isLoadingEndDates = false\r\n this.isLoading = isLoadingEndDates || isLoadingCancelReasons || isLoadingQueueInfo\r\n })\r\n .catch(() => {\r\n this.onError = true\r\n })\r\n\r\n api.subscriptionGetCancelReasons()\r\n .then((data) => {\r\n data.data.forEach(item => {\r\n if (this.inputFields.reason.options) {\r\n this.reasons.push(item)\r\n\r\n this.inputFields.reason.options.push(\r\n {\r\n label: item.reason || '',\r\n value: (item.cancelReasonId || '').toString()\r\n }\r\n )\r\n }\r\n })\r\n\r\n isLoadingCancelReasons = false\r\n this.isLoading = isLoadingEndDates || isLoadingCancelReasons || isLoadingQueueInfo\r\n })\r\n .catch(() => {\r\n this.onError = true\r\n })\r\n\r\n const queuedQuery: GetQueuedCancellationQuery = {\r\n subscriptionId: this.currentUser.subscription?.subscriptionId || 0\r\n }\r\n api.subscriptionGetQueuedCancellationInfo(queuedQuery)\r\n .then((data) => {\r\n this.queuedCancellationInfo = data.data\r\n\r\n isLoadingQueueInfo = false\r\n\r\n this.isLoading = isLoadingEndDates || isLoadingCancelReasons || isLoadingQueueInfo\r\n })\r\n .catch((error) => {\r\n // 404 when no queued cancellation is found.\r\n isLoadingQueueInfo = false\r\n this.isLoading = isLoadingEndDates || isLoadingCancelReasons || isLoadingQueueInfo\r\n\r\n // this endpoint has a 'valid' response of notFound (404)\r\n // so we need to check for this. In other cases e.g. 500 errors\r\n // we need to show the user an message that something got wrong.\r\n if (error.response && error.response.status !== 404) {\r\n // turn off the loader and show an the errormessage.\r\n this.isLoading = false\r\n this.onError = true\r\n }\r\n })\r\n }\r\n\r\n public async deleteCancellation () {\r\n const api = new SubscriptionApi()\r\n\r\n const fields: DeleteQueuedSubscriptionCancellationCommand = {\r\n subscriptionId: this.currentUser.subscription?.subscriptionId || 0\r\n\r\n }\r\n await api.subscriptionDeleteSubscriptionCancellation(fields).then(() => {\r\n this.$router.push({ name: 'subscriptionCancelDeleted' })\r\n })\r\n .catch((error) => {\r\n this.setErrors(error.response.data.errors)\r\n })\r\n }\r\n\r\n public async cancelSubscription () {\r\n this.clearErrors()\r\n if (!this.validate()) {\r\n return\r\n }\r\n\r\n this.$store.commit('cancel/SET_CANCELLATION', {\r\n cancellationDate: this.inputFields.cancellationDate.value,\r\n cancelReasonId: this.inputFields.reason.value,\r\n cancelUploadGuid: this.inputFields.upload.value,\r\n cancelExplanation: this.inputFields.explanation.hidden === true ? null : this.inputFields.explanation.value\r\n })\r\n this.$router.push({ name: 'subscriptionCancelConfirm' })\r\n }\r\n\r\n public setErrors (errors: []) {\r\n Object.entries(errors).forEach(([errorKey, errorValue]) => {\r\n Object.entries(this.inputFields).forEach(([fieldKey, fieldValue]) => {\r\n if (errorKey.toLowerCase() === fieldKey.toLowerCase()) {\r\n fieldValue.errors = errorValue\r\n }\r\n })\r\n })\r\n }\r\n\r\n public clearErrors () {\r\n Object.values(this.inputFields).forEach((fieldValue: InputField) => {\r\n fieldValue.errors = []\r\n })\r\n }\r\n\r\n public validate () {\r\n let valid = true\r\n Object.values(this.inputFields).forEach((fieldValue: InputField) => {\r\n const field = (this.$refs[fieldValue.name] as FormInputInstance)\r\n if (Array.isArray(field)) {\r\n valid = field.every((inputField: FormInputInstance) => inputField.validate()) && valid\r\n } else {\r\n valid = field.validate() && valid\r\n }\r\n })\r\n return valid\r\n }\r\n\r\n public back () {\r\n this.$router.push({ name: 'subscriptionActions' })\r\n }\r\n\r\n public goToSuspend () {\r\n this.$router.push({ name: 'subscriptionSuspend' })\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!./Cancel.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!./Cancel.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Cancel.vue?vue&type=template&id=194a2f82&\"\nimport script from \"./Cancel.vue?vue&type=script&lang=ts&\"\nexport * from \"./Cancel.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Cancel.vue?vue&type=style&index=0&id=194a2f82&prod&lang=css&\"\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--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cancel.vue?vue&type=style&index=0&id=194a2f82&prod&lang=css&\"","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"],"sourceRoot":""}