%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-personal.js.map |
{"version":3,"file":"components/account-personal.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/AccountPersonal.vue?f984","webpack:///./components/blocks/Account/settings/AccountPersonal.vue","webpack:///./components/blocks/Account/settings/AccountPersonal.vue?6ef8","webpack:///./components/blocks/Account/settings/AccountPersonal.vue?20d3"],"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\":\"Personal Details\"}},[_c('ValidationObserver',{ref:\"form\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.saveDetails($event)}}},[_c('t-input-group',{attrs:{\"label\":\"First Name\"}},[_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.first_name),expression:\"first_name\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"first_name\",\"name\":\"first_name\"},domProps:{\"value\":(_vm.first_name)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.first_name=$event.target.value}}}),_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\":\"Surname\"}},[_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.last_name),expression:\"last_name\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"last_name\",\"name\":\"last_name\"},domProps:{\"value\":(_vm.last_name)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.last_name=$event.target.value}}}),_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\":\"Email Address\"}},[_c('ValidationProvider',{attrs:{\"name\":\"email\",\"rules\":\"required|email\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.email),expression:\"email\"}],staticClass:\"form-control\",attrs:{\"type\":\"email\",\"id\":\"email\",\"name\":\"email\"},domProps:{\"value\":(_vm.email)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.email=$event.target.value}}}),_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\":\"Phone Number\"}},[_c('ValidationProvider',{attrs:{\"rules\":\"required|phone_number\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.phone),expression:\"phone\"}],staticClass:\"form-control\",attrs:{\"type\":\"tel\",\"id\":\"phone\",\"name\":\"phone\",\"placeholder\":\"+44\"},domProps:{\"value\":(_vm.phone)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.phone=$event.target.value}}}),_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\":\"Home Address\"}},[_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.address.address),expression:\"address.address\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"address\",\"name\":\"address\"},domProps:{\"value\":(_vm.address.address)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.address, \"address\", $event.target.value)}}}),_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\":\"Town/City\"}},[_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.address.town_city),expression:\"address.town_city\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"town\",\"name\":\"town\"},domProps:{\"value\":(_vm.address.town_city)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.address, \"town_city\", $event.target.value)}}}),_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\":\"Postcode\"}},[_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.address.postcode),expression:\"address.postcode\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"Postcode\",\"name\":\"Postcode\"},domProps:{\"value\":(_vm.address.postcode)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.address, \"postcode\", $event.target.value)}}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center\"},[_c('button',{staticClass:\"btn btn-small btn-primary rounded-full\",attrs:{\"type\":\"submit\"}},[(_vm.working == false)?_c('span',[_vm._v(\"Save Changes\")]):_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\")])])])])],1)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n data() {\n return {\n working: false,\n first_name: '',\n last_name: '',\n email: '',\n phone: '',\n address: {\n address: '',\n town_city: '',\n postcode: ''\n }\n }\n },\n\n async fetch() {\n const { data } = await this.$axios.$get('/account/details/personal')\n \n for (const [key, value] of Object.entries(data)) {\n if(value !== null) {\n this[key] = value;\n } else if(Array.isArray(value) && value !== null) {\n this[key].push(value);\n }\n }\n },\n\n methods: {\n async saveDetails() {\n this.$refs.form.validate().then(success => {\n if (!success) {\n return;\n }\n \n this.working = true;\n this.$axios.$post('/account/details/personal/update', {\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n address: this.address\n }).then((response) => {\n this.working = false;\n this.$store.dispatch('account/progress/get', { slug: 'settings' })\n this.$toast.success(response).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!./AccountPersonal.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!./AccountPersonal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AccountPersonal.vue?vue&type=template&id=3b967854&\"\nimport script from \"./AccountPersonal.vue?vue&type=script&lang=js&\"\nexport * from \"./AccountPersonal.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 \"435253d8\"\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;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AANA;AAYA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBA;AA5BA;;ACjGA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}