%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/
Upload File :
Create Path :
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/server/components/question-section-one.js.map

{"version":3,"file":"components/question-section-one.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/profile/QuestionSectionOne.vue","webpack:///./components/blocks/Account/profile/QuestionSectionOne.vue?f90c","webpack:///./components/blocks/Account/profile/QuestionSectionOne.vue?056e","webpack:///./components/blocks/Account/profile/QuestionSectionOne.vue?3b31"],"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","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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      photo_url: '',\n      file: '',\n      form: {\n        gender: '',\n        languages: [],\n        tags: []\n      },\n      questions: []\n    }\n  },\n\n  computed: {\n    languages() {\n      return this.$store.state.languages.list\n    },\n    tags() {\n      return this.$store.state.tags.list\n    }\n  },\n\n  async mounted() {\n    await this.$store.dispatch('languages/get')\n    await this.$store.dispatch('tags/list')\n    await this.$axios.$post('/account/profile/questions', {\n      section_id: 1\n    }).then((response) => {\n      this.photo_url = response.image_one_url;\n      this.form.gender = response.gender;\n      this.form.languages = response.languages;\n      this.form.tags = response.tags;\n      this.questions = response.questions;\n    }).catch((error) => {\n      this.$toast.error(error).goAway(3000);\n    })\n  },\n\n  methods: {\n    async handleFileChange(e) {\n      const { valid } = await this.$refs.provider.validate(e);\n      let fileUrl = this.$refs.file.files[0];\n\n      if (valid == true) {\n        this.$refs.cropModal.show()\n        if(fileUrl) {\n          setTimeout(() => {\n            this.$refs.croppieRef.bind({\n              url: URL.createObjectURL(fileUrl)\n            });\n          }, 250)\n        }\n      }\n    },\n\n    crop() {\n      let options = {\n        format: 'jpeg',\n        size: { width: 1500 },\n      }\n\n      this.$refs.croppieRef.result(options, (output) => {\n        this.file = output;\n        this.uploadImage();\n      });\n    },\n\n    result(output) {\n      this.file = output;\n    },\n\n    async save() {\n      this.$refs.form.validate().then(success => {\n        if (!success) {\n          return;\n        }\n\n        this.working = true;\n        this.$axios.$post('/account/profile/questions/create', {\n          gender: this.form.gender,\n          languages: this.form.languages,\n          questions: this.questions,\n          tags: this.form.tags\n        }).then((response) => {\n          this.working = false;\n          this.$store.dispatch('account/progress/get', { slug: 'profile' })\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    async uploadImage() {\n      let formData = new FormData();\n\n      formData.append('file', this.file);\n      formData.append('prefix', 'image_one_');\n\n      this.working = true;\n      await this.$axios.$post('/account/profile/images/upload', formData\n        ).then((response) => {\n          this.working = false;\n          this.photo_url = response;\n          this.$refs.cropModal.hide()\n          this.$store.dispatch('account/progress/get', { slug: 'profile' })\n          this.$toast.success('Successfully updated your photo').goAway(1500);\n        }).catch((error) => {\n          this.working = false;\n          this.$refs.cropModal.hide()\n          this.$refs.form.setErrors(error.response.data.errors);\n        })\n    },\n\n    limiter(e) {\n      if(e.length > 5) {\n        this.$toast.info('You can only select a max of five').goAway(1000);\n        e.pop()\n      }\n    }\n  }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{\"title\":\"Getting To Know you\",\"description\":\"Add a little bit more professional detail and insight to who you are as a therapist. This will help to bring you the right clients.\",\"width\":\"max-w-5xl\"}},[_c('ValidationObserver',{ref:\"form\"},[_c('form',{attrs:{\"role\":\"form\",\"method\":\"POST\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.save($event)}}},[_c('ValidationProvider',{ref:\"provider\",attrs:{\"rules\":\"image|size:10000\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar validate = ref.validate;\nvar errors = ref.errors;\nreturn [_c('div',{staticClass:\"mb-8 text-center\"},[_c('label',{staticClass:\"w-full cursor-pointer\",attrs:{\"for\":\"photo-one\"}},[(_vm.photo_url)?_c('div',{staticClass:\"rounded-lg overflow-hidden shadow\"},[_c('img',{staticClass:\"w-full\",attrs:{\"src\":_vm.photo_url}})]):_c('div',{staticClass:\"border border-dashed border-1 border-black border-opacity-20 bg-white p-10 rounded-lg\"},[_c('span',{staticClass:\"text-sm text-black text-opacity-50\"},[_vm._v(\"Click to add a photo\")])]),_vm._v(\" \"),_c('input',{ref:\"file\",staticClass:\"hidden\",attrs:{\"type\":\"file\",\"id\":\"photo-one\"},on:{\"change\":function($event){return _vm.handleFileChange()}}}),_vm._v(\" \"),_c('span',{staticClass:\"mt-4 block uppercase text-blue-light\"},[_vm._v(\"Upload Photo\")])]),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]),_vm._v(\" \"),_c('t-modal',{ref:\"cropModal\",attrs:{\"header\":\"Crop & Upload\"},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('div',{staticClass:\"flex flex-wrap justify-between\"},[_c('button',{staticClass:\"btn btn-small btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.$refs.cropModal.hide()}}},[_vm._v(\"\\n                Cancel\\n              \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-small btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.crop()}}},[(_vm.working == false)?_c('span',[_vm._v(\"Crop & Upload\")]):_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\")])])])])]},proxy:true}],null,true)},[_c('vue-croppie',{ref:\"croppieRef\",attrs:{\"enableOrientation\":true,\"enableResize\":false,\"boundary\":{ width: 500, height: 250},\"viewport\":{ width: 400, height: 200}},on:{\"result\":_vm.result}})],1)]}}])}),_vm._v(\" \"),_c('div',{staticClass:\"max-w-lg w-full mx-auto\"},[_c('t-input-group',{attrs:{\"label\":\"Gender\"}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"enthicity\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-select',{attrs:{\"placeholder\":\"Select...\",\"options\":['Female',  'Male', 'Prefer not to say']},model:{value:(_vm.form.gender),callback:function ($$v) {_vm.$set(_vm.form, \"gender\", $$v)},expression:\"form.gender\"}}),_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\":\"Languages Spoken\"}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"enthicity\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-rich-select',{attrs:{\"multiple\":\"\",\"options\":_vm.languages,\"close-on-select\":false,\"placeholder\":\"Select...\",\"value-attribute\":\"id\",\"text-attribute\":\"name\"},model:{value:(_vm.form.languages),callback:function ($$v) {_vm.$set(_vm.form, \"languages\", $$v)},expression:\"form.languages\"}}),_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\":\"Describe yourself\",\"feedback\":\"Please select five options that describe you or your approach\"}},[_c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":\"tags\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('t-rich-select',{attrs:{\"multiple\":\"\",\"options\":_vm.tags,\"close-on-select\":false,\"placeholder\":\"Select...\",\"value-attribute\":\"id\",\"text-attribute\":\"name\"},on:{\"change\":_vm.limiter},model:{value:(_vm.form.tags),callback:function ($$v) {_vm.$set(_vm.form, \"tags\", $$v)},expression:\"form.tags\"}}),_vm._v(\" \"),(errors[0])?_c('span',{staticClass:\"field-invalid\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}])})],1),_vm._v(\" \"),_vm._l((_vm.questions),function(item,key){return _c('div',{key:key},[_c('t-input-group',{attrs:{\"label\":item.question}},[(item.question_type == 1)?_c('t-input',{model:{value:(item.answer),callback:function ($$v) {_vm.$set(item, \"answer\", $$v)},expression:\"item.answer\"}}):_c('t-textarea',{model:{value:(item.answer),callback:function ($$v) {_vm.$set(item, \"answer\", $$v)},expression:\"item.answer\"}})],1)],1)}),_vm._v(\" \"),_c('div',{staticClass:\"flex items-center justify-center\"},[_c('button',{staticClass:\"btn 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\")])])])])],2)],1)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","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!./QuestionSectionOne.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!./QuestionSectionOne.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./QuestionSectionOne.vue?vue&type=template&id=6320d6da&\"\nimport script from \"./QuestionSectionOne.vue?vue&type=script&lang=js&\"\nexport * from \"./QuestionSectionOne.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  \"711ee7e0\"\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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AAHA;AAKA;AATA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAPA;AACA;AAQA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAFA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnFA;AAxCA;;;;;;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;;;;;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