%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 |
exports.ids = [5,10]; 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}) /***/ }), /***/ 188: /***/ (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/settings/AccountPersonal.vue?vue&type=template&id=3b967854& 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){ var errors = ref.errors; return [_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){ var errors = ref.errors; return [_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){ var errors = ref.errors; return [_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){ var errors = ref.errors; return [_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){ var errors = ref.errors; return [_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){ var errors = ref.errors; return [_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){ var errors = ref.errors; return [_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)} var staticRenderFns = [] // CONCATENATED MODULE: ./components/blocks/Account/settings/AccountPersonal.vue?vue&type=template&id=3b967854& // 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/settings/AccountPersonal.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var AccountPersonalvue_type_script_lang_js_ = ({ data() { return { working: false, first_name: '', last_name: '', email: '', phone: '', address: { address: '', town_city: '', postcode: '' } }; }, async fetch() { const { data } = await this.$axios.$get('/account/details/personal'); for (const [key, value] of Object.entries(data)) { if (value !== null) { this[key] = value; } else if (Array.isArray(value) && value !== null) { this[key].push(value); } } }, methods: { async saveDetails() { this.$refs.form.validate().then(success => { if (!success) { return; } this.working = true; this.$axios.$post('/account/details/personal/update', { first_name: this.first_name, last_name: this.last_name, email: this.email, phone: this.phone, address: this.address }).then(response => { this.working = false; this.$store.dispatch('account/progress/get', { slug: 'settings' }); this.$toast.success(response).goAway(1500); }).catch(error => { this.working = false; this.$refs.form.setErrors(error.response.data.errors); }); }); } } }); // CONCATENATED MODULE: ./components/blocks/Account/settings/AccountPersonal.vue?vue&type=script&lang=js& /* harmony default export */ var settings_AccountPersonalvue_type_script_lang_js_ = (AccountPersonalvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(1); // CONCATENATED MODULE: ./components/blocks/Account/settings/AccountPersonal.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( settings_AccountPersonalvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "435253d8" ) /* harmony default export */ var AccountPersonal = __webpack_exports__["default"] = (component.exports); /* nuxt-component-imports */ installComponents(component, {Block: __webpack_require__(131).default}) /***/ }) };; //# sourceMappingURL=account-personal.js.map