{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.object.values.js","webpack:///./node_modules/core-js/modules/es.string.starts-with.js","webpack:///./node_modules/core-js/internals/not-a-regexp.js","webpack:///./src/views/CashBackAction.vue?783b","webpack:///./node_modules/core-js/internals/correct-is-regexp-logic.js","webpack:///./src/util/formatDate.ts","webpack:///./src/views/CashBackAction.vue?6590","webpack:///./src/views/CashBackAction.vue","webpack:///./src/views/CashBackAction.vue?c55d","webpack:///./src/views/CashBackAction.vue?dca9"],"names":["$","$values","values","target","stat","O","getOwnPropertyDescriptor","f","toLength","toString","notARegExp","requireObjectCoercible","correctIsRegExpLogic","IS_PURE","$startsWith","startsWith","min","Math","CORRECT_IS_REGEXP_LOGIC","MDN_POLYFILL_BUG","descriptor","String","prototype","writable","proto","forced","searchString","that","this","index","arguments","length","undefined","search","call","slice","isRegExp","module","exports","it","TypeError","wellKnownSymbol","MATCH","METHOD_NAME","regexp","error1","error2","formatDate","date","objDate","Date","getFullYear","months","concat","getDate","getMonth","render","_vm","_h","$createElement","_c","_self","staticClass","_v","currentStateIs","states","ERROR","hasErrors","_e","attrs","path","COMPLETE","INITIAL","LOADED","LOADING","done","sentEmail","on","$event","preventDefault","createCashBack","_s","cashbackEndDate","_l","field","key","ref","name","refInFor","inputChange","hasDirtyInput","staticRenderFns","CashBackAction","_mixins","_inherits","_super","_createSuper","_this$currentUser$sub","_this$currentUser$sub2","_this$currentUser$emp","_this$currentUser$emp2","_this$currentUser$sub3","_this$currentUser$emp3","_this$currentUser$emp4","_this","_classCallCheck","inputFields","subscriptionId","value","currentUser","subscription","type","inline","placeholder","errors","required","readonly","disabled","iban","employeeDetails","ibanAccountHolder","_createClass","get","$store","state","_this$currentUser$sub4","_this$currentUser$sub5","subscriptionDetails","sportLocationNumber","_loadCashBack","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this$currentUser$sub6","_this$currentUser$sub7","_this$currentUser$sub8","_this$currentUser$sub9","api","_this2","wrap","_context","prev","next","showCashbackPageInPortal","CashBackApi","cashBackCashBackRequested","then","_ref","data","catch","setState","stop","loadCashBack","apply","_createCashBack","_callee2","fields","_context2","clearErrors","validateInput","abrupt","Number","cashBackCreateCashBack","t0","setErrors","response","$root","$emit","_this3","Object","entries","forEach","_ref2","_ref3","_slicedToArray","errorKey","errorValue","_ref4","_ref5","fieldKey","fieldValue","toLowerCase","_this4","valid","keys","input","Array","isArray","$refs","validate","hasError","mixins","State","__decorate","Component","components","Content","Toolbar","FormInput","FormButton","methods","component"],"mappings":"qGAAA,IAAIA,EAAI,EAAQ,QACZC,EAAU,EAAQ,QAAgCC,OAItDF,EAAE,CAAEG,OAAQ,SAAUC,MAAM,GAAQ,CAClCF,OAAQ,SAAgBG,GACtB,OAAOJ,EAAQI,O,oCCNnB,IAAIL,EAAI,EAAQ,QACZM,EAA2B,EAAQ,QAAmDC,EACtFC,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAa,EAAQ,QACrBC,EAAyB,EAAQ,QACjCC,EAAuB,EAAQ,QAC/BC,EAAU,EAAQ,QAGlBC,EAAc,GAAGC,WACjBC,EAAMC,KAAKD,IAEXE,EAA0BN,EAAqB,cAE/CO,GAAoBN,IAAYK,KAA6B,WAC/D,IAAIE,EAAad,EAAyBe,OAAOC,UAAW,cAC5D,OAAOF,IAAeA,EAAWG,SAF8B,GAOjEvB,EAAE,CAAEG,OAAQ,SAAUqB,OAAO,EAAMC,QAASN,IAAqBD,GAA2B,CAC1FH,WAAY,SAAoBW,GAC9B,IAAIC,EAAOlB,EAASE,EAAuBiB,OAC3ClB,EAAWgB,GACX,IAAIG,EAAQrB,EAASQ,EAAIc,UAAUC,OAAS,EAAID,UAAU,QAAKE,EAAWL,EAAKI,SAC3EE,EAASxB,EAASiB,GACtB,OAAOZ,EACHA,EAAYoB,KAAKP,EAAMM,EAAQJ,GAC/BF,EAAKQ,MAAMN,EAAOA,EAAQI,EAAOF,UAAYE,M,uBC/BrD,IAAIG,EAAW,EAAQ,QAEvBC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OAAOxK,OAAO0B,KAAK8E,aAAakE,SAAQ,SAACS,GACvCU,EAAWA,GAAYV,EAAWnE,OAAOnF,OAAS,KAE7CgK,IACR,CAAA1G,IAAA,UAAAuB,MAED,WACEhF,KAAK6H,mBACN7D,EA5JgC,CAASoG,eAAOC,SAA9BrG,EAAcsG,eAAA,CAXlCC,eAAU,CACTC,WAAY,CACVC,eACAC,eACAC,iBACAC,mBAEFC,QAAS,CACP1J,sBAGiB6C,WClIoX,I,wBCQrY8G,EAAY,eACd,EACAlJ,EACAmC,GACA,EACA,KACA,WACA,MAIa,aAAA+G,E","file":"js/chunk-d88e8bca.4b1e30a7.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","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","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!./CashBackAction.vue?vue&type=style&index=0&id=8a3f9f80&prod&lang=scss&scoped=true&\"","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\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 _c('div',{staticClass:\"view view--toolbar\"},[_c('Toolbar',[_c('h2',{},[_vm._v(\"Cashback actie\")])]),_c('Content',[(_vm.currentStateIs(this.states.ERROR) && !_vm.hasErrors)?_c('AlertError',[_vm._v(\" Oops, er is een onbekende fout opgetreden bij het doorgeven van je gegevens. \")]):(_vm.currentStateIs(this.states.ERROR))?_c('AlertError',[_vm._v(\" Oops, je bent een of meerdere velden vergeten in te vullen, of ze zijn niet goed ingevuld. Pas de velden hieronder alsjeblieft aan en probeer het nog eens. \")]):_vm._e(),(_vm.done)?_c('AlertSuccess',[_c('strong',[_vm._v(\"Done!\")]),_vm._v(\" Je bent al aangemeld voor de cashback actie. De e-mailbevestiging kan je terugvinden in je mailbox. Check zo nodig je ongewenste mail. \"),_c('br'),_c('br'),_c('router-link',{staticClass:\"link\",attrs:{\"to\":{ path: '/' }}},[_c('span',[_vm._v(\"Klik hier\")])]),_vm._v(\" om terug te keren naar het overzicht. \")],1):_vm._e(),(_vm.currentStateIs(this.states.COMPLETE))?_c('AlertSuccess',[_c('strong',[_vm._v(\"Gelukt!\")]),_vm._v(\" Je bent aangemeld voor de cashback actie. Ter bevestiging hebben we je een e-mail gestuurd. Check zo nodig je ongewenste mail. \"),_c('br'),_c('br'),_c('router-link',{staticClass:\"link\",attrs:{\"to\":{ path: '/' }}},[_c('span',[_vm._v(\"Klik hier\")])]),_vm._v(\" om terug te keren naar het overzicht. \")],1):_vm._e(),(_vm.currentStateIs(_vm.states.INITIAL))?_c('Loader'):_vm._e(),((_vm.currentStateIs(this.states.LOADED) || _vm.currentStateIs(this.states.LOADING) || _vm.currentStateIs(this.states.ERROR))\n && !_vm.done && !_vm.sentEmail\n )?_c('form',{attrs:{\"novalidate\":\"\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.createCashBack()}}},[_c('h2',[_vm._v(\"1 maand cashback actie\")]),_c('p',{staticClass:\"paragraph\"},[_vm._v(\" Goed nieuws! Omdat jij je tijdens de actieperiode hebt aangemeld voor bedrijfsfitness, mag jij 1 abonnementsmaand cashback aanvragen! Doe dit uiterlijk \"+_vm._s(_vm.formatDate(_vm.cashbackEndDate))+\" via onderstaand formulier. \"),_c('ul',[_c('li',[_vm._v(\" Zijn jouw bankrekeninggegevens al bij ons bekend, dan hoef je alleen de gegevens te controleren en op ‘Cashback aanvragen’ te klikken. \")]),_c('li',[_vm._v(\" Zijn jouw gegevens nog niet bij ons bekend, dan vragen we je de velden in te vullen en het formulier naar ons te verzenden. \")])]),_vm._v(\" Na 15 februari ontvang je het bedrag t.w.v. 1 abonnementsmaand op jouw rekening. Veel sport plezier! \")]),(_vm.isWorkit)?_c('AlertInfo',[_vm._v(\" Bij jouw Workit abonnement geniet jij al van de 1e maand gratis. Daarnaast kan je met het onderstaand formulier ook nog eens 1 maand cashback aanvragen. Dit bedrag krijg je uitbetaald zodra je minimaal 2 maanden met Workit sport. \")]):_vm._e(),_vm._l((_vm.inputFields),function(field){return _c('FormInput',{key:(\"field-\" + (field.name)),ref:field.name,refInFor:true,attrs:{\"inputField\":field},on:{\"change\":_vm.inputChange}})}),_c('FormButton',{attrs:{\"caption\":'Verzenden',\"loading\":_vm.currentStateIs(this.states.LOADING),\"disabled\":!_vm.hasDirtyInput}}),_c('p',{staticClass:\"paragraph\"},[_c('img',{attrs:{\"src\":\"action/banner-cashback-1-maand-gratis-sporten.png\",\"alt\":\"Sport nu 1 maand gratis!\"}})]),_c('h3',[_vm._v(\"Voorwaarden\")]),_c('p',{staticClass:\"paragraph\"},[_c('ul',[_c('li',[_vm._v(\" Je bent zelf verantwoordelijk voor het juist invullen van het formulier, dan wel de controle op de vooraf ingevulde gegevens; \")]),_c('li',[_vm._v(\" Je dient uiterlijk \"+_vm._s(_vm.formatDate(_vm.cashbackEndDate))+\" de cashback aan te vragen via het formulier op deze pagina. \")])])])],2):_vm._e()],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\r\nimport Component, { mixins } from 'vue-class-component'\r\nimport { State } from '@/mixins/state'\r\n\r\nimport { User } from '@/types'\r\nimport Content from '@/components/Content.vue'\r\nimport Toolbar from '@/components/Layout/Toolbar.vue'\r\nimport FormInput, { InputField } from '@/components/Form/Input.vue'\r\nimport FormButton from '@/components/Form/Button.vue'\r\nimport { CashBackApi, CreateCashBackCommand } from '@/api'\r\n\r\nimport { formatDate } from '@/util/formatDate'\r\n\r\ninterface InputFields {\r\n iban: InputField;\r\n subscriptionId: InputField;\r\n ibanAccountHolder: 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 CashBackAction extends mixins(State) {\r\n inputFields: InputFields = {\r\n subscriptionId: {\r\n name: 'subscriptionId',\r\n value: this.currentUser.subscription?.subscriptionId?.toString() || '',\r\n type: 'number',\r\n inline: false,\r\n placeholder: 'Abonnementsnummer',\r\n errors: [],\r\n required: true,\r\n readonly: true,\r\n disabled: true\r\n },\r\n iban: {\r\n name: 'iban',\r\n value: this.currentUser.employeeDetails?.iban || '',\r\n type: 'text',\r\n inline: false,\r\n placeholder: 'Iban',\r\n errors: [],\r\n required: true\r\n },\r\n ibanAccountHolder: {\r\n name: 'ibanAccountHolder',\r\n value: this.currentUser.employeeDetails?.ibanAccountHolder || '',\r\n type: 'text',\r\n inline: false,\r\n placeholder: 'Naam rekeninghouder',\r\n errors: [],\r\n required: true\r\n }\r\n }\r\n\r\n hasDirtyInput = false || (!!this.currentUser.subscription?.subscriptionId && !!this.currentUser.employeeDetails?.iban && !!this.currentUser.employeeDetails?.ibanAccountHolder)\r\n\r\n // Show a message immediately after the cashback is requested\r\n sentEmail = false\r\n\r\n // Show a message when someone is navigation to the cashback page on a later moment\r\n done = false\r\n\r\n cashbackEndDate = '';\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 isWorkit (): boolean {\r\n if (this.currentUser.subscriptionDetails?.sportLocationNumber?.startsWith('FC7000')) {\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n public async loadCashBack () {\r\n if (this.currentUser.subscription?.subscriptionId) {\r\n if (this.currentUser.subscriptionDetails?.showCashbackPageInPortal === true) {\r\n this.cashbackEndDate = this.currentUser.subscriptionDetails?.cashbackEndDate || ''\r\n\r\n const api = new CashBackApi()\r\n await api.cashBackCashBackRequested(this.currentUser.subscription?.subscriptionId)\r\n .then(({ data }) => {\r\n this.done = data\r\n })\r\n .catch(() => {\r\n this.setState(this.states.ERROR)\r\n })\r\n } else {\r\n this.setState(this.states.ERROR)\r\n }\r\n }\r\n\r\n this.setState(this.states.LOADED)\r\n }\r\n\r\n public async createCashBack () {\r\n this.clearErrors()\r\n if (!this.validateInput()) {\r\n return\r\n }\r\n\r\n const api = new CashBackApi()\r\n\r\n const fields: CreateCashBackCommand = {\r\n subscriptionId: Number(this.inputFields.subscriptionId.value),\r\n ibanAccountHolder: this.inputFields.ibanAccountHolder.value,\r\n iban: this.inputFields.iban.value\r\n }\r\n\r\n try {\r\n this.state = this.states.LOADING\r\n this.clearErrors()\r\n await api.cashBackCreateCashBack(fields)\r\n this.hasDirtyInput = false\r\n this.sentEmail = true\r\n\r\n this.state = this.states.COMPLETE\r\n } catch (error) {\r\n this.state = this.states.ERROR\r\n\r\n this.setErrors(error.response.data.errors)\r\n\r\n this.$root.$emit('scrollToTop')\r\n }\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 inputChange () {\r\n this.hasDirtyInput = true\r\n }\r\n\r\n private validateInput () {\r\n let valid = true\r\n\r\n Object.keys(this.inputFields).forEach((key: string) => {\r\n let input\r\n if (Array.isArray(this.$refs[key])) {\r\n input = (this.$refs[key] as Element[])[0]\r\n } else {\r\n input = this.$refs[key]\r\n }\r\n valid = (input as FormInput).validate() && valid\r\n })\r\n\r\n return valid\r\n }\r\n\r\n get hasErrors () {\r\n let hasError = false\r\n Object.values(this.inputFields).forEach((fieldValue: InputField) => {\r\n hasError = hasError || fieldValue.errors.length > 0\r\n })\r\n return hasError\r\n }\r\n\r\n mounted () {\r\n this.loadCashBack()\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!./CashBackAction.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!./CashBackAction.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CashBackAction.vue?vue&type=template&id=8a3f9f80&scoped=true&\"\nimport script from \"./CashBackAction.vue?vue&type=script&lang=ts&\"\nexport * from \"./CashBackAction.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CashBackAction.vue?vue&type=style&index=0&id=8a3f9f80&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 \"8a3f9f80\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}