%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/account/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/account/financial.js |
exports.ids = [42,3,4,6,9,10,20,32,34]; exports.modules = { /***/ 131: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/slots/Block.vue?vue&type=template&id=0e972406& 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)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/slots/Block.vue?vue&type=template&id=0e972406& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/slots/Block.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // /* harmony default export */ var Blockvue_type_script_lang_js_ = ({ props: { title: { type: String, required: true }, description: { type: String, required: false }, width: { type: String, required: false } } }); // CONCATENATED MODULE: ./components/slots/Block.vue?vue&type=script&lang=js& /* harmony default export */ var slots_Blockvue_type_script_lang_js_ = (Blockvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/slots/Block.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( slots_Blockvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "127f880a" ) /* harmony default export */ var Block = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {Header: __webpack_require__(12).default}) /***/ }), /***/ 145: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountProgressBar.vue?vue&type=template&id=7467445a& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"relative z-20 max-w-md w-full mt-8 text-center"},[_vm._ssrNode("<div class=\"w-full bg-black bg-opacity-25 h-1 rounded-lg overflow-hidden mb-6\"><div class=\"bg-white h-1 transition-width duration-500\""+(_vm._ssrStyle(null,'width:'+_vm.progress+'%', null))+"></div></div> <span class=\"uppercase text-lg\">"+_vm._ssrEscape(_vm._s(_vm.progress)+"% Complete")+"</span>")])} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue?vue&type=template&id=7467445a& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountProgressBar.vue?vue&type=script&lang=js& // // // // // // // // // // /* harmony default export */ var AccountProgressBarvue_type_script_lang_js_ = ({ props: { slug: { type: String, required: false, default: null } }, computed: { progress() { return this.$store.state.account.progress.total; } }, async mounted() { await this.$store.dispatch('account/progress/get', { slug: this.slug }); } }); // CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue?vue&type=script&lang=js& /* harmony default export */ var Account_AccountProgressBarvue_type_script_lang_js_ = (AccountProgressBarvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( Account_AccountProgressBarvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "6bf5e32c" ) /* harmony default export */ var AccountProgressBar = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 146: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountNav.vue?vue&type=template&id=37a7f59d& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"relative"},[_vm._ssrNode("<button class=\"flex md:hidden items-center justify-center w-full focus:outline-none\"><div class=\"relative w-8\"><span"+(_vm._ssrClass("block mb-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? 'rotate-45 translate-y-2' : ''))+"></span> <span"+(_vm._ssrClass("block my-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? 'opacity-0' : ''))+"></span> <span"+(_vm._ssrClass("block mt-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? '-rotate-45 -translate-y-3' : ''))+"></span></div> <span class=\"block ml-3 font-bold\">Menu</span></button> "),_vm._ssrNode("<div class=\"hidden md:flex flex-wrap items-center justify-center\">","</div>",[_vm._l((_vm.links),function(link,key){return _vm._ssrNode("<div>","</div>",[(link.role == 'all' || _vm.role == link.role)?_c('NuxtLink',{staticClass:"account-nav-link",attrs:{"to":link.url}},[_vm._v(_vm._s(link.name))]):_vm._e()],1)}),_vm._ssrNode(" <button type=\"button\" class=\"account-nav-link\">Log Out</button>")],2),_vm._ssrNode(" "+((_vm.menuOpen == true)?("<div class=\"fixed z-40 top-0 left-0 w-full h-full\"></div>"):"<!---->")+" "),(_vm.menuOpen == true)?_vm._ssrNode("<div class=\"fixed z-50 bottom-0 left-0 w-full p-3 rounded-t-xl bg-white block overflow-hidden md:hidden\">","</div>",[_vm._l((_vm.links),function(link,key){return _vm._ssrNode("<div>","</div>",[(link.role == 'all' || _vm.role == link.role)?_c('NuxtLink',{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{"to":link.url}},[_vm._v(_vm._s(link.name))]):_vm._e()],1)}),_vm._ssrNode(" <button type=\"button\" class=\"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow\">Log Out</button>")],2):_vm._e()],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue?vue&type=template&id=37a7f59d& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/AccountNav.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var AccountNavvue_type_script_lang_js_ = ({ data() { return { menuOpen: false, links: [{ role: 'therapist', name: 'Profile', url: '/account' }, { role: 'therapist', name: 'Availability', url: '/account/availability' }, { role: 'therapist', name: 'Verification', url: '/account/verification' }, { role: 'all', name: 'Financial', url: '/account/financial' }, { role: 'all', name: 'Settings', url: '/account/settings' }] }; }, computed: { role() { if (this.$auth.loggedIn == true) { return this.$auth.user.data.role.name; } return 'all'; } }, methods: { async logout() { await this.$auth.logout(); } } }); // CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue?vue&type=script&lang=js& /* harmony default export */ var Account_AccountNavvue_type_script_lang_js_ = (AccountNavvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( Account_AccountNavvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "6f6d45ae" ) /* harmony default export */ var AccountNav = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 150: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(163); if(content.__esModule) content = content.default; if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add CSS to SSR context var add = __webpack_require__(6).default module.exports.__inject__ = function (context) { add("ce03f3c6", content, true, context) }; /***/ }), /***/ 151: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(165); if(content.__esModule) content = content.default; if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add CSS to SSR context var add = __webpack_require__(6).default module.exports.__inject__ = function (context) { add("5984fed3", content, true, context) }; /***/ }), /***/ 157: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "img/icon-stripe.7b66af1.svg"; /***/ }), /***/ 162: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _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___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(150); /* harmony import */ var _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___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_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___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _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___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _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___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /***/ }), /***/ 163: /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(5); var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]}); // Module ___CSS_LOADER_EXPORT___.push([module.i, ".modal[data-v-7d8d7028]{padding-top:20vh}", ""]); // Exports module.exports = ___CSS_LOADER_EXPORT___; /***/ }), /***/ 164: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _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_NewCardModal_vue_vue_type_style_index_0_id_7219ff7f_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151); /* harmony import */ var _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_NewCardModal_vue_vue_type_style_index_0_id_7219ff7f_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_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_NewCardModal_vue_vue_type_style_index_0_id_7219ff7f_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _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_NewCardModal_vue_vue_type_style_index_0_id_7219ff7f_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _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_NewCardModal_vue_vue_type_style_index_0_id_7219ff7f_lang_postcss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /***/ }), /***/ 165: /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(5); var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]}); // Module ___CSS_LOADER_EXPORT___.push([module.i, ".modal[data-v-7219ff7f]{padding-top:20vh}", ""]); // Exports module.exports = ___CSS_LOADER_EXPORT___; /***/ }), /***/ 167: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?vue&type=template&id=7d8d7028&scoped=true& 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){ var errors = ref.errors; return [_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)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?vue&type=template&id=7d8d7028&scoped=true& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var SubscriptionCardModalvue_type_script_lang_js_ = ({ props: { value: { required: true } }, data() { return { isActive: false, working: false, card: {}, selected_card: null, card_name: null, discount_code: '' }; }, computed: { setup_intent() { return this.$store.state.account.billing.setupIntent; }, payment_methods() { return this.$store.state.account.billing.paymentMethods; }, default_payment_method() { return this.$store.state.account.billing.defaultPaymentMethod; }, subscription() { return this.$store.state.account.subscription.subscription; } }, mounted() { const elements = this.$stripe.elements(); this.$store.dispatch('account/billing/setupIntent'); this.card = elements.create('card', { style: { base: { fontSize: '15px', fontFamily: 'Poppins, sans-serif' } } }); this.card.mount('#subscription-card-element'); }, methods: { closeModal: function () { this.$emit("input", !this.value); }, submitForm() { this.$refs.paymentForm.validate().then(success => { if (!success) { return; } this.submitCard(); }); }, async submitCard() { if (this.setup_intent !== null) { this.working = true; const { setupIntent, error } = await this.$stripe.confirmCardSetup(this.setup_intent, { payment_method: { card: this.card, billing_details: { name: this.card_name } } }); if (error) { this.$toast.error(error.message).goAway(3000); this.$store.dispatch('account/billing/setupIntent'); this.working = false; } else { if (!this.subscription) { this.startSubscription(setupIntent.payment_method); } else { this.saveCard(setupIntent.payment_method); } } } }, async startSubscription(payment_method) { this.working = true; if (this.working == true) { await this.$store.dispatch('account/subscription/startSubscription', { payment_method: payment_method, discount_code: this.discount_code }).then(() => { this.$store.dispatch('account/subscription/getSubscription'); this.$store.dispatch('account/progress/get', { slug: 'financial' }); this.$toast.success('Successfully started your subscription!').goAway(3000); this.$emit("input", false); this.working = false; }).catch(error => { this.$store.dispatch('account/billing/setupIntent'); this.working = false; this.$toast.error(error.response.data).goAway(3000); }); } }, async saveCard(payment_method) { await this.$store.dispatch('account/billing/savePaymentMethod', { payment_method: payment_method, discount_code: this.discount_code }).then(() => { this.$store.dispatch('account/subscription/getSubscription'); this.$toast.success('Successfully updated your subscription!').goAway(3000); this.$emit("input", false); this.working = false; }).catch(error => { this.working = false; }); } }, watch: { value: function () { if (this.value == true) { setTimeout(() => { this.isActive = true; }, 100); } else { setTimeout(() => { this.isActive = false; }, 100); } } } }); // CONCATENATED MODULE: ./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue?vue&type=script&lang=js& /* harmony default export */ var Modals_SubscriptionCardModalvue_type_script_lang_js_ = (SubscriptionCardModalvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/financial/Modals/SubscriptionCardModal.vue function injectStyles (context) { var style0 = __webpack_require__(162) if (style0.__inject__) style0.__inject__(context) } /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( Modals_SubscriptionCardModalvue_type_script_lang_js_, render, staticRenderFns, false, injectStyles, "7d8d7028", "595193e0" ) /* harmony default export */ var SubscriptionCardModal = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 168: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/Modals/NewCardModal.vue?vue&type=template&id=7219ff7f&scoped=true& 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-7219ff7f></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-7219ff7f>","</div>",[_vm._ssrNode("<button type=\"button\" class=\"absolute top-6 right-10 uppercase hover:text-blue-light focus:outline-none transition\" data-v-7219ff7f>Close</button> "),_vm._ssrNode("<div class=\"relative h-full bg-gray p-8 overflow-y-auto\" data-v-7219ff7f>","</div>",[_vm._ssrNode("<div class=\"max-w-lg w-full mx-auto\" data-v-7219ff7f>","</div>",[_vm._ssrNode("<h2 class=\"mb-8 text-center text-4xl font-bold\" data-v-7219ff7f>Add new card</h2> "),_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){ var errors = ref.errors; return [_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":"new-card-element"}})]),_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('span',[_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)])],2)])],2)],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/financial/Modals/NewCardModal.vue?vue&type=template&id=7219ff7f&scoped=true& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/Modals/NewCardModal.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var NewCardModalvue_type_script_lang_js_ = ({ props: { value: { required: true } }, data() { return { isActive: false, working: false, card: {}, card_name: null }; }, computed: { setup_intent() { return this.$store.state.account.billing.setupIntent; } }, mounted() { const elements = this.$stripe.elements(); this.$store.dispatch('account/billing/setupIntent'); this.card = elements.create('card', { style: { base: { fontSize: '15px', fontFamily: 'Poppins, sans-serif' } } }); this.card.mount('#new-card-element'); }, methods: { closeModal: function () { this.$emit("input", !this.value); }, submitForm() { this.$refs.paymentForm.validate().then(success => { if (!success) { return; } this.saveCard(); }); }, async saveCard() { if (this.setup_intent !== null) { this.working = true; const { setupIntent, error } = await this.$stripe.confirmCardSetup(this.setup_intent, { payment_method: { card: this.card, billing_details: { name: this.card_name } } }); if (error) { this.$toast.error(error.message).goAway(3000); this.$store.dispatch('account/billing/setupIntent'); this.working = false; } else { this.$store.dispatch('account/billing/savePaymentMethod', setupIntent.payment_method).then(() => { this.$store.dispatch('account/progress/get', { slug: 'financial' }); this.$emit("input", false); this.working = false; }); } } } }, watch: { value: function () { if (this.value == true) { setTimeout(() => { this.isActive = true; }, 100); } else { setTimeout(() => { this.isActive = false; }, 100); } } } }); // CONCATENATED MODULE: ./components/blocks/Account/financial/Modals/NewCardModal.vue?vue&type=script&lang=js& /* harmony default export */ var Modals_NewCardModalvue_type_script_lang_js_ = (NewCardModalvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/financial/Modals/NewCardModal.vue function injectStyles (context) { var style0 = __webpack_require__(164) if (style0.__inject__) style0.__inject__(context) } /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( Modals_NewCardModalvue_type_script_lang_js_, render, staticRenderFns, false, injectStyles, "7219ff7f", "6717c23d" ) /* harmony default export */ var NewCardModal = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 185: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/AccountSubscription.vue?vue&type=template&id=84d7f93a& 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){ var errors = ref.errors; return [_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)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/financial/AccountSubscription.vue?vue&type=template&id=84d7f93a& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/AccountSubscription.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var AccountSubscriptionvue_type_script_lang_js_ = ({ data() { return { working: false, isModalOpen: false, coupon: null, benefits: [{ text: 'New Client Referrals' }, { text: 'From only £20 per month' }, { text: 'Dedicated human support' }, { text: 'Beta access to CPD training and courses' }, { text: 'Immediate booking and payments' }] }; }, computed: { subscription() { return this.$store.state.account.subscription.subscription; } }, mounted() { this.$store.dispatch('account/subscription/getSubscription'); }, methods: { async cancelSubscription() { this.$toast.info('Are you sure you want to cancel your subscription?', { duration: 5000, action: [{ text: 'Yes', onClick: (e, toastObject) => { toastObject.goAway(0); this.working = true; if (this.working == true) { this.$store.dispatch('account/subscription/cancelSubscription').then(response => { this.$auth.fetchUser(); this.$store.dispatch('account/progress/get', { slug: 'financial' }); this.working = false; this.$toast.success('You have successfully cancelled subscription!').goAway(3000); }); } } }, { text: 'No', onClick: (e, toastObject) => { toastObject.goAway(0); } }] }); }, async resumeSubscription() { this.working = true; if (this.working == true) { await this.$store.dispatch('account/subscription/resumeSubscription').then(response => { this.$auth.fetchUser(); this.$store.dispatch('account/progress/get', { slug: 'financial' }); this.working = false; this.$toast.success('You have successfully resumed your subscription!').goAway(3000); }); } }, async submitDiscountForm() { this.$refs.discountForm.validate().then(success => { if (!success) { return; } this.working = true; this.$axios.post('/subscription/discount/create', { coupon: this.coupon }).then(response => { this.working = false; if (response.status == 200) { this.$toast.success('Successfully added your discount').goAway(3000); } }).catch(error => { this.working = false; if (error.response.data.message) { this.$toast.error(error.response.data.message).goAway(1500); } else { this.$toast.error(error.response.data).goAway(1500); } }); }); } } }); // CONCATENATED MODULE: ./components/blocks/Account/financial/AccountSubscription.vue?vue&type=script&lang=js& /* harmony default export */ var financial_AccountSubscriptionvue_type_script_lang_js_ = (AccountSubscriptionvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/financial/AccountSubscription.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( financial_AccountSubscriptionvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "50a04f7e" ) /* harmony default export */ var AccountSubscription = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {SubscriptionCardModal: __webpack_require__(167).default,Block: __webpack_require__(131).default}) /***/ }), /***/ 186: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/AccountPayouts.vue?vue&type=template&id=0b52109c& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{"title":"Bank Details","description":"Manage your payouts on Stripe"}},[(_vm.loading == false)?_c('div',[(_vm.is_complete == false)?_c('div',{staticClass:"flex items-center justify-center"},[_c('button',{staticClass:"btn btn-small btn-primary rounded-full",attrs:{"type":"button"},on:{"click":_vm.createStripeAccountLink}},[(_vm.working == false)?_c('span',{staticClass:"flex items-center justify-center"},[_vm._v("Connect to "),_c('img',{staticClass:"ml-1",attrs:{"src":__webpack_require__(157),"alt":"Stripe"}})]):_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("Redirecting")])])])]):_c('div',{staticClass:"flex items-center justify-center"},[_c('button',{staticClass:"btn btn-small btn-primary rounded-full",attrs:{"type":"button"},on:{"click":_vm.createStripeLoginLink}},[(_vm.working == false)?_c('span',{staticClass:"flex items-center justify-center"},[_vm._v("View "),_c('img',{staticClass:"mx-1",attrs:{"src":__webpack_require__(157),"alt":"Stripe"}}),_vm._v(" Dashboard")]):_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("Redirecting")])])]),_vm._v(" "),_c('t-modal',{attrs:{"header":"Setup your stripe account"},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('div',{staticClass:"flex justify-between"},[_c('button',{staticClass:"btn btn-primary btn-small",attrs:{"type":"button"},on:{"click":function($event){_vm.showModal=false}}},[_vm._v("Not Now")]),_vm._v(" "),_c('button',{staticClass:"btn btn-primary btn-small",attrs:{"type":"button"},on:{"click":_vm.createStripeLoginLink}},[(_vm.working == false)?_c('span',{staticClass:"flex items-center justify-center"},[_vm._v("Visit "),_c('img',{staticClass:"mx-1",attrs:{"src":__webpack_require__(157),"alt":"Stripe"}})]):_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("Redirecting")])])])])]},proxy:true}],null,false,28807270),model:{value:(_vm.showModal),callback:function ($$v) {_vm.showModal=$$v},expression:"showModal"}},[_c('p',[_vm._v("You need to finish setting up your stripe account in order to recieve payments.")])])],1)]):_c('div',{staticClass:"flex items-center justify-center"},[_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("Fetching Stripe Account")])])])])} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/financial/AccountPayouts.vue?vue&type=template&id=0b52109c& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/AccountPayouts.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var AccountPayoutsvue_type_script_lang_js_ = ({ data() { return { loading: true, working: false, is_complete: false, showModal: false }; }, async mounted() { await this.$axios.$get('/stripe/account').then(is_enabled => { this.loading = false; this.is_complete = is_enabled; if (this.is_complete == 0) { this.showModal = true; } }).catch(error => { this.loading = false; this.$toast.error(error).goAway(3000); }); }, methods: { async createStripeAccountLink() { this.working = true; await this.$axios.$get('/stripe/account-link').then(response => { window.location.href = response.url; }).catch(error => { this.$toast.error(error).goAway(3000); }); }, async createStripeLoginLink() { this.working = true; await this.$axios.$get('/stripe/login-link').then(response => { window.location.href = response.url; }).catch(error => { this.$toast.error(error).goAway(3000); }); } } }); // CONCATENATED MODULE: ./components/blocks/Account/financial/AccountPayouts.vue?vue&type=script&lang=js& /* harmony default export */ var financial_AccountPayoutsvue_type_script_lang_js_ = (AccountPayoutsvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/financial/AccountPayouts.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( financial_AccountPayoutsvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "6273bdce" ) /* harmony default export */ var AccountPayouts = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {Block: __webpack_require__(131).default}) /***/ }), /***/ 187: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/SavedCards.vue?vue&type=template&id=3470de18& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{"title":"Saved Cards","description":"Manage your saved cards, these cards will be used any payments you make through the take a seat website"}},[(_vm.loading == true)?_c('div',[_c('span',{staticClass:"flex items-center justify-center mb-8"},[_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("Fetching Payment Methods")])])]):(_vm.loading == false && _vm.payment_methods.length)?_c('div',{staticClass:"grid grid-cols-1 gap-y-3 mb-10"},_vm._l((_vm.payment_methods),function(payment_method,key){return _c('div',{key:key},[_c('div',{staticClass:"relative grid grid-cols-3 bg-white border border-black border-opacity-10 pl-6 pr-8 py-4 rounded-lg"},[_c('span',[_vm._v(_vm._s(payment_method.billing_details.name))]),_vm._v(" "),_c('span',{staticClass:"flex items-center justify-center"},[_c('span',{staticClass:"font-medium mr-1"},[_vm._v("Last 4:")]),_vm._v(_vm._s(payment_method.card.last4))]),_vm._v(" "),_c('span',{staticClass:"flex items-center justify-end"},[_c('span',{staticClass:"font-medium mr-1"},[_vm._v("Expiry:")]),_vm._v(_vm._s(payment_method.card.exp_month)+"/"+_vm._s(payment_method.card.exp_year))])]),_vm._v(" "),_c('div',{staticClass:"pt-2 px-3 flex items-center justify-end"},[(payment_method.id !== _vm.default_payment_method.id)?_c('button',{staticClass:"ml-3 uppercase text-xs text-blue-light",attrs:{"type":"button"},on:{"click":function($event){return _vm.makeMethodPrimary(payment_method.id)}}},[(_vm.isMakingPrimary == false)?_c('span',[_vm._v("Make Primary")]):_c('span',[_vm._v("Processing...")])]):_vm._e(),_vm._v(" "),(payment_method.id !== _vm.default_payment_method.id)?_c('button',{staticClass:"ml-3 uppercase text-xs text-red text-opacity-80",attrs:{"type":"button"},on:{"click":function($event){return _vm.removePaymentMethod(payment_method.id)}}},[(_vm.isDeleting == false)?_c('span',[_vm._v("Remove")]):_c('span',[_vm._v("Processing...")])]):_vm._e()])])}),0):_c('div',{staticClass:"text-center mb-10"},[_c('p',{staticClass:"text-md font-bold"},[_vm._v("You have no cards yet")])]),_vm._v(" "),_c('div',{staticClass:"flex items-center justify-center"},[_c('button',{staticClass:"btn btn-primary btn-small rounded-full",on:{"click":function($event){_vm.modalOpen =! _vm.modalOpen}}},[_vm._v("Add a new card")])]),_vm._v(" "),_c('NewCardModal',{model:{value:(_vm.modalOpen),callback:function ($$v) {_vm.modalOpen=$$v},expression:"modalOpen"}})],1)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/financial/SavedCards.vue?vue&type=template&id=3470de18& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/blocks/Account/financial/SavedCards.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var SavedCardsvue_type_script_lang_js_ = ({ data() { return { modalOpen: false, error: null, loading: false, working: false, isMakingPrimary: false, isDeleting: false, card: {}, cardHolderName: null }; }, computed: { payment_methods() { return this.$store.state.account.billing.paymentMethods; }, default_payment_method() { return this.$store.state.account.billing.defaultPaymentMethod; } }, async mounted() { this.loading = true; await this.$store.dispatch('account/billing/getPaymentMethods').then(() => { this.loading = false; }); }, methods: { async removePaymentMethod(payment_method_id) { await this.$store.dispatch('account/billing/deletePaymentMethod', { payment_method: payment_method_id }); }, async makeMethodPrimary(payment_method_id) { await this.$store.dispatch('account/billing/makePrimary', { payment_method: payment_method_id }); } } }); // CONCATENATED MODULE: ./components/blocks/Account/financial/SavedCards.vue?vue&type=script&lang=js& /* harmony default export */ var financial_SavedCardsvue_type_script_lang_js_ = (SavedCardsvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/financial/SavedCards.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( financial_SavedCardsvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "05e21815" ) /* harmony default export */ var SavedCards = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {NewCardModal: __webpack_require__(168).default,Block: __webpack_require__(131).default}) /***/ }), /***/ 242: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/account/financial.vue?vue&type=template&id=7392b520& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"page-wrapper"},[_c('PageHeader',{attrs:{"classObject":"bg-pink"}},[_c('img',{staticClass:"relative z-20 mb-8",attrs:{"src":__webpack_require__(20),"alt":"Takeaseat"}}),_vm._v(" "),_c('span',{staticClass:"font-bold uppercase text-xl"},[_vm._v("Account")]),_vm._v(" "),_c('h1',{staticClass:"relative z-20 text-5xl lg:text-7xl font-bold m-0"},[_vm._v("Financial")]),_vm._v(" "),_c('AccountProgressBar',{attrs:{"slug":"financial"}}),_vm._v(" "),_c('div',{staticClass:"page-header-bottom"},[_c('AccountNav')],1)],1),_vm._ssrNode(" "),(_vm.is_therapist)?_c('AccountSubscription'):_vm._e(),_vm._ssrNode(" "),(_vm.is_therapist)?_c('AccountPayouts'):_vm._e(),_vm._ssrNode(" "),_c('SavedCards')],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./pages/account/financial.vue?vue&type=template&id=7392b520& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/account/financial.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // /* harmony default export */ var financialvue_type_script_lang_js_ = ({ middleware: 'auth', head() { return { titleTemplate: 'Financial | %s' }; }, computed: { is_therapist() { return this.$auth.user.data.role.name == 'therapist'; }, setup_intent() { return this.$store.state.account.billing.setupIntent; }, payment_methods() { return this.$store.state.account.billing.paymentMethods; }, default_payment_method() { return this.$store.state.account.billing.defaultPaymentMethod; } } }); // CONCATENATED MODULE: ./pages/account/financial.vue?vue&type=script&lang=js& /* harmony default export */ var account_financialvue_type_script_lang_js_ = (financialvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./pages/account/financial.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( account_financialvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "48e9db8b" ) /* harmony default export */ var financial = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {AccountProgressBar: __webpack_require__(145).default,AccountNav: __webpack_require__(146).default,PageHeader: __webpack_require__(36).default,AccountSubscription: __webpack_require__(185).default,AccountPayouts: __webpack_require__(186).default,SavedCards: __webpack_require__(187).default}) /***/ }) };; //# sourceMappingURL=financial.js.map