%PDF- %PDF-
Mini Shell

Mini Shell

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

exports.ids = [43,3,6,10,24,26,27,29];
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})


/***/ }),

/***/ 145:
/***/ (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/AccountProgressBar.vue?vue&type=template&id=7467445a&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"relative z-20 max-w-md w-full mt-8 text-center"},[_vm._ssrNode("<div class=\"w-full bg-black bg-opacity-25 h-1 rounded-lg overflow-hidden mb-6\"><div class=\"bg-white h-1 transition-width duration-500\""+(_vm._ssrStyle(null,'width:'+_vm.progress+'%', null))+"></div></div> <span class=\"uppercase text-lg\">"+_vm._ssrEscape(_vm._s(_vm.progress)+"% Complete")+"</span>")])}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue?vue&type=template&id=7467445a&

// 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/AccountProgressBar.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AccountProgressBarvue_type_script_lang_js_ = ({
  props: {
    slug: {
      type: String,
      required: false,
      default: null
    }
  },
  computed: {
    progress() {
      return this.$store.state.account.progress.total;
    }

  },

  async mounted() {
    await this.$store.dispatch('account/progress/get', {
      slug: this.slug
    });
  }

});
// CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue?vue&type=script&lang=js&
 /* harmony default export */ var Account_AccountProgressBarvue_type_script_lang_js_ = (AccountProgressBarvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./components/blocks/Account/AccountProgressBar.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  Account_AccountProgressBarvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "6bf5e32c"
  
)

/* harmony default export */ var AccountProgressBar = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 146:
/***/ (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/AccountNav.vue?vue&type=template&id=37a7f59d&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"relative"},[_vm._ssrNode("<button class=\"flex md:hidden items-center justify-center w-full focus:outline-none\"><div class=\"relative w-8\"><span"+(_vm._ssrClass("block mb-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? 'rotate-45 translate-y-2' : ''))+"></span> <span"+(_vm._ssrClass("block my-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? 'opacity-0' : ''))+"></span> <span"+(_vm._ssrClass("block mt-1.5 h-1 w-full bg-black rounded transform transition duration-100",_vm.menuOpen ? '-rotate-45 -translate-y-3' : ''))+"></span></div> <span class=\"block ml-3 font-bold\">Menu</span></button> "),_vm._ssrNode("<div class=\"hidden md:flex flex-wrap items-center justify-center\">","</div>",[_vm._l((_vm.links),function(link,key){return _vm._ssrNode("<div>","</div>",[(link.role == 'all' || _vm.role == link.role)?_c('NuxtLink',{staticClass:"account-nav-link",attrs:{"to":link.url}},[_vm._v(_vm._s(link.name))]):_vm._e()],1)}),_vm._ssrNode(" <button type=\"button\" class=\"account-nav-link\">Log Out</button>")],2),_vm._ssrNode(" "+((_vm.menuOpen == true)?("<div class=\"fixed z-40 top-0 left-0 w-full h-full\"></div>"):"<!---->")+" "),(_vm.menuOpen == true)?_vm._ssrNode("<div class=\"fixed z-50 bottom-0 left-0 w-full p-3 rounded-t-xl bg-white block overflow-hidden md:hidden\">","</div>",[_vm._l((_vm.links),function(link,key){return _vm._ssrNode("<div>","</div>",[(link.role == 'all' || _vm.role == link.role)?_c('NuxtLink',{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{"to":link.url}},[_vm._v(_vm._s(link.name))]):_vm._e()],1)}),_vm._ssrNode(" <button type=\"button\" class=\"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow\">Log Out</button>")],2):_vm._e()],2)}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue?vue&type=template&id=37a7f59d&

// 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/AccountNav.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AccountNavvue_type_script_lang_js_ = ({
  data() {
    return {
      menuOpen: false,
      links: [{
        role: 'therapist',
        name: 'Profile',
        url: '/account'
      }, {
        role: 'therapist',
        name: 'Availability',
        url: '/account/availability'
      }, {
        role: 'therapist',
        name: 'Verification',
        url: '/account/verification'
      }, {
        role: 'all',
        name: 'Financial',
        url: '/account/financial'
      }, {
        role: 'all',
        name: 'Settings',
        url: '/account/settings'
      }]
    };
  },

  computed: {
    role() {
      if (this.$auth.loggedIn == true) {
        return this.$auth.user.data.role.name;
      }

      return 'all';
    }

  },
  methods: {
    async logout() {
      await this.$auth.logout();
    }

  }
});
// CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue?vue&type=script&lang=js&
 /* harmony default export */ var Account_AccountNavvue_type_script_lang_js_ = (AccountNavvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./components/blocks/Account/AccountNav.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  Account_AccountNavvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "6f6d45ae"
  
)

/* harmony default export */ var AccountNav = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 153:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(URL) {//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
  data() {
    return {
      working: false,
      showModal: false,
      photo_url: null,
      file: null,
      selected_colour: 'yellow',
      colours: [{
        name: 'yellow'
      }, {
        name: 'green'
      }, {
        name: 'pink'
      }, {
        name: 'blue-light'
      }, {
        name: 'blue-medium'
      }, {
        name: 'orange'
      }, {
        name: 'green-dark'
      }, {
        name: 'red'
      }, {
        name: 'blue'
      }, {
        name: 'purple'
      }]
    };
  },

  computed: {
    user() {
      return this.$auth.user;
    }

  },

  async mounted() {
    await this.$axios.$get('/profile').then(response => {
      this.selected_colour = response.data.colour;
      this.photo_url = response.data.user.photo_url;
    });
  },

  methods: {
    async handleFileChange(e) {
      const {
        valid
      } = await this.$refs.provider.validate(e);
      let fileUrl = this.$refs.file.files[0];

      if (valid == true) {
        this.$refs.cropModal.show();

        if (fileUrl) {
          setTimeout(() => {
            this.$refs.croppieRef.bind({
              url: URL.createObjectURL(fileUrl)
            });
          }, 250);
        }
      }
    },

    crop() {
      let options = {
        format: 'jpeg'
      };
      this.$refs.croppieRef.result(options, output => {
        this.file = output;
        this.uploadPhoto();
      });
    },

    result(output) {
      this.file = output;
    },

    async uploadPhoto() {
      this.$refs.form.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.$post('/account/profile/photo', {
          file: this.file
        }).then(response => {
          this.working = false;
          this.photo_url = response;
          this.$refs.cropModal.hide();
          this.$store.dispatch('account/progress/get', {
            slug: 'profile'
          });
          this.$toast.success('Successfully updated your photo').goAway(1500);
        }).catch(error => {
          this.working = false;
          this.$refs.cropModal.hide();
          this.$refs.form.setErrors(error.response.data.errors);
        });
      });
    },

    async saveTheme() {
      this.working = true;
      this.$axios.$post('/profile/update', {
        colour: this.selected_colour
      }).then(response => {
        this.working = false;
        this.$toast.success('Successfully updated your colour').goAway(1500);
      });
    }

  }
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(130)["URL"]))

/***/ }),

/***/ 154:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(URL) {//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
  data() {
    return {
      working: false,
      photo_url: '',
      file: '',
      form: {
        gender: '',
        languages: [],
        tags: []
      },
      questions: []
    };
  },

  computed: {
    languages() {
      return this.$store.state.languages.list;
    },

    tags() {
      return this.$store.state.tags.list;
    }

  },

  async mounted() {
    await this.$store.dispatch('languages/get');
    await this.$store.dispatch('tags/list');
    await this.$axios.$post('/account/profile/questions', {
      section_id: 1
    }).then(response => {
      this.photo_url = response.image_one_url;
      this.form.gender = response.gender;
      this.form.languages = response.languages;
      this.form.tags = response.tags;
      this.questions = response.questions;
    }).catch(error => {
      this.$toast.error(error).goAway(3000);
    });
  },

  methods: {
    async handleFileChange(e) {
      const {
        valid
      } = await this.$refs.provider.validate(e);
      let fileUrl = this.$refs.file.files[0];

      if (valid == true) {
        this.$refs.cropModal.show();

        if (fileUrl) {
          setTimeout(() => {
            this.$refs.croppieRef.bind({
              url: URL.createObjectURL(fileUrl)
            });
          }, 250);
        }
      }
    },

    crop() {
      let options = {
        format: 'jpeg',
        size: {
          width: 1500
        }
      };
      this.$refs.croppieRef.result(options, output => {
        this.file = output;
        this.uploadImage();
      });
    },

    result(output) {
      this.file = output;
    },

    async save() {
      this.$refs.form.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.$post('/account/profile/questions/create', {
          gender: this.form.gender,
          languages: this.form.languages,
          questions: this.questions,
          tags: this.form.tags
        }).then(response => {
          this.working = false;
          this.$store.dispatch('account/progress/get', {
            slug: 'profile'
          });
          this.$toast.success(response).goAway(1500);
        }).catch(error => {
          this.working = false;
          this.$refs.form.setErrors(error.response.data.errors);
        });
      });
    },

    async uploadImage() {
      let formData = new FormData();
      formData.append('file', this.file);
      formData.append('prefix', 'image_one_');
      this.working = true;
      await this.$axios.$post('/account/profile/images/upload', formData).then(response => {
        this.working = false;
        this.photo_url = response;
        this.$refs.cropModal.hide();
        this.$store.dispatch('account/progress/get', {
          slug: 'profile'
        });
        this.$toast.success('Successfully updated your photo').goAway(1500);
      }).catch(error => {
        this.working = false;
        this.$refs.cropModal.hide();
        this.$refs.form.setErrors(error.response.data.errors);
      });
    },

    limiter(e) {
      if (e.length > 5) {
        this.$toast.info('You can only select a max of five').goAway(1000);
        e.pop();
      }
    }

  }
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(130)["URL"]))

/***/ }),

/***/ 183:
/***/ (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/profile/ProfileRates.vue?vue&type=template&id=319b4956&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{"title":"Rates","description":"Please set your session prices. We don’t want you to devalue your services so have set rates for individual or couples only.","width":"max-w-3xl"}},[_c('ValidationObserver',{ref:"form"},[_c('form',{attrs:{"role":"form","method":"POST"},on:{"submit":function($event){$event.preventDefault();return _vm.submit($event)}}},[_c('div',{staticClass:"grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-0"},[_c('ValidationProvider',{attrs:{"rules":"required|integer"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-input-group',{attrs:{"label":"Individual Price"}},[_c('money',_vm._b({model:{value:(_vm.products.individuals_price),callback:function ($$v) {_vm.$set(_vm.products, "individuals_price", $$v)},expression:"products.individuals_price"}},'money',_vm.money,false)),_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|integer"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-input-group',{attrs:{"label":"Couples Price"}},[_c('money',_vm._b({model:{value:(_vm.products.couples_price),callback:function ($$v) {_vm.$set(_vm.products, "couples_price", $$v)},expression:"products.couples_price"}},'money',_vm.money,false)),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e()],1)]}}])})],1),_vm._v(" "),_c('div',{staticClass:"mt-6 flex items-center justify-center"},[_c('button',{staticClass:"btn btn-primary btn-small",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)}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/blocks/Account/profile/ProfileRates.vue?vue&type=template&id=319b4956&

// 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/profile/ProfileRates.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ProfileRatesvue_type_script_lang_js_ = ({
  name: 'ProfileRates',

  data() {
    return {
      working: false,
      products: {
        individuals_price: 0,
        couples_price: 0
      },
      money: {
        decimal: ',',
        thousands: ',',
        prefix: '£ ',
        suffix: '',
        precision: 0,
        masked: false
      }
    };
  },

  computed: {
    session_types() {
      return this.$store.state.session_types.list;
    }

  },

  async mounted() {
    await this.$axios.get('/account/profile/products').then(response => {
      if (response.data.data.length) {
        this.products.individuals_price = response.data.data[0].price;
        this.products.couples_price = response.data.data[1].price;
      }
    }).catch(error => {
      this.$toast.error(error).goAway(1000);
    });
  },

  methods: {
    async submit() {
      this.$refs.form.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.post('/account/profile/products/create', {
          individuals_price: this.products.individuals_price,
          couples_price: this.products.couples_price
        }).then(response => {
          this.working = false;
          this.$store.dispatch('account/progress/get', {
            slug: 'profile'
          });
          this.$toast.success('Successfully updated your rates!').goAway(3000);
        }).catch(error => {
          this.working = false;
          this.$toast.error(error).goAway(3000);
        });
      });
    }

  }
});
// CONCATENATED MODULE: ./components/blocks/Account/profile/ProfileRates.vue?vue&type=script&lang=js&
 /* harmony default export */ var profile_ProfileRatesvue_type_script_lang_js_ = (ProfileRatesvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./components/blocks/Account/profile/ProfileRates.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  profile_ProfileRatesvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "13e468c3"
  
)

/* harmony default export */ var ProfileRates = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {Block: __webpack_require__(131).default})


/***/ }),

/***/ 184:
/***/ (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/profile/ProfileSessionTypes.vue?vue&type=template&id=759d4da5&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{"title":"Session Types","description":"Please select all of the therapy session types you currently provide.."}},[_c('ValidationObserver',{ref:"form"},[_c('form',{attrs:{"role":"form","method":"POST"},on:{"submit":function($event){$event.preventDefault();return _vm.submit($event)}}},[_c('t-input-group',{attrs:{"label":"Sessions Available Via:"}},[_c('ValidationProvider',{attrs:{"rules":"required"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-checkbox-group',{attrs:{"name":"session_types","textAttribute":"name","valueAttribute":"id","options":_vm.session_types},model:{value:(_vm.form.session_types),callback:function ($$v) {_vm.$set(_vm.form, "session_types", $$v)},expression:"form.session_types"}}),_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 Sessions")]):_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/profile/ProfileSessionTypes.vue?vue&type=template&id=759d4da5&

// 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/profile/ProfileSessionTypes.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var ProfileSessionTypesvue_type_script_lang_js_ = ({
  name: 'ProfileSessionTypes',

  data() {
    return {
      working: false,
      form: {
        session_types: []
      }
    };
  },

  computed: {
    session_types() {
      return this.$store.state.session_types.list;
    }

  },

  async mounted() {
    await this.$axios.$get('/profile/session-types').then(response => {
      this.form.session_types = response;
    });
  },

  methods: {
    async submit() {
      this.$refs.form.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.$post('/profile/session-types/update', {
          session_types: this.form.session_types
        }).then(response => {
          this.working = false;
          this.$store.dispatch('account/progress/get', {
            slug: 'profile'
          });
          this.$toast.success(response).goAway(1500);
        });
      });
    }

  }
});
// CONCATENATED MODULE: ./components/blocks/Account/profile/ProfileSessionTypes.vue?vue&type=script&lang=js&
 /* harmony default export */ var profile_ProfileSessionTypesvue_type_script_lang_js_ = (ProfileSessionTypesvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./components/blocks/Account/profile/ProfileSessionTypes.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  profile_ProfileSessionTypesvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "47c11983"
  
)

/* harmony default export */ var ProfileSessionTypes = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {Block: __webpack_require__(131).default})


/***/ }),

/***/ 198:
/***/ (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/profile/Personalisation.vue?vue&type=template&id=51eeda71&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Block',{attrs:{"title":"Personalisation","description":"Upload a photo & choose a colour that makes you stand out"}},[_c('ValidationObserver',{ref:"form"},[_c('form',{attrs:{"role":"form","method":"POST"},on:{"submit":function($event){$event.preventDefault();return _vm.uploadPhoto($event)}}},[_c('ValidationProvider',{ref:"provider",attrs:{"rules":"image|size:10000"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var validate = ref.validate;
var errors = ref.errors;
return [_c('div',{staticClass:"w-full mx-auto mb-8 text-center",staticStyle:{"max-width":"170px"}},[_c('label',{staticClass:"block cursor-pointer",attrs:{"for":"file"}},[(_vm.photo_url)?_c('div',{staticClass:"relative"},[_c('div',{staticClass:"absolute top-0 left-0 w-full h-full border-15 border-opacity-50",class:'tas-border-'+_vm.selected_colour}),_vm._v(" "),_c('img',{staticClass:"w-full",attrs:{"src":_vm.photo_url,"alt":_vm.user.data.full_name}})]):_c('div',{staticClass:"w-full flex items-center justify-center border-2 border-dashed border-black border-opacity-20 rounded-md",staticStyle:{"height":"170px"}},[_c('span',{staticClass:"text-sm text-black"},[_vm._v("Click to upload")])]),_vm._v(" "),_c('input',{ref:"file",staticClass:"hidden",attrs:{"type":"file","id":"file","accept":"image/*"},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: 270, height: 270},"viewport":{ width: 250, height: 250}},on:{"result":_vm.result}})],1)]}}])})],1)]),_vm._v(" "),_c('div',{staticClass:"grid grid-cols-1 sm:grid-cols-4 bg-black mb-8"},[_c('div',{staticClass:"relative col-span-1"},[_c('div',{staticClass:"absolute top-0 left-0 w-full h-full border-10 border-opacity-75",class:'tas-border-'+_vm.selected_colour}),_vm._v(" "),_c('img',{staticClass:"w-full",attrs:{"src":_vm.photo_url,"alt":_vm.user.data.full_name}})]),_vm._v(" "),_c('div',{staticClass:"sm:col-span-3 py-6 sm:py-0 flex flex-col items-center justify-center"},[_c('span',{staticClass:"text-5xl text-white ",class:'tas-text-'+_vm.selected_colour},[_vm._v(_vm._s(_vm.user.data.first_name))]),_vm._v(" "),_c('span',{staticClass:"uppercase text-xl text-white"},[_vm._v(_vm._s(_vm.user.data.last_name))])])]),_vm._v(" "),_c('t-input-group',{attrs:{"label":"Colour Options"}},[_c('div',{staticClass:"grid grid-cols-4 sm:grid-cols-5 gap-5 sm:gap-10 mb-10 pt-3"},_vm._l((_vm.colours),function(colour,key){return _c('div',{key:key,staticClass:"flex items-center justify-center"},[_c('label',{staticClass:"flex items-center justify-center relative w-10 h-10 rounded cursor-pointer",class:'tas-bg-'+colour.name},[(colour.name == _vm.selected_colour)?_c('svg',{staticClass:"text-white w-8 h-8",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":"M5 13l4 4L19 7"}})]):_vm._e(),_vm._v(" "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.selected_colour),expression:"selected_colour"}],staticClass:"absolute top-0 left-0 w-full h-full hidden",attrs:{"name":"colours","type":"radio"},domProps:{"value":colour.name,"checked":_vm._q(_vm.selected_colour,colour.name)},on:{"change":[function($event){_vm.selected_colour=colour.name},_vm.saveTheme]}})])])}),0)])],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/blocks/Account/profile/Personalisation.vue?vue&type=template&id=51eeda71&

// EXTERNAL 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/profile/Personalisation.vue?vue&type=script&lang=js&
var Personalisationvue_type_script_lang_js_ = __webpack_require__(153);

// CONCATENATED MODULE: ./components/blocks/Account/profile/Personalisation.vue?vue&type=script&lang=js&
 /* harmony default export */ var profile_Personalisationvue_type_script_lang_js_ = (Personalisationvue_type_script_lang_js_["a" /* default */]); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./components/blocks/Account/profile/Personalisation.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  profile_Personalisationvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "2766d782"
  
)

/* harmony default export */ var Personalisation = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {Block: __webpack_require__(131).default})


/***/ }),

/***/ 199:
/***/ (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/profile/QuestionSectionOne.vue?vue&type=template&id=6320d6da&
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){
var validate = ref.validate;
var errors = ref.errors;
return [_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){
var errors = ref.errors;
return [_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){
var errors = ref.errors;
return [_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){
var errors = ref.errors;
return [_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)}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/blocks/Account/profile/QuestionSectionOne.vue?vue&type=template&id=6320d6da&

// EXTERNAL 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/profile/QuestionSectionOne.vue?vue&type=script&lang=js&
var QuestionSectionOnevue_type_script_lang_js_ = __webpack_require__(154);

// CONCATENATED MODULE: ./components/blocks/Account/profile/QuestionSectionOne.vue?vue&type=script&lang=js&
 /* harmony default export */ var profile_QuestionSectionOnevue_type_script_lang_js_ = (QuestionSectionOnevue_type_script_lang_js_["a" /* default */]); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./components/blocks/Account/profile/QuestionSectionOne.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  profile_QuestionSectionOnevue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "711ee7e0"
  
)

/* harmony default export */ var QuestionSectionOne = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {Block: __webpack_require__(131).default})


/***/ }),

/***/ 227:
/***/ (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!./pages/account/index.vue?vue&type=template&id=a3b52cea&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"page-wrapper"},[_c('PageHeader',{attrs:{"classObject":"bg-pink"}},[_c('img',{staticClass:"relative z-20 mb-8",attrs:{"src":__webpack_require__(20),"alt":"Takeaseat"}}),_vm._v(" "),_c('span',{staticClass:"font-bold uppercase text-xl"},[_vm._v("Account")]),_vm._v(" "),_c('h1',{staticClass:"relative z-20 text-5xl lg:text-7xl font-bold m-0"},[_vm._v("Profile")]),_vm._v(" "),_c('AccountProgressBar',{attrs:{"slug":"profile"}}),_vm._v(" "),_c('div',{staticClass:"page-header-bottom"},[_c('AccountNav')],1)],1),_vm._ssrNode(" "),_c('Personalisation'),_vm._ssrNode(" "),_c('Block',{attrs:{"title":"About","description":"This is the clients' first impression of you. Let them see you as a person and how therapy will improve their lives. Use emotive words to express your passion for your work and ask open questions about what they want to achieve.","width":"max-w-3xl"}},[_c('ValidationObserver',{ref:"bioForm"},[_c('form',{attrs:{"role":"form","method":"POST"},on:{"submit":function($event){$event.preventDefault();return _vm.saveBio($event)}}},[_c('t-input-group',{attrs:{"label":"About"}},[_c('div',{staticClass:"absolute top-0 -mt-5 px-3 right-0 text-xs text-pink"},[_vm._v(_vm._s((_vm.max_chars - _vm.form.description.length)+' / '+_vm.max_chars))]),_vm._v(" "),_c('ValidationProvider',{attrs:{"rules":"required|max:750","name":"About"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('vue-editor',{attrs:{"editor-toolbar":_vm.customToolbar},model:{value:(_vm.form.description),callback:function ($$v) {_vm.$set(_vm.form, "description", $$v)},expression:"form.description"}}),_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 Bio")]):_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),_vm._ssrNode(" "),_c('ProfileRates'),_vm._ssrNode(" "),_c('ProfileSessionTypes'),_vm._ssrNode(" "),_c('Block',{attrs:{"title":"Specialisms","description":"Let potential clients know what issues you excel at helping with. This will help with client matching when filtering."}},[_c('ValidationObserver',{ref:"specialismsForm"},[_c('form',{attrs:{"role":"form","method":"POST"},on:{"submit":function($event){$event.preventDefault();return _vm.saveSpecialisms($event)}}},[_c('t-input-group',{attrs:{"label":"Primary Specialism"}},[_c('ValidationProvider',{attrs:{"rules":"required"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-rich-select',{attrs:{"options":_vm.specialisms,"placeholder":"Select One...","value-attribute":"id","text-attribute":"name"},model:{value:(_vm.form.primary_specialism),callback:function ($$v) {_vm.$set(_vm.form, "primary_specialism", $$v)},expression:"form.primary_specialism"}}),_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":"Other Specialisms"}},[_c('ValidationProvider',{attrs:{"rules":"required"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-rich-select',{attrs:{"multiple":"","options":_vm.specialisms,"close-on-select":false,"placeholder":"Select Multiple...","value-attribute":"id","text-attribute":"name"},model:{value:(_vm.form.specialisms),callback:function ($$v) {_vm.$set(_vm.form, "specialisms", $$v)},expression:"form.specialisms"}}),_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 Specialisms")]):_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),_vm._ssrNode(" "),_c('QuestionSectionOne')],2)}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/account/index.vue?vue&type=template&id=a3b52cea&

// 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!./pages/account/index.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var accountvue_type_script_lang_js_ = ({
  middleware: ['auth', 'therapist'],

  head() {
    return {
      titleTemplate: 'Profile | %s'
    };
  },

  computed: {
    user() {
      return this.$auth.user;
    },

    session_types() {
      return this.$store.state.session_types.list;
    },

    specialisms() {
      return this.$store.state.specialisms.list;
    },

    tags() {
      return this.$store.state.tags.list;
    }

  },

  data() {
    return {
      working: false,
      customToolbar: [["bold", "italic", "underline"]],
      max_chars: 750,
      form: {
        session_types: [],
        description: '',
        primary_specialism: null,
        specialisms: []
      }
    };
  },

  async asyncData({
    store
  }) {
    await store.dispatch('session_types/get');
    await store.dispatch('specialisms/list');
    await store.dispatch('tags/list');
  },

  async mounted() {
    await this.$axios.$get('/profile').then(response => {
      for (const [key, value] of Object.entries(response.data)) {
        if (value !== null) {
          let formattedValue = value;

          if (key === 'description') {
            // Vue2Editor currently has a bug that doesn't like divs, so strip them
            formattedValue = value.replace(/<div/g, "<p").replace(/<\/div>/g, "</p>");
          }

          this.form[key] = formattedValue;
        } else if (Array.isArray(value) && value !== null) {
          this.form[key].push(value);
        }
      }
    });
    await this.$axios.$get('/profile/specialisms').then(response => {
      this.form.primary_specialism = response.primary_specialism;
      this.form.specialisms = response.specialisms;
    });
  },

  methods: {
    async saveSpecialisms() {
      this.$refs.specialismsForm.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.$post('/profile/specialisms/update', {
          primary_specialism: this.form.primary_specialism,
          specialisms: this.form.specialisms
        }).then(response => {
          this.working = false;
          this.$toast.success(response).goAway(1500);
        });
      });
    },

    async saveBio() {
      this.$refs.bioForm.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.$post('/profile/update', {
          description: this.form.description
        }).then(response => {
          this.working = false;
          this.$toast.success('Succesfully updated your bio').goAway(1500);
        });
      });
    }

  }
});
// CONCATENATED MODULE: ./pages/account/index.vue?vue&type=script&lang=js&
 /* harmony default export */ var pages_accountvue_type_script_lang_js_ = (accountvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./pages/account/index.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  pages_accountvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "2f4e3f58"
  
)

/* harmony default export */ var account = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {AccountProgressBar: __webpack_require__(145).default,AccountNav: __webpack_require__(146).default,PageHeader: __webpack_require__(36).default,Personalisation: __webpack_require__(198).default,Block: __webpack_require__(131).default,ProfileRates: __webpack_require__(183).default,ProfileSessionTypes: __webpack_require__(184).default,QuestionSectionOne: __webpack_require__(199).default})


/***/ })

};;
//# sourceMappingURL=index.js.map

Zerion Mini Shell 1.0