%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/account-locations.js.map |
{"version":3,"file":"components/account-locations.js","sources":["webpack:///./components/slots/Block.vue?a39f","webpack:///./components/slots/Block.vue","webpack:///./components/slots/Block.vue?8d1a","webpack:///./components/slots/Block.vue?1f5b","webpack:///./components/blocks/Account/settings/AccountLocations.vue?5d81","webpack:///./components/blocks/Account/settings/AccountLocations.vue","webpack:///./components/blocks/Account/settings/AccountLocations.vue?2ad7","webpack:///./components/blocks/Account/settings/AccountLocations.vue?ad6f"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"bg-gray py-8 md:py-20 px-4 md:px-8 mb-8\"},[_vm._ssrNode(\"<div class=\\\"max-w-xl mx-auto w-full\\\"><header class=\\\"text-center mb-10\\\"><h2\"+(_vm._ssrClass(\"text-2xl sm:text-3xl font-bold\",_vm.description ? 'mb-8' : ''))+\">\"+_vm._ssrEscape(_vm._s(_vm.title))+\"</h2> \"+((_vm.description)?(\"<p class=\\\"text-sm sm:text-base\\\">\"+_vm._ssrEscape(_vm._s(_vm.description))+\"</p>\"):\"<!---->\")+\"</header></div> \"),_vm._ssrNode(\"<div\"+(_vm._ssrClass(\"mx-auto w-full\",_vm.width ? _vm.width : 'max-w-xl'))+\">\",\"</div>\",[_vm._t(\"default\")],2)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n props: {\n title: {\n type: String,\n required: true\n },\n description: {\n type: String,\n required: false\n },\n width: {\n type: String,\n required: false,\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Block.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Block.vue?vue&type=template&id=0e972406&\"\nimport script from \"./Block.vue?vue&type=script&lang=js&\"\nexport * from \"./Block.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n \"127f880a\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {Header: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/layout/Header.vue').default})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{\"title\":\"Practice Locations\",\"description\":\"If you offer therapy session at specific locations such as a rented office, you should add them here.\"}},[_c('ValidationObserver',{ref:\"form\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.saveAddresses($event)}}},[_vm._l((_vm.addresses),function(address,key){return _c('div',{key:key,staticClass:\"mb-8\"},[_c('h2',{staticClass:\"px-3 text-xl font-bold mb-3\"},[_vm._v(\"Address \"+_vm._s((key + 1)))]),_vm._v(\" \"),_c('div',{staticClass:\"relative mb-4\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":'address-'+key}},[_vm._v(\"Address\")]),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.addresses[key].address),expression:\"addresses[key].address\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":'address-'+key,\"name\":\"address\"},domProps:{\"value\":(_vm.addresses[key].address)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.addresses[key], \"address\", $event.target.value)}}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,true)})],1),_vm._v(\" \"),_c('div',{staticClass:\"relative mb-4\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":'town-'+key}},[_vm._v(\"Town/City\")]),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.addresses[key].town_city),expression:\"addresses[key].town_city\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":'town-'+key,\"name\":\"town\"},domProps:{\"value\":(_vm.addresses[key].town_city)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.addresses[key], \"town_city\", $event.target.value)}}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,true)})],1),_vm._v(\" \"),_c('div',{staticClass:\"relative mb-4\"},[_c('label',{staticClass:\"form-label\",attrs:{\"for\":'postcode-'+key}},[_vm._v(\"Postcode\")]),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":{ required: true, regex: /^(([gG][iI][rR] {0,}0[aA]{2})|((([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y]?[0-9][0-9]?)|(([a-pr-uwyzA-PR-UWYZ][0-9][a-hjkstuwA-HJKSTUW])|([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y][0-9][abehmnprv-yABEHMNPRV-Y]))) {0,}[0-9][abd-hjlnp-uw-zABD-HJLNP-UW-Z]{2}))$/ }},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.addresses[key].postcode),expression:\"addresses[key].postcode\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":'postcode-'+key,\"name\":\"Postcode\"},domProps:{\"value\":(_vm.addresses[key].postcode)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.addresses[key], \"postcode\", $event.target.value)}}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,true)})],1),_vm._v(\" \"),_c('ValidationProvider',{attrs:{\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('label',{staticClass:\"flex items-center\"},[_c('t-radio',{attrs:{\"name\":\"default_address\"},on:{\"change\":function($event){return _vm.changeDefaultRadioButtons(key)}},model:{value:(_vm.addresses[key].is_default),callback:function ($$v) {_vm.$set(_vm.addresses[key], \"is_default\", $$v)},expression:\"addresses[key].is_default\"}}),_vm._v(\" \"),_c('span',{staticClass:\"ml-2 text-sm\"},[_vm._v(\"Default Address\")])],1),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,true)}),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center my-4\"},[_c('button',{staticClass:\"uppercase text-red text-sm focus:outline-none\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.remove(key)}}},[_vm._v(\"Remove\")])])],1)}),_vm._v(\" \"),(_vm.addresses.length > 0)?_c('div',{staticClass:\"flex items-center justify-center my-6\"},[_c('button',{staticClass:\"btn btn-small btn-primary rounded-full\",attrs:{\"type\":\"submit\"}},[(_vm.working == false)?_c('span',[_vm._v(\"Save Addresses\")]):_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(\"Saving\")])])])]):_vm._e()],2)]),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center\"},[_c('button',{staticClass:\"uppercase text-blue-light focus:outline-none\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.add}},[_vm._v(\"Add Practice Location\")])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n data() {\n return {\n working: false,\n addresses: []\n }\n },\n\n async mounted() {\n await this.$axios.$get('/account/details/addresses').then((response) => {\n this.addresses = response.data;\n })\n },\n \n methods: {\n add() {\n this.addresses.push({\n address: '',\n town_city: '',\n postcode: '',\n is_default: false\n });\n },\n\n remove(key) {\n this.addresses.splice(key, 1);\n },\n\n changeDefaultRadioButtons(key) {\n this.addresses.forEach(function (item, index) {\n if(index == key) {\n this.addresses[index].is_default = true;\n } else {\n this.addresses[index].is_default = false;\n }\n }.bind(this));\n },\n\n async saveAddresses() {\n this.$refs.form.validate().then(success => {\n if (!success) {\n return;\n }\n \n this.working = true;\n this.$axios.$post('/account/details/addresses/update', {\n addresses: this.addresses\n }).then((response) => {\n this.addresses = response.data;\n this.working = false;\n this.$store.dispatch('account/progress/get', { slug: 'settings' })\n this.$toast.success('Succesfully updated your practice locations').goAway(1500);\n }).catch(error => {\n this.working = false;\n this.$refs.form.setErrors(error.response.data.errors);\n })\n })\n }\n }\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountLocations.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!./AccountLocations.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AccountLocations.vue?vue&type=template&id=0b488374&\"\nimport script from \"./AccountLocations.vue?vue&type=script&lang=js&\"\nexport * from \"./AccountLocations.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 \"6274b53a\"\n \n)\n\nexport default component.exports\n\n/* nuxt-component-imports */\ninstallComponents(component, {Block: require('/home/forge/takeaseat.eco-n-tech.co.uk/components/slots/Block.vue').default})\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AATA;AADA;;AClBA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;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;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5CA;AAdA;;ACxFA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}