%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/booking/
Upload File :
Create Path :
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/pages/booking/_slug.js.map

{"version":3,"file":"pages/booking/_slug.js","sources":["webpack:///./components/blocks/Booking/SummaryStep.vue?3f18","webpack:///./components/blocks/Booking/SummaryStep.vue","webpack:///./components/blocks/Booking/SummaryStep.vue?e8a6","webpack:///./components/blocks/Booking/SummaryStep.vue?525e","webpack:///./components/blocks/Booking/RegisterStep.vue?03ff","webpack:///./components/blocks/Booking/RegisterStep.vue","webpack:///./components/blocks/Booking/RegisterStep.vue?fc12","webpack:///./components/blocks/Booking/RegisterStep.vue?4f0d","webpack:///./components/blocks/Booking/PaymentStep.vue?19bd","webpack:///./components/blocks/Booking/PaymentStep.vue","webpack:///./components/blocks/Booking/PaymentStep.vue?ef9c","webpack:///./components/blocks/Booking/PaymentStep.vue?5fc6","webpack:///./pages/booking/_slug.vue?c474","webpack:///./pages/booking/_slug.vue","webpack:///./pages/booking/_slug.vue?1e28","webpack:///./pages/booking/_slug.vue?f99b"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._ssrNode(\"<span class=\\\"block text-center text-3xl font-bold mb-6\\\">Summary</span> <p>You are nearly there. Please carefully check all details are correct before proceeding to payment.</p> <div class=\\\"my-2 mb-6\\\"><div class=\\\"grid grid-cols-3 gap-3 border-b-2 border-gray py-6\\\"><span class=\\\"uppercase text-sm\\\">Therapist</span> <span class=\\\"col-span-2 text-sm\\\">\"+_vm._ssrEscape(_vm._s(_vm.therapist.user.full_name))+\"</span></div> \"+((_vm.loading == false)?(\"<div class=\\\"border-b-2 border-gray py-4\\\"><div class=\\\"grid grid-cols-3 gap-3 py-2\\\"><span class=\\\"uppercase text-sm\\\">No. Of Sessions</span> <span class=\\\"text-sm\\\">\"+_vm._ssrEscape(_vm._s(Object.keys(_vm.selected_slots).length))+\"</span></div> \"+(_vm._ssrList((_vm.sessions),function(session,key){return (\"<div><div class=\\\"grid grid-cols-6 gap-3 py-2\\\"><span class=\\\"col-span-2 uppercase text-sm\\\">\"+_vm._ssrEscape(\"Session \"+_vm._s((key+1)))+\"</span> <span class=\\\"col-span-3 text-sm\\\">\"+_vm._ssrEscape(_vm._s(_vm.$moment.utc(session.slot.start).format('D MMM Y - H:mm')+' - '+_vm.$moment.utc(session.slot.end).format('H:mm')))+\"</span> <div class=\\\"col-span-1 flex items-center justify-end\\\"><span class=\\\"text-sm\\\">\"+_vm._ssrEscape(_vm._s(session.item_total.formatted))+\"</span></div></div> <div class=\\\"grid grid-cols-3 gap-3 py-2\\\"><span class=\\\"uppercase text-sm\\\">Session Type</span> <span class=\\\"text-sm\\\">\"+_vm._ssrEscape(_vm._s(session.session_name))+\"</span> <div class=\\\"flex items-center justify-end\\\"><button type=\\\"button\\\" class=\\\"text-sm uppercase underline\\\">Change</button></div></div></div>\")}))+\"</div>\"):\"<!---->\")+\" \"+((_vm.loading == false)?(\"<div class=\\\"grid grid-cols-2 gap-2 border-b-2 border-gray py-6\\\"><span class=\\\"uppercase text-sm\\\">Total Price</span> <span class=\\\"uppercase font-bold flex items-center justify-end\\\">\"+_vm._ssrEscape(_vm._s(_vm.totals.formatted))+\"</span></div>\"):(\"<div class=\\\"flex items-center justify-center py-6\\\"><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\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"4\\\" class=\\\"opacity-25\\\"></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\\\"></path></svg>\\n      Loading...\\n    </div>\"))+\"</div> <div class=\\\"flex flex-col items-center justify-center\\\"><button\"+(_vm._ssrAttr(\"disabled\",_vm.selected_slots.length < 1))+\" type=\\\"button\\\" class=\\\"btn btn-primary btn-small rounded-full w-full sm:w-auto\\\">\"+((_vm.working == false)?(\"<span>\"+_vm._ssrEscape(_vm._s(_vm.button_text))+\"</span>\"):(\"<span class=\\\"flex items-center justify-center\\\"><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\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"4\\\" class=\\\"opacity-25\\\"></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\\\"></path></svg> <span>Processing</span></span>\"))+\"</button> <button type=\\\"button\\\" class=\\\"mt-6 uppercase text-blue-light text-sm\\\">Go Back</button></div>\")])}\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\nexport default {\n  props: {\n    value: {\n      required: true\n    },\n    selected_slots: {\n      type: Object,\n      required: true\n    },\n    working: {\n      type: Boolean,\n      required: true,\n    },\n    button_text: {\n      type: String,\n      required: true,\n    },\n    nextStep: {\n      type: Function,\n      required: true\n    }\n  },\n\n  data() {\n    return {\n      loading: true\n    }\n  },\n\n  computed: {\n    therapist() {\n      return this.$store.state.booking.therapist\n    },\n    sessions() {\n      return this.$store.state.booking.summary.sessions\n    },\n    totals() {\n      return this.$store.state.booking.summary.totals\n    },\n    selected_session() {\n      return this.$store.state.booking.summary.session\n    }\n  },\n\n  async mounted() {\n    await this.$store.dispatch('booking/summary/get', {\n      user_id: this.therapist.user.id,\n      sessions: this.selected_slots,\n      sessions_count: Object.keys(this.selected_slots).length\n    }).then(() => {\n      this.loading = false;\n    })\n  },\n\n  methods: {\n    goBack() {\n      this.$emit(\"input\", 1);\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!./SummaryStep.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!./SummaryStep.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SummaryStep.vue?vue&type=template&id=2fdf21e8&\"\nimport script from \"./SummaryStep.vue?vue&type=script&lang=js&\"\nexport * from \"./SummaryStep.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  \"79b9c0db\"\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('div',[_vm._ssrNode(\"<span class=\\\"block text-center text-3xl font-bold mb-6\\\">Create Account</span> \"),_c('ValidationObserver',{ref:\"registerForm\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.userRegister($event)}}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"first_name\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"First Name\"}},[_c('t-input',{attrs:{\"type\":\"text\",\"placeholder\":\"First Name\"},model:{value:(_vm.register.first_name),callback:function ($$v) {_vm.$set(_vm.register, \"first_name\", $$v)},expression:\"register.first_name\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"last_name\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Last Name\"}},[_c('t-input',{attrs:{\"type\":\"text\",\"placeholder\":\"Last Name\"},model:{value:(_vm.register.last_name),callback:function ($$v) {_vm.$set(_vm.register, \"last_name\", $$v)},expression:\"register.last_name\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"email\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Email\"}},[_c('t-input',{attrs:{\"type\":\"email\",\"placeholder\":\"name@email.com\"},model:{value:(_vm.register.email),callback:function ($$v) {_vm.$set(_vm.register, \"email\", $$v)},expression:\"register.email\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required|phone_number\",\"name\":\"phone\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Phone\"}},[_c('t-input',{attrs:{\"type\":\"tel\",\"placeholder\":\"+44\"},model:{value:(_vm.register.phone),callback:function ($$v) {_vm.$set(_vm.register, \"phone\", $$v)},expression:\"register.phone\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required|password:@password_confirmation\",\"name\":\"password\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Password\"}},[_c('t-input',{attrs:{\"type\":\"password\",\"placeholder\":\"Password\"},model:{value:(_vm.register.password),callback:function ($$v) {_vm.$set(_vm.register, \"password\", $$v)},expression:\"register.password\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"name\":\"password_confirmation\",\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Confirm Password\"}},[_c('t-input',{attrs:{\"type\":\"password\",\"placeholder\":\"Confirm Password\"},model:{value:(_vm.register.password_confirmation),callback:function ($$v) {_vm.$set(_vm.register, \"password_confirmation\", $$v)},expression:\"register.password_confirmation\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('div',{staticClass:\"flex flex-col items-center justify-center\"},[_c('button',{staticClass:\"btn btn-primary btn-small rounded-full\",attrs:{\"type\":\"submit\"}},[(_vm.register_working == false)?_c('span',[_vm._v(\"Create Account & Proceed\")]):_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\")])])])])],1)]),_vm._ssrNode(\" <div class=\\\"relative text-center mt-8 mb-6\\\"><span class=\\\"absolute z-10 top-1/2 left-0 transform -translate-y-1/2 block w-full h-0.5 bg-gray\\\"></span> <span class=\\\"relative z-20 inline-block px-6 bg-white uppercase font-bold text-lg\\\">Or Login</span></div> \"),_c('ValidationObserver',{ref:\"loginForm\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.userLogin($event)}}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"email\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Email\"}},[_c('t-input',{attrs:{\"type\":\"email\",\"placeholder\":\"name@email.com\"},model:{value:(_vm.login.email),callback:function ($$v) {_vm.$set(_vm.login, \"email\", $$v)},expression:\"login.email\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"password\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-input-group',{attrs:{\"label\":\"Password\"}},[_c('t-input',{attrs:{\"type\":\"password\",\"placeholder\":\"Password\"},model:{value:(_vm.login.password),callback:function ($$v) {_vm.$set(_vm.login, \"password\", $$v)},expression:\"login.password\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])}),_vm._v(\" \"),_c('div',{staticClass:\"flex flex-col items-center justify-center\"},[_c('button',{staticClass:\"btn btn-primary btn-small rounded-full\",attrs:{\"type\":\"submit\"}},[(_vm.login_working == false)?_c('span',[_vm._v(\"Log-in & Proceed\")]):_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('button',{staticClass:\"mt-6 uppercase text-blue-light text-sm\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.goBack}},[_vm._v(\"Go Back\")])])],1)])],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//\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      register_working: false,\n      login_working: false,\n      register: {\n        first_name: '',\n        last_name: '',\n        email: '',\n        phone: '',\n        password: '',\n        password_confirmation: '',\n      },\n      login: {\n        email: '',\n        password: '',\n      }\n    }\n  },\n\n  methods: {\n    async userRegister() {\n      this.$refs.registerForm.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.register_working = true;\n        this.$axios.post('/auth/register', {\n          first_name: this.register.first_name,\n          last_name: this.register.last_name,\n          email: this.register.email,\n          phone: this.register.phone,\n          password: this.register.password,\n          password_confirmation: this.register.password_confirmation\n        }).then((response) => {\n            if(response.status == 200) {\n              this.$auth.loginWith('laravelJWT', {\n                data: {\n                  email: this.register.email,\n                  password: this.register.password\n                }\n              }).then((response) => {\n                if(response.status == 200) {\n                  this.register_working = false;\n                  this.$emit(\"input\", 4);\n                }\n              });\n            }\n          }).catch(error => {\n            this.$refs.registerForm.setErrors(error.response.data.errors);\n            this.register_working = false;\n          });\n      });\n    },\n\n    async userLogin() {\n      this.$refs.loginForm.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.login_working = true;\n        this.$auth.loginWith('laravelJWT', {\n          data: this.login\n        }).then((response) => {\n          if(response.status == 200) {\n            if (this.login.remember_me == true) {\n              this.$auth.$storage.setCookie(\n                `_remember.${this.$auth.options.defaultStrategy}`,\n                this.$auth.strategy.token.get(),\n                { maxAge: 2147483647 }\n              )\n            }\n\n            this.$emit(\"input\", 4);\n          }\n        }).catch((error) => {\n          this.login_working = false;\n          this.$toast.error(error.response.data.message).goAway(1500);\n        })\n      })\n    },\n\n    goBack() {\n      this.$emit(\"input\", 2);\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!./RegisterStep.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!./RegisterStep.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RegisterStep.vue?vue&type=template&id=1efbf83d&\"\nimport script from \"./RegisterStep.vue?vue&type=script&lang=js&\"\nexport * from \"./RegisterStep.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  \"71fd6196\"\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('div',[_vm._ssrNode(\"<span class=\\\"block text-center text-3xl font-bold mb-6\\\">Payment</span> <div class=\\\"grid grid-cols-1 sm:grid-cols-2 gap-y-3 mb-6\\\"><div class=\\\"leading-6 text-center sm:text-left\\\">\"+_vm._ssrEscape(_vm._s(Object.keys(_vm.selected_slots).length)+\" x Sessions with \"+_vm._s(_vm.therapist.user.full_name))+\"</div> <div class=\\\"flex items-center justify-center sm:justify-end text-2xl font-bold\\\">\"+_vm._ssrEscape(_vm._s(_vm.totals.formatted))+\"</div></div> <div id=\\\"payment-request-wrapper\\\"\"+(_vm._ssrStyle(null,null, { display: (_vm.isPaymentRequestAllowed) ? '' : 'none' }))+\"><div class=\\\"w-full flex items-center justify-center mb-8\\\"><div id=\\\"payment-request-button\\\" class=\\\"w-full\\\"></div></div> <div class=\\\"relative text-center my-6\\\"><span class=\\\"absolute z-10 top-1/2 left-0 transform -translate-y-1/2 block w-full h-0.5 bg-gray\\\"></span> <span class=\\\"relative z-20 inline-block px-6 bg-white uppercase\\\">Or Pay with Card</span></div></div> \"+((_vm.isPaymentRequestAllowed == false)?(\"<div class=\\\"relative text-center my-6\\\"><span class=\\\"absolute z-10 top-1/2 left-0 transform -translate-y-1/2 block w-full h-0.5 bg-gray\\\"></span> <span class=\\\"relative z-20 inline-block px-6 bg-white uppercase\\\">Pay with Card</span></div>\"):\"<!---->\")+\" \"+((_vm.payment_methods.length > 0)?(\"<div class=\\\"grid grid-cols-1 gap-y-2 mb-6\\\">\"+(_vm._ssrList((_vm.payment_methods),function(payment_method,key){return (\"<label\"+(_vm._ssrAttr(\"for\",'payment_method-'+key))+(_vm._ssrClass(\"relative grid grid-cols-2 bg-white border border-black border-opacity-10 py-2 px-3 pl-12 rounded-lg transition cursor-pointer\",_vm.selected_payment_method == payment_method.id ? 'bg-gray' : ''))+\"><input type=\\\"radio\\\" name=\\\"payment_methods\\\"\"+(_vm._ssrAttr(\"id\",'payment_method-'+key))+(_vm._ssrAttr(\"value\",payment_method.id))+(_vm._ssrAttr(\"checked\",_vm._q(_vm.selected_payment_method,payment_method.id)))+\" class=\\\"hidden\\\"> <div\"+(_vm._ssrClass(\"absolute top-0 left-0.5 w-10 h-full bg-center bg-contain\",'card-icon-'+payment_method.card.brand))+\"></div> <span class=\\\"text-sm\\\">\"+_vm._ssrEscape(_vm._s(payment_method.billing_details.name))+\"</span> <div class=\\\"text-sm flex items-center justify-end\\\"><span class=\\\"mx-2\\\">\"+_vm._ssrEscape(\"****\"+_vm._s(payment_method.card.last4))+\"</span> <span class=\\\"mx-2\\\">\"+_vm._ssrEscape(_vm._s(payment_method.card.exp_month)+\"/\"+_vm._s(payment_method.card.exp_year))+\"</span></div></label>\")}))+\"</div>\"):\"<!---->\")+\" \"),_vm._ssrNode(\"<div\"+(_vm._ssrStyle(null,null, { display: (_vm.selected_payment_method == null) ? '' : 'none' }))+\">\",\"</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\":\"card-element\"}})]),_vm._v(\" \"),_c('div',{staticClass:\"flex flex-col items-center justify-center sm:px-10\"},[_c('button',{staticClass:\"btn btn-primary btn-small rounded-full w-full sm:w-auto\",attrs:{\"disabled\":_vm.working == true,\"type\":\"submit\"}},[(_vm.working == false)?_c('span',[_vm._v(\"Pay Now\")]):_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('button',{staticClass:\"mt-6 uppercase text-blue-light text-sm\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.goBack}},[_vm._v(\"Go Back\")])])],1)])],1),_vm._ssrNode(\" \"+((_vm.selected_payment_method)?(\"<div class=\\\"flex flex-col items-center justify-center sm:px-10\\\"><button class=\\\"mb-2 uppercase text-blue-light text-sm\\\">Use New Card</button> <button\"+(_vm._ssrAttr(\"disabled\",_vm.working == true))+\" type=\\\"button\\\" class=\\\"btn btn-primary btn-small rounded-full w-full sm:w-auto\\\">\"+((_vm.working == false)?(\"<span>Pay Now</span>\"):(\"<span class=\\\"flex items-center justify-center\\\"><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\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"4\\\" class=\\\"opacity-25\\\"></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\\\"></path></svg> <span>Processing</span></span>\"))+\"</button> <button type=\\\"button\\\" class=\\\"mt-6 uppercase text-blue-light text-sm\\\">Go Back</button></div>\"):\"<!---->\")+\" \"),_vm._ssrNode(\"<p class=\\\"text-sm text-center mt-6 text-black text-opacity-75\\\">\",\"</p>\",[_vm._ssrNode(\"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._ssrNode(\". Please read carefully before continuing.\")],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//\n//\n//\n//\n//\n//\n\nexport default {\n  props: {\n    value: {\n      required: true\n    },\n    selected_slots: {\n      type: Object,\n      required: true\n    }\n  },\n\n\tdata() {\n\t\treturn {\n\t\t\terror: null,\n      working: false,\n      stripe: null,\n      card: {},\n      selected_payment_method: null,\n      isPaymentRequestAllowed: false,\n\t\t\tpaymentRequest: {},\n      card_name: null\n\t\t}\n\t},\n\n  computed: {\n    totals() {\n      return this.$store.state.booking.summary.totals\n    },\n    therapist() {\n      return this.$store.state.booking.therapist\n    },\n    payment_methods() {\n      return this.$store.state.account.billing.paymentMethods\n    },\n    setup_intent() {\n      return this.$store.state.account.billing.setupIntent\n    },\n    connect_id() {\n      return this.$store.state.booking.payment.connect_id\n    }\n  },\n\n\tasync mounted() {\n    await this.$store.dispatch('account/billing/setupIntent')\n    await this.$store.dispatch('account/billing/getPaymentMethods')\n\n    this.mountCard();\n\t},\n\n\tmethods: {\n\t\tmountCard() {\n\t\t\tconst elements = this.$stripe.elements();\n      \n\t\t\tthis.card = elements.create('card', {\n        style: {\n          base: {\n            fontSize: '15px',\n            fontFamily: 'Poppins, sans-serif'\n          }\n        }\n      });\n\n      this.getPaymentRequest();\n\t\t\tthis.card.mount('#card-element');\n\t\t},\n\n    submitForm() {\n      this.$refs.paymentForm.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.confirmCardSetup();\n      });\n    },\n\n    async getPaymentRequest() {\n\t\t\tthis.paymentRequest = await this.$stripe.paymentRequest({\n\t\t\t\tcountry: 'GB',\n\t\t\t\tcurrency: 'gbp',\n\t\t\t\ttotal: {\n\t\t\t\t\tamount: parseInt(this.totals.amount),\n          label: 'Takeaseat Booking with '+this.therapist.user.full_name,\n\t\t\t\t},\n\t\t\t\trequestPayerName: true,\n\t\t\t\trequestPayerEmail: true\n\t\t\t});\n\n\t\t\tthis.mountPaymentButton();\n\t\t},\n\n\t\tasync mountPaymentButton() {\n\t\t\tconst elements = this.$stripe.elements();\n\n\t\t\tlet prButton = elements.create('paymentRequestButton', {\n\t\t\t\tpaymentRequest: this.paymentRequest,\n\t\t\t});\n\n\t\t\t// Check the availability of the Payment Request API first.\n\t\t\tthis.paymentRequest.canMakePayment().then(function(result) {\n\t\t\t\tif (result) {\n          this.isPaymentRequestAllowed = true;\n\t\t\t\t\tprButton.mount('#payment-request-button');\n\t\t\t\t} else {\n          this.isPaymentRequestAllowed = false;\n\t\t\t\t}\n\t\t\t}.bind(this));\n\n      this.paymentRequest.on('paymentmethod', function(event) {\n        event.complete('success');\n        this.createPayment(event.paymentMethod.id);\n      }.bind(this));\n\t\t},\n\n    async confirmCardSetup() {\n      this.working = true;\n\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\n      if (error) {\n        this.$toast.error(error.message).goAway(3000);\n        await this.$store.dispatch('account/billing/setupIntent')\n        this.working = false;\n      } else {\n        this.createPayment(setupIntent.payment_method)\n      }\n    },\n\n    async createPayment(payment_method) {\n      this.working = true;\n\n      await this.$axios.post('/booking/payment/'+this.therapist.user.id, {\n        grand_total: this.totals.amount,\n        sessions: this.selected_slots,\n        sessions_count: Object.keys(this.selected_slots).length,\n        payment_method: payment_method\n      }).then((response) => {\n        if(response.status == 200) {\n          this.createBooking(response.data);\n        }\n      }).catch((error) => {\n        this.working = false;\n        this.$toast.error(error.response.data.message).goAway(3000);\n      })\n    },\n\n    async createBooking(data) {\n      this.working = true;\n\n      await this.$axios.post('/booking/create', {\n        sessions: this.selected_slots,\n        amount: this.totals.amount,\n        therapist_id: this.therapist.id,\n        charges: data.charges,\n        transfer: data.transfer\n      }).then((response) => {\n        if(response.status == 200) {\n          this.$store.commit('booking/success/setBookings', response.data)\n          this.$router.push({\n            path: '/booking/success'\n          })\n        }\n      }).catch((error) => {\n        this.$toast.error(error.response.message).goAway(1000);\n        this.working = false;\n      })\n    },\n\n    goBack() {\n      this.$emit(\"input\", 2);\n    }\n\t}\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!./PaymentStep.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!./PaymentStep.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PaymentStep.vue?vue&type=template&id=ccb0a27a&\"\nimport script from \"./PaymentStep.vue?vue&type=script&lang=js&\"\nexport * from \"./PaymentStep.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  \"dbe2298a\"\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('div',{staticClass:\"page-wrapper\"},[_vm._ssrNode(\"<div class=\\\"py-10 sm:py-20 bg-white\\\"><div class=\\\"relative z-20 text-center\\\"><figure class=\\\"relative inline-block w-32 mb-4 sm:mb-8\\\"><div\"+(_vm._ssrClass(\"absolute top-0 left-0 w-full h-full border-15\",'tas-border-'+_vm.therapist.colour))+\"></div> <img\"+(_vm._ssrAttr(\"src\",_vm.therapist.user.photo_url))+(_vm._ssrAttr(\"alt\",_vm.therapist.user.first_name))+\" class=\\\"block w-full\\\"></figure> <h1><span class=\\\"block w-full text-5xl md:text-7xl leading-none \\\">\"+_vm._ssrEscape(_vm._s(_vm.therapist.user.first_name))+\"</span> <span class=\\\"block w-full uppercase text-2xl\\\">\"+_vm._ssrEscape(_vm._s(_vm.therapist.user.last_name))+\"</span></h1></div></div> \"),_vm._ssrNode(\"<div class=\\\"bg-gray px-4 py-6 sm:py-10 sm:px-8 md:py-20\\\">\",\"</div>\",[_vm._ssrNode(\"<div class=\\\"max-w-lg w-full mx-auto\\\">\",\"</div>\",[_vm._ssrNode(\"<div class=\\\"py-8 px-6 sm:py-12 sm:px-16 rounded-xl bg-white\\\">\",\"</div>\",[(_vm.step == 1)?[_c('ValidationObserver',{ref:\"bookingStepOne\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.summaryStep($event)}}},[_c('span',{staticClass:\"block text-center text-3xl font-bold mb-6\"},[_vm._v(\"Your Session\")]),_vm._v(\" \"),_c('t-calendar',{attrs:{\"multiple\":\"\",\"minDate\":_vm.minDate,\"maxDate\":_vm.maxDate,\"yearsPerView\":1,\"disabledDates\":_vm.getDisabledDates,\"inline\":\"\"},on:{\"user-date-changed\":_vm.changeDates},model:{value:(_vm.selected_dates),callback:function ($$v) {_vm.selected_dates=$$v},expression:\"selected_dates\"}}),_vm._v(\" \"),_c('div',{staticClass:\"mb-6\"},[_c('span',{staticClass:\"block font-bold mb-3\"},[_vm._v(\"Select time\")]),_vm._v(\" \"),(_vm.loading == true)?_c('div',{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(\"\\n                  Loading Times...\\n                \")]):(_vm.availability.length !== 0 || _vm.availability.length == undefined)?_c('div',_vm._l((_vm.availability),function(date,key){return _c('div',{key:key,staticClass:\"mb-3\"},[(date.length > 0)?[_c('span',{staticClass:\"block mb-2 font-bold\"},[_vm._v(_vm._s(_vm.$moment(key).format('DD/MM/Y')))]),_vm._v(\" \"),_c('div',{staticClass:\"grid grid-cols-2 sm:grid-cols-3 gap-3\"},_vm._l((date),function(slot,index){return _c('label',{key:index,staticClass:\"border border-black px-3 py-2 rounded-md cursor-pointer text-center text-sm\",class:_vm.selected_slots[key].slot == slot.start ? 'bg-yellow' : ''},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected_slots[key].slot),expression:\"selected_slots[key].slot\"}],staticClass:\"hidden\",attrs:{\"type\":\"radio\",\"id\":'times-'+index,\"name\":'times-'+index},domProps:{\"value\":slot.start,\"checked\":_vm._q(_vm.selected_slots[key].slot,slot.start)},on:{\"change\":[function($event){return _vm.$set(_vm.selected_slots[key], \"slot\", slot.start)},function($event){return _vm.changeTimeSlot(key, slot)}]}}),_vm._v(\"\\n                          \"+_vm._s(_vm.$moment.utc(slot.start).format('H:mm'))+\"\\n                        \")])}),0),_vm._v(\" \"),_c('div',{staticClass:\"mt-4 mb-6\"},[_c('span',{staticClass:\"block text-sm font-bold mb-2\"},[_vm._v(\"Session type\")]),_vm._v(\" \"),(_vm.selected_slots[key].session_types)?_c('div',{staticClass:\"grid grid-cols-2 sm:grid-cols-3 gap-3 mb-3\"},_vm._l((_vm.selected_slots[key].session_types),function(item,session_key){return _c('label',{key:session_key,staticClass:\"border border-black px-3 py-2 rounded-md cursor-pointer text-center text-sm\",class:item.id == _vm.selected_slots[key].session_id ? 'bg-yellow' : ''},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected_slots[key].session_id),expression:\"selected_slots[key].session_id\"}],staticClass:\"hidden\",attrs:{\"type\":\"radio\",\"name\":'session-'+key},domProps:{\"value\":item.id,\"checked\":_vm._q(_vm.selected_slots[key].session_id,item.id)},on:{\"change\":function($event){return _vm.$set(_vm.selected_slots[key], \"session_id\", item.id)}}}),_vm._v(\"\\n                            \"+_vm._s(item.name)+\"\\n                          \")])}),0):_c('div',[_c('p',[_vm._v(\"No session types available.\")])]),_vm._v(\" \"),(_vm.selected_slots[key].session_id == 3 && _vm.selected_slots[key].address && _vm.selected_slots[key].address.address_type !== 'Personal')?_c('div',{staticClass:\"relative pl-10 mb-3 px-3 py-2 text-sm leading-5 rounded bg-blue text-white\"},[_c('svg',{staticClass:\"absolute top-2 left-3 w-5 h-5\",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\":\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"}})]),_vm._v(\" \"),_c('span',[_vm._v(\"This session will be at: \"+_vm._s(_vm.selected_slots[key].address.formatted))])]):_vm._e(),_vm._v(\" \"),_c('t-radio-group',{attrs:{\"classes\":{\n                            groupWrapper: 'grid grid-cols-2 sm:grid-cols-3 gap-3',\n                            label: 'block pl-2.5',\n                            input: 'rounded-md w-5 h-5 text-black transition duration-100 ease-in-out border-gray-300 shadow-sm focus:border-black focus:ring-2 focus:ring-black focus:outline-none focus:ring-opacity-50 focus:ring-offset-0  disabled:opacity-50 disabled:cursor-not-allowed',\n                            inputWrapper: 'inline-flex',\n                            wrapper: 'flex items-center my-1',\n                          },\"textAttribute\":\"type\",\"valueAttribute\":\"id\",\"name\":'product-'+key,\"options\":_vm.therapist.products},model:{value:(_vm.selected_slots[key].product_id),callback:function ($$v) {_vm.$set(_vm.selected_slots[key], \"product_id\", $$v)},expression:\"selected_slots[key].product_id\"}})],1)]:[_c('span',{staticClass:\"block mb-2 text-sm font-bold\"},[_vm._v(_vm._s(_vm.$moment(key).format('DD/MM/Y')))]),_vm._v(\" \"),_c('p',[_vm._v(\"No availability for this day\")])]],2)}),0):_c('div',[_c('p',[_vm._v(\"No availability found\")])])]),_vm._v(\" \"),_c('div',{staticClass:\"mt-6 flex items-center justify-center\"},[_c('button',{staticClass:\"btn btn-primary btn-small rounded-full w-full sm:w-auto\",attrs:{\"disabled\":_vm.isSlotSelected == false,\"type\":\"button\"},on:{\"click\":_vm.getSummary}},[_vm._v(\"Next\")])])],1)])]:_vm._e(),_vm._ssrNode(\" \"),(_vm.step == 2)?_c('SummaryStep',{attrs:{\"selected_slots\":_vm.selectedSlots,\"working\":_vm.working,\"nextStep\":_vm.getPaymentStep,\"button_text\":\"Proceed to Payment\"},model:{value:(_vm.step),callback:function ($$v) {_vm.step=$$v},expression:\"step\"}}):_vm._e(),_vm._ssrNode(\" \"),(_vm.step == 3)?_c('RegisterStep',{model:{value:(_vm.step),callback:function ($$v) {_vm.step=$$v},expression:\"step\"}}):_vm._e(),_vm._ssrNode(\" \"),(_vm.step == 4)?_c('PaymentStep',{attrs:{\"selected_slots\":_vm.selectedSlots},model:{value:(_vm.step),callback:function ($$v) {_vm.step=$$v},expression:\"step\"}}):_vm._e()],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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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  head () {\n    return {\n      titleTemplate: 'Book '+this.full_name+' | %s'\n    }\n  },\n\n  data() {\n    return {\n      step: 1,\n      isLoaded: true,\n      loading: false,\n      working: false,\n      timer: null,\n      minDate: null,\n      maxDate: null,\n      availability: {},\n      available_dates: [],\n      selected_dates: [],\n      selected_slots: {}\n    }\n  },\n\n  computed: {\n    is_logged_in() {\n      return this.$auth.loggedIn;\n    },\n    therapist() {\n      return this.$store.state.booking.therapist\n    },\n    full_name() {\n      return this.therapist.user.full_name;\n    },\n    isSlotSelected() {\n      const object = this.selected_slots;\n      \n      for (const [key, value] of Object.entries(object)) {\n        if(value.slot !== null && value.session_id !== null && value.product_id !== null) {\n          return true;\n        }\n      }\n\n      return false;\n    },\n    selectedSlots() {\n      const slots = this.selected_slots;\n\n      return Object.keys(slots)\n      .filter(key => slots[key].slot !== null && slots[key].session_id !== null && slots[key].product_id !== null)\n      .reduce((obj, key) => {\n        return {\n          ...obj,\n          [key]: slots[key]\n        };\n      }, {});\n    }\n  },\n\n  async mounted() {\n    let query = this.$route.query;\n    let today = new Date();\n    \n    // Set some defaults\n    this.minDate = this.$moment(today).add(1, 'days').format('Y-MM-DD');\n\n    await this.$axios.post('/availability/'+this.therapist.id, {\n      dates: this.selected_dates\n    }).then((response) => {\n      this.loading = false;\n      this.availability = response.data.availability;\n      this.available_dates = response.data.available_dates;\n      \n      // Add the dates to the calendar\n      this.minDate = this.available_dates[0];\n      this.maxDate = this.available_dates[this.available_dates.length - 1];\n      this.selected_dates = [this.available_dates[0]];\n    }).catch((response) => {\n      this.loading = false;\n      this.$toast.error(response).goAway(3000)\n    })\n  },\n\n  async asyncData({ store, params }) {\n    await store.dispatch('booking/get', params.slug)\n  },\n\n  methods: {\n    changeDates() {\n      if (this.timer) {\n        clearTimeout(this.timer);\n        this.timer = null;\n      }\n\n      this.timer = setTimeout(() => {\n        this.getTimes()\n      }, 250);\n    },\n\n    changeTimeSlot(key, slot) {\n      this.selected_slots[key].session_types = slot.session_types\n\n      // Set address if it exists\n      if(slot.address !== null) {\n        this.selected_slots[key].address = slot.address\n        this.selected_slots[key].address_id = slot.address.id;\n      }\n    },\n\n    async getTimes() {\n      let query = this.$route.query;\n\n      this.loading = true;\n      await this.$axios.post('/availability/'+this.therapist.id, {\n        dates: this.selected_dates\n      }).then((response) => {\n        this.loading = false;\n        this.availability = response.data.availability;\n        this.available_dates = response.data.available_dates;\n        this.selected_slots = response.data.selected_slots;\n        \n        // Add the dates to the calendar\n        this.minDate = this.available_dates[0];\n        this.maxDate = this.available_dates[this.available_dates.length - 1];\n\n        if(this.isLoaded == true && query.time !== undefined && query.date !== undefined) {\n          this.selected_slots[query.date].slot = query.time;\n          this.selected_slots[query.date].product_id = this.therapist.products[0].id;\n          \n          if(this.availability[query.date][0].address) {\n            this.selected_slots[query.date].address_id = this.availability[query.date][0].address.id;\n            this.selected_slots[query.date].address = this.availability[query.date][0].address;\n          }\n\n          if(this.availability[query.date][0].session_types) {\n            this.selected_slots[query.date].session_types = this.availability[query.date][0].session_types;\n            this.selected_slots[query.date].session_id = this.availability[query.date][0].session_types[0].id;\n          }\n\n          this.isLoaded = false;\n        }\n      }).catch((response) => {\n        this.loading = false;\n        this.$toast.error(response).goAway(3000)\n      })\n    },\n    \n    async getSummary() {\n      this.$refs.bookingStepOne.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.step = 2;\n      });\n    },\n\n    async getPaymentStep() {\n      if(this.is_logged_in == false) {\n        this.step = 3;\n      } else {\n        this.step = 4;\n      }\n    },\n\n    getDisabledDates(rawDate) {\n      var date = this.$moment(rawDate).format('Y-MM-DD')\n      \n      return !this.available_dates.includes(date);\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!./_slug.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!./_slug.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./_slug.vue?vue&type=template&id=abfa9c62&\"\nimport script from \"./_slug.vue?vue&type=script&lang=js&\"\nexport * from \"./_slug.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  \"899a1390\"\n  \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {SummaryStep: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/blocks/Booking/SummaryStep.vue').default,RegisterStep: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/blocks/Booking/RegisterStep.vue').default,PaymentStep: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/blocks/Booking/PaymentStep.vue').default})\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;;;;;ACFA;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;AAGA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAhBA;AACA;AAqBA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAbA;AACA;AAcA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAtDA;;AC3EA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AClBA;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;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;AACA;AACA;AACA;AANA;AAQA;AACA;AACA;AAFA;AAXA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAQA;AACA;AACA;AACA;AACA;AAFA;AADA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AAGA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnEA;AA1BA;;AC9HA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;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;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AAFA;AAJA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAhBA;AACA;AAiBA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;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;AAFA;AAIA;AACA;AARA;AAWA;AACA;AACA;AACA;AACA;AAEA;AACA;AADA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AADA;AAFA;AADA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnIA;AAjDA;;ACnHA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACRA;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;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;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAGA;AAEA;AAFA;AAIA;AACA;AACA;AAjCA;AACA;AAkCA;AACA;AACA;AACA;AAEA;AAEA;AACA;AADA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;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;AAEA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AAEA;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;AAnFA;AAtFA;;ACpJA;;;;;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