%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/
Upload File :
Create Path :
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/account-subscription.js.map

{"version":3,"file":"components/account-subscription.js","sources":["webpack:///./components/slots/Block.vue?a39f","webpack:///./components/slots/Block.vue","webpack:///./components/slots/Block.vue?8d1a","webpack:///./components/slots/Block.vue?1f5b","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?1205","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?4f37","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?0a44","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?4208","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?34e4","webpack:///./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?94e3","webpack:///./components/blocks/Account/financial/AccountSubscription.vue?877d","webpack:///./components/blocks/Account/financial/AccountSubscription.vue","webpack:///./components/blocks/Account/financial/AccountSubscription.vue?a21f","webpack:///./components/blocks/Account/financial/AccountSubscription.vue?f0fb"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"bg-gray py-8 md:py-20 px-4 md:px-8 mb-8\"},[_vm._ssrNode(\"<div class=\\\"max-w-xl mx-auto w-full\\\"><header class=\\\"text-center mb-10\\\"><h2\"+(_vm._ssrClass(\"text-2xl sm:text-3xl font-bold\",_vm.description ? 'mb-8' : ''))+\">\"+_vm._ssrEscape(_vm._s(_vm.title))+\"</h2> \"+((_vm.description)?(\"<p class=\\\"text-sm sm:text-base\\\">\"+_vm._ssrEscape(_vm._s(_vm.description))+\"</p>\"):\"<!---->\")+\"</header></div> \"),_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"mx-auto w-full\",_vm.width ? _vm.width : 'max-w-xl'))+\">\",\"</div>\",[_vm._t(\"default\")],2)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n  props: {\n    title: {\n      type: String,\n      required: true\n    },\n    description: {\n      type: String,\n      required: false\n    },\n    width: {\n      type: String,\n      required: false,\n    }\n  }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Block.vue?vue&type=template&id=0e972406&\"\nimport script from \"./Block.vue?vue&type=script&lang=js&\"\nexport * from \"./Block.vue?vue&type=script&lang=js&\"\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  \"127f880a\"\n  \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {Header: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/layout/Header.vue').default})\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--4-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--4-oneOf-1-2!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=style&index=0&id=7d8d7028&lang=postcss&scoped=true&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n  add(\"ce03f3c6\", content, true, context)\n};","export * from \"-!../../../../../node_modules/vue-style-loader/index.js??ref--4-oneOf-1-0!../../../../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--4-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--4-oneOf-1-2!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=style&index=0&id=7d8d7028&lang=postcss&scoped=true&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/@nuxt/postcss8/node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".modal[data-v-7d8d7028]{padding-top:20vh}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.value == true),expression:\"value == true\"}],staticClass:\"modal fixed z-50 bottom-0 left-0 w-full h-screen\"},[_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"absolute z-10 top-0 left-0 w-full h-full bg-black bg-opacity-25 cursor-pointer transition duration-100\",_vm.isActive == true ? 'opacity-100' : 'opacity-0'))+\" data-v-7d8d7028></div> \"),_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"relative z-20 h-full bg-white shadow-lg p-10 pt-16 transition transform duration-100\",_vm.isActive == true ? 'translate-y-0 opacity-100' : 'translate-y-full opacity-0'))+\" data-v-7d8d7028>\",\"</div>\",[_vm._ssrNode(\"<button type=\\\"button\\\" class=\\\"absolute top-6 right-10 uppercase hover:text-blue-light focus:outline-none transition\\\" data-v-7d8d7028>Close</button> \"),_vm._ssrNode(\"<div class=\\\"relative h-full bg-gray p-8 overflow-y-auto\\\" data-v-7d8d7028>\",\"</div>\",[_vm._ssrNode(\"<div class=\\\"max-w-lg w-full mx-auto\\\" data-v-7d8d7028>\",\"</div>\",[_vm._ssrNode(((_vm.subscription)?(\"<h2 class=\\\"mb-8 text-center text-4xl font-bold\\\" data-v-7d8d7028>Update Card Details</h2>\"):(\"<h2 class=\\\"mb-8 text-center text-4xl font-bold\\\" data-v-7d8d7028>Your Card Details</h2>\"))+\" \"+((_vm.payment_methods.length)?(\"<div class=\\\"grid grid-cols-1 gap-y-2 mb-6\\\" data-v-7d8d7028>\"+(_vm._ssrList((_vm.payment_methods),function(card,key){return (\"<label class=\\\"flex items-center py-3 px-4 cursor-pointer bg-white rounded-lg\\\" data-v-7d8d7028><input type=\\\"radio\\\"\"+(_vm._ssrAttr(\"value\",card.id))+(_vm._ssrAttr(\"checked\",_vm._q(_vm.selected_card,card.id)))+\" data-v-7d8d7028> <span\"+(_vm._ssrClass(null,'icon-'+card.card.brand))+\" data-v-7d8d7028></span> <span class=\\\"px-2\\\" data-v-7d8d7028>\"+_vm._ssrEscape(\"****\"+_vm._s(card.card.last4))+\"</span> <span class=\\\"px-2\\\" data-v-7d8d7028>\"+_vm._ssrEscape(_vm._s(card.card.exp_month+'/'+card.card.exp_year))+\"</span></label>\")}))+\" <div class=\\\"relative text-center my-6\\\" data-v-7d8d7028><span class=\\\"absolute z-10 top-1/2 left-0 transform -translate-y-1/2 block w-full h-0.5 w-full bg-black bg-opacity-10\\\" data-v-7d8d7028></span> <span class=\\\"relative z-20 inline-block px-6 bg-gray uppercase\\\" data-v-7d8d7028>Or add new Card</span></div> \"+((_vm.selected_card)?(\"<div class=\\\"text-center\\\" data-v-7d8d7028><button class=\\\"text-blue-light uppercase\\\" data-v-7d8d7028>Add New Card</button></div>\"):\"<!---->\")+\"</div>\"):\"<!---->\")+\" \"),_vm._ssrNode(\"<div\"+(_vm._ssrStyle(null,null, { display: (_vm.selected_card == null) ? '' : 'none' }))+\" data-v-7d8d7028>\",\"</div>\",[_c('ValidationObserver',{ref:\"paymentForm\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.submitForm($event)}}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Name on Card\"}},[_c('t-input',{attrs:{\"type\":\"text\",\"placeholder\":\"Name on Card\"},model:{value:(_vm.card_name),callback:function ($$v) {_vm.card_name=$$v},expression:\"card_name\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('t-input-group',{attrs:{\"label\":\"Card Information\"}},[_c('div',{staticClass:\"px-4 py-4 bg-white border border-black border-opacity-20 rounded-xl\",attrs:{\"id\":\"subscription-card-element\"}})]),_vm._v(\" \"),_c('t-input-group',{attrs:{\"label\":\"Discount Code\"}},[_c('t-input',{attrs:{\"type\":\"text\"},model:{value:(_vm.discount_code),callback:function ($$v) {_vm.discount_code=$$v},expression:\"discount_code\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center px-10\"},[_c('button',{staticClass:\"w-full btn btn-primary btn-small rounded-full\",attrs:{\"disabled\":_vm.working == true,\"type\":\"submit\"}},[(_vm.working == false)?_c('div',[_vm._v(\"Submit\")]):_c('span',{staticClass:\"flex items-center justify-center\"},[_c('svg',{staticClass:\"animate-spin -ml-1 mr-3 h-5 w-5 text-current\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\"}},[_c('circle',{staticClass:\"opacity-25\",attrs:{\"cx\":\"12\",\"cy\":\"12\",\"r\":\"10\",\"stroke\":\"currentColor\",\"stroke-width\":\"4\"}}),_vm._v(\" \"),_c('path',{staticClass:\"opacity-75\",attrs:{\"fill\":\"currentColor\",\"d\":\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"}})]),_vm._v(\" \"),_c('span',[_vm._v(\"Processing\")])])])]),_vm._v(\" \"),_c('p',{staticClass:\"text-sm text-center mt-6 text-black text-opacity-75\"},[_vm._v(\"By subscribing to Take a Seat you are agreeing to all site \"),_c('NuxtLink',{staticClass:\"text-blue-light hover:underline\",attrs:{\"to\":\"/terms-conditions\",\"target\":\"_blank\"}},[_vm._v(\"Terms and Conditions\")]),_vm._v(\". Please read carefully before continuing.\")],1)],1)])],1),_vm._ssrNode(\" \"+((_vm.selected_card)?(\"<div data-v-7d8d7028><div class=\\\"flex items-center justify-center px-10\\\" data-v-7d8d7028><button\"+(_vm._ssrAttr(\"disabled\",_vm.working == true))+\" type=\\\"button\\\" class=\\\"w-full btn btn-primary btn-small rounded-full\\\" data-v-7d8d7028>\"+((_vm.working == false)?(\"<div data-v-7d8d7028>Submit</div>\"):(\"<span class=\\\"flex items-center justify-center\\\" data-v-7d8d7028><svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\" class=\\\"animate-spin -ml-1 mr-3 h-5 w-5 text-current\\\" data-v-7d8d7028><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"4\\\" class=\\\"opacity-25\\\" data-v-7d8d7028></circle> <path fill=\\\"currentColor\\\" d=\\\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\\\" class=\\\"opacity-75\\\" data-v-7d8d7028></path></svg> <span data-v-7d8d7028>Processing</span></span>\"))+\"</button></div></div>\"):\"<!---->\"))],2)])],2)],2)}\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\nexport default {\n  props: {\n    value: {\n      required: true\n    }\n  },\n\n  data() {\n    return {\n      isActive: false,\n      working: false,\n      card: {},\n      selected_card: null,\n      card_name: null,\n      discount_code: '',\n    }\n  },\n\n  computed: {\n    setup_intent() {\n      return this.$store.state.account.billing.setupIntent\n    },\n    payment_methods() {\n      return this.$store.state.account.billing.paymentMethods\n    },\n    default_payment_method() {\n      return this.$store.state.account.billing.defaultPaymentMethod\n    },\n    subscription() {\n      return this.$store.state.account.subscription.subscription\n    }\n  },\n\n  mounted() {\n    const elements = this.$stripe.elements();\n\n    this.$store.dispatch('account/billing/setupIntent');\n\n    this.card = elements.create('card', {\n      style: {\n        base: {\n          fontSize: '15px',\n          fontFamily: 'Poppins, sans-serif'\n        }\n      }\n    });\n\n    this.card.mount('#subscription-card-element');\n  },\n\n  methods: {\n    closeModal: function () {\n      this.$emit(\"input\", !this.value);\n    },\n\n    submitForm() {\n      this.$refs.paymentForm.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.submitCard();\n      });\n    },\n\n    async submitCard() {\n      if(this.setup_intent !== null) {\n        this.working = true;\n        const { setupIntent, error } = await this.$stripe.confirmCardSetup(\n          this.setup_intent, {\n            payment_method: {\n              card: this.card,\n              billing_details: {\n                name: this.card_name\n              }\n            }\n          });\n\n        if (error) {\n          this.$toast.error(error.message).goAway(3000);\n          this.$store.dispatch('account/billing/setupIntent')\n          this.working = false;\n        } else {\n          if(!this.subscription) {\n            this.startSubscription(setupIntent.payment_method)\n          } else {\n            this.saveCard(setupIntent.payment_method);\n          }\n        }\n      }\n    },\n\n    async startSubscription(payment_method) {\n      this.working = true;\n      if(this.working == true) {\n        await this.$store.dispatch('account/subscription/startSubscription', {\n          payment_method: payment_method,\n          discount_code: this.discount_code\n        }).then(() => {\n          this.$store.dispatch('account/subscription/getSubscription')\n          this.$store.dispatch('account/progress/get', { slug: 'financial'})\n          this.$toast.success('Successfully started your subscription!').goAway(3000);\n          this.$emit(\"input\", false);\n          this.working = false;\n        }).catch((error) => {\n          this.$store.dispatch('account/billing/setupIntent')\n          this.working = false;\n          this.$toast.error(error.response.data).goAway(3000);\n        })\n      }\n    },\n\n    async saveCard(payment_method) {\n      await this.$store.dispatch('account/billing/savePaymentMethod', {\n        payment_method: payment_method,\n        discount_code: this.discount_code\n      }).then(() => {\n        this.$store.dispatch('account/subscription/getSubscription')\n        this.$toast.success('Successfully updated your subscription!').goAway(3000);\n        this.$emit(\"input\", false);\n        this.working = false;\n      }).catch((error) => {\n        this.working = false;\n      })\n    }\n  },\n\n  watch: {\n    value: function () {\n      if(this.value == true) {\n        setTimeout(() => {\n          this.isActive = true;\n        }, 100)\n      } else {\n        setTimeout(() => {\n          this.isActive = false;\n        }, 100)\n      }\n    }\n  }\n}\n","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubscriptionCardModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SubscriptionCardModal.vue?vue&type=template&id=7d8d7028&scoped=true&\"\nimport script from \"./SubscriptionCardModal.vue?vue&type=script&lang=js&\"\nexport * from \"./SubscriptionCardModal.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n  \n  var style0 = require(\"./SubscriptionCardModal.vue?vue&type=style&index=0&id=7d8d7028&lang=postcss&scoped=true&\")\nif (style0.__inject__) style0.__inject__(context)\n\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  injectStyles,\n  \"7d8d7028\",\n  \"595193e0\"\n  \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{\"title\":\"Subscription\",\"description\":\"You can manage your subscription details here. Remember to set up your subscription to get your account live and receive bookings.\",\"width\":\"max-w-5xl\"}},[_c('div',{staticClass:\"grid grid-cols-1 lg:grid-cols-2 gap-10\"},[_c('div',{staticClass:\"border border-black border-opacity-20 p-6 md:p-10\"},[_c('h2',{staticClass:\"text-2xl font-medium\"},[_vm._v(\"Standard Plan\")]),_vm._v(\" \"),_c('span',{staticClass:\"block text-lg mb-3\"},[_vm._v(\"£20/pm\")]),_vm._v(\" \"),(_vm.subscription)?_c('div',{staticClass:\"grid grid-cols-2 gap-4 bg-green bg-opacity-50 border border-green p-2 px-3 rounded-md\"},[_c('span',{staticClass:\"block text-sm text-black\"},[_vm._v(\"Status: \"+_vm._s(_vm.subscription.active == 'active' ? 'Active' : 'Inactive'))]),_vm._v(\" \"),(_vm.subscription.is_grace_period == true)?_c('span',{staticClass:\"block text-sm text-black\"},[_vm._v(\"Ends: \"+_vm._s(_vm.subscription.ends_at))]):_vm._e()]):_vm._e(),_vm._v(\" \"),(_vm.benefits)?_c('div',{staticClass:\"my-3 mb-5\"},_vm._l((_vm.benefits),function(benefit,key){return _c('div',{key:key,staticClass:\"my-1 flex items-center text-sm text-black text-opacity-90\"},[_c('svg',{staticClass:\"w-5 h-5 mr-1 text-black\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\",\"stroke\":\"currentColor\"}},[_c('path',{attrs:{\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",\"stroke-width\":\"2\",\"d\":\"M5 13l4 4L19 7\"}})]),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(benefit.text))])])}),0):_vm._e(),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-small btn-primary rounded-full\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){_vm.isModalOpen =! _vm.isModalOpen}}},[(_vm.subscription)?_c('span',[_vm._v(\"Edit/update Payment details\")]):_c('span',[_vm._v(\"Start Subscription\")])]),_vm._v(\" \"),(_vm.subscription)?_c('div',{staticClass:\"mt-5\"},[(_vm.working)?_c('div',[_c('span',{staticClass:\"flex items-center text-sm uppercase\"},[_c('svg',{staticClass:\"animate-spin -ml-1 mr-3 h-5 w-5 text-current\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\"}},[_c('circle',{staticClass:\"opacity-25\",attrs:{\"cx\":\"12\",\"cy\":\"12\",\"r\":\"10\",\"stroke\":\"currentColor\",\"stroke-width\":\"4\"}}),_vm._v(\" \"),_c('path',{staticClass:\"opacity-75\",attrs:{\"fill\":\"currentColor\",\"d\":\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"}})]),_vm._v(\" \"),_c('span',[_vm._v(\"Processing\")])])]):_c('div',[(_vm.subscription.active == 'active' && _vm.subscription.is_grace_period == false)?_c('button',{staticClass:\"block uppercase text-red text-sm\",on:{\"click\":_vm.cancelSubscription}},[_vm._v(\"Cancel Your Subscription\")]):(_vm.subscription.active == 'active' && _vm.subscription.is_grace_period == true)?_c('button',{staticClass:\"block uppercase text-blue-light text-sm\",on:{\"click\":_vm.resumeSubscription}},[_vm._v(\"Resume Your Subscription\")]):_vm._e()])]):_vm._e()]),_vm._v(\" \"),(_vm.subscription)?_c('div',{staticClass:\"py-8\"},[_c('h2',{staticClass:\"mb-2 text-2xl font-medium\"},[_vm._v(\"Do you have a Discount Code?\")]),_vm._v(\" \"),_c('p',{staticClass:\"mb-6\"},[_vm._v(\"Enter your discount code below\")]),_vm._v(\" \"),_c('ValidationObserver',{ref:\"discountForm\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.submitDiscountForm($event)}}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('div',{staticClass:\"relative pr-20\"},[_c('t-input',{attrs:{\"type\":\"text\",\"placeholder\":\"e.g. DISCOUNT3MONTH\"},model:{value:(_vm.coupon),callback:function ($$v) {_vm.coupon=$$v},expression:\"coupon\"}}),_vm._v(\" \"),_c('button',{staticClass:\"w-24 absolute top-0 right-0 h-full border border-black bg-black text-white rounded-r-xl focus:outline:none hover:bg-white hover:text-black\",attrs:{\"type\":\"submit\",\"disabled\":_vm.working}},[(_vm.working == false)?_c('span',[_vm._v(\"Submit\")]):_c('span',{staticClass:\"flex items-center justify-center\"},[_c('svg',{staticClass:\"animate-spin h-5 w-5 text-current\",attrs:{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\"}},[_c('circle',{staticClass:\"opacity-25\",attrs:{\"cx\":\"12\",\"cy\":\"12\",\"r\":\"10\",\"stroke\":\"currentColor\",\"stroke-width\":\"4\"}}),_vm._v(\" \"),_c('path',{staticClass:\"opacity-75\",attrs:{\"fill\":\"currentColor\",\"d\":\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"}})])])])],1),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,false,1181725021)})],1)])],1):_vm._e()]),_vm._v(\" \"),_c('SubscriptionCardModal',{model:{value:(_vm.isModalOpen),callback:function ($$v) {_vm.isModalOpen=$$v},expression:\"isModalOpen\"}})],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\nexport default {\n  data() {\n    return {\n      working: false,\n      isModalOpen: false,\n      coupon: null,\n      benefits: [\n        { text: 'New Client Referrals' },\n        { text: 'From only £20 per month' },\n        { text: 'Dedicated human support' },\n        { text: 'Beta access to CPD training and courses' },\n        { text: 'Immediate booking and payments' },\n      ],\n    }\n  },\n\n  computed: {\n    subscription() {\n      return this.$store.state.account.subscription.subscription\n    }\n  },\n\n  mounted() {\n    this.$store.dispatch('account/subscription/getSubscription')\n  },\n\n  methods: {\n    async cancelSubscription() {\n      this.$toast.info('Are you sure you want to cancel your subscription?', {\n        duration : 5000,\n        action: [\n          {\n            text: 'Yes',\n            onClick : (e, toastObject) => {\n              toastObject.goAway(0);\n              this.working = true;\n              if(this.working == true) {\n                this.$store.dispatch('account/subscription/cancelSubscription').then((response) => {\n                  this.$auth.fetchUser()\n                  this.$store.dispatch('account/progress/get', { slug: 'financial'})\n                  this.working = false;\n                  this.$toast.success('You have successfully cancelled subscription!').goAway(3000);\n                })\n              }\n            }\n          },\n          {\n            text: 'No',\n            onClick : (e, toastObject) => {\n              toastObject.goAway(0);\n            }\n          }\n        ],\n      });\n    },\n\n    async resumeSubscription() {\n      this.working = true;\n      if(this.working == true) {\n        await this.$store.dispatch('account/subscription/resumeSubscription').then((response) => {\n          this.$auth.fetchUser()\n          this.$store.dispatch('account/progress/get', { slug: 'financial'})\n          this.working = false;\n          this.$toast.success('You have successfully resumed your subscription!').goAway(3000);\n        })\n      }\n    },\n\n    async submitDiscountForm() {\n      this.$refs.discountForm.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.working = true;\n        this.$axios.post('/subscription/discount/create', {\n          coupon: this.coupon\n        }).then((response) => {\n          this.working = false;\n          if(response.status == 200) {\n            this.$toast.success('Successfully added your discount').goAway(3000);\n          }\n        }).catch((error) => {\n          this.working = false;\n          if(error.response.data.message) {\n            this.$toast.error(error.response.data.message).goAway(1500);\n          } else {\n            this.$toast.error(error.response.data).goAway(1500);\n          }\n        })\n      })\n    }\n  }\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountSubscription.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountSubscription.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AccountSubscription.vue?vue&type=template&id=84d7f93a&\"\nimport script from \"./AccountSubscription.vue?vue&type=script&lang=js&\"\nexport * from \"./AccountSubscription.vue?vue&type=script&lang=js&\"\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  \"50a04f7e\"\n  \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {SubscriptionCardModal: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/blocks/Account/financial/Modals/SubscriptionCardModal.vue').default,Block: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/slots/Block.vue').default})\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AATA;AADA;;AClBA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AADA;AADA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAbA;AACA;AAcA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAFA;AADA;AADA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AADA;AAFA;AADA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAFA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3EA;AA6EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AA/HA;;AC7GA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AATA;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAbA;AAgBA;AACA;AACA;AACA;AAJA;AAlBA;AA0BA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlEA;AA1BA;;ACzFA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}

Zerion Mini Shell 1.0