%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/90dea74.js |
(window.webpackJsonp=window.webpackJsonp||[]).push([[44,5,8,11,25,27,28,30],{377:function(t,e,r){"use strict";r.r(e);var n={props:{title:{type:String,required:!0},description:{type:String,required:!1},width:{type:String,required:!1}}},o=r(10),component=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("section",{staticClass:"bg-gray py-8 md:py-20 px-4 md:px-8 mb-8"},[r("div",{staticClass:"max-w-xl mx-auto w-full"},[r("header",{staticClass:"text-center mb-10"},[r("h2",{staticClass:"text-2xl sm:text-3xl font-bold",class:t.description?"mb-8":""},[t._v(t._s(t.title))]),t._v(" "),t.description?r("p",{staticClass:"text-sm sm:text-base"},[t._v(t._s(t.description))]):t._e()])]),t._v(" "),r("div",{staticClass:"mx-auto w-full",class:t.width?t.width:"max-w-xl"},[t._t("default")],2)])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Header:r(101).default})},391:function(t,e,r){"use strict";r.r(e);var n=r(0),o=(r(3),{props:{slug:{type:String,required:!1,default:null}},computed:{progress:function(){return this.$store.state.account.progress.total}},mounted:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("account/progress/get",{slug:t.slug});case 2:case"end":return e.stop()}}),e)})))()}}),l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"relative z-20 max-w-md w-full mt-8 text-center"},[r("div",{staticClass:"w-full bg-black bg-opacity-25 h-1 rounded-lg overflow-hidden mb-6"},[r("div",{staticClass:"bg-white h-1 transition-width duration-500",style:"width:"+t.progress+"%"})]),t._v(" "),r("span",{staticClass:"uppercase text-lg"},[t._v(t._s(t.progress)+"% Complete")])])}),[],!1,null,null,null);e.default=component.exports},392:function(t,e,r){"use strict";r.r(e);var n=r(0),o=(r(3),r(14),{data:function(){return{menuOpen:!1,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:function(){return 1==this.$auth.loggedIn?this.$auth.user.data.role.name:"all"}},methods:{logout:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$auth.logout();case 2:case"end":return e.stop()}}),e)})))()}}}),l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("nav",{staticClass:"relative"},[r("button",{staticClass:"flex md:hidden items-center justify-center w-full focus:outline-none",on:{click:function(e){t.menuOpen=!t.menuOpen}}},[r("div",{staticClass:"relative w-8"},[r("span",{staticClass:"block mb-1.5 h-1 w-full bg-black rounded transform transition duration-100",class:t.menuOpen?"rotate-45 translate-y-2":""}),t._v(" "),r("span",{staticClass:"block my-1.5 h-1 w-full bg-black rounded transform transition duration-100",class:t.menuOpen?"opacity-0":""}),t._v(" "),r("span",{staticClass:"block mt-1.5 h-1 w-full bg-black rounded transform transition duration-100",class:t.menuOpen?"-rotate-45 -translate-y-3":""})]),t._v(" "),r("span",{staticClass:"block ml-3 font-bold"},[t._v("Menu")])]),t._v(" "),r("div",{staticClass:"hidden md:flex flex-wrap items-center justify-center"},[t._l(t.links,(function(link,e){return r("div",{key:e},["all"==link.role||t.role==link.role?r("NuxtLink",{staticClass:"account-nav-link",attrs:{to:link.url}},[t._v(t._s(link.name))]):t._e()],1)})),t._v(" "),r("button",{staticClass:"account-nav-link",attrs:{type:"button"},on:{click:t.logout}},[t._v("Log Out")])],2),t._v(" "),1==t.menuOpen?r("div",{staticClass:"fixed z-40 top-0 left-0 w-full h-full",on:{click:function(e){t.menuOpen=!1}}}):t._e(),t._v(" "),1==t.menuOpen?r("div",{staticClass:"fixed z-50 bottom-0 left-0 w-full p-3 rounded-t-xl bg-white block overflow-hidden md:hidden"},[t._l(t.links,(function(link,e){return r("div",{key:e},["all"==link.role||t.role==link.role?r("NuxtLink",{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{to:link.url}},[t._v(t._s(link.name))]):t._e()],1)})),t._v(" "),r("button",{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{type:"button"},on:{click:t.logout}},[t._v("Log Out")])],2):t._e()])}),[],!1,null,null,null);e.default=component.exports},423:function(t,e,r){"use strict";r.r(e);var n=r(0),o=(r(60),r(136),r(11),r(22),r(26),r(3),{data:function(){return{working:!1,showModal:!1,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:function(){return this.$auth.user}},mounted:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.$get("/profile").then((function(e){t.selected_colour=e.data.colour,t.photo_url=e.data.user.photo_url}));case 2:case"end":return e.stop()}}),e)})))()},methods:{handleFileChange:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,o,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$refs.provider.validate(t);case 2:n=r.sent,o=n.valid,l=e.$refs.file.files[0],1==o&&(e.$refs.cropModal.show(),l&&setTimeout((function(){e.$refs.croppieRef.bind({url:URL.createObjectURL(l)})}),250));case 6:case"end":return r.stop()}}),r)})))()},crop:function(){var t=this;this.$refs.croppieRef.result({format:"jpeg"},(function(output){t.file=output,t.uploadPhoto()}))},result:function(output){this.file=output},uploadPhoto:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.form.validate().then((function(e){e&&(t.working=!0,t.$axios.$post("/account/profile/photo",{file:t.file}).then((function(e){t.working=!1,t.photo_url=e,t.$refs.cropModal.hide(),t.$store.dispatch("account/progress/get",{slug:"profile"}),t.$toast.success("Successfully updated your photo").goAway(1500)})).catch((function(e){t.working=!1,t.$refs.cropModal.hide(),t.$refs.form.setErrors(e.response.data.errors)})))}));case 1:case"end":return e.stop()}}),e)})))()},saveTheme:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.working=!0,t.$axios.$post("/profile/update",{colour:t.selected_colour}).then((function(e){t.working=!1,t.$toast.success("Successfully updated your colour").goAway(1500)}));case 2:case"end":return e.stop()}}),e)})))()}}}),l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Block",{attrs:{title:"Personalisation",description:"Upload a photo & choose a colour that makes you stand out"}},[r("ValidationObserver",{ref:"form"},[r("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.uploadPhoto(e)}}},[r("ValidationProvider",{ref:"provider",attrs:{rules:"image|size:10000"},scopedSlots:t._u([{key:"default",fn:function(e){e.validate;var n=e.errors;return[r("div",{staticClass:"w-full mx-auto mb-8 text-center",staticStyle:{"max-width":"170px"}},[r("label",{staticClass:"block cursor-pointer",attrs:{for:"file"}},[t.photo_url?r("div",{staticClass:"relative"},[r("div",{staticClass:"absolute top-0 left-0 w-full h-full border-15 border-opacity-50",class:"tas-border-"+t.selected_colour}),t._v(" "),r("img",{staticClass:"w-full",attrs:{src:t.photo_url,alt:t.user.data.full_name}})]):r("div",{staticClass:"w-full flex items-center justify-center border-2 border-dashed border-black border-opacity-20 rounded-md",staticStyle:{height:"170px"}},[r("span",{staticClass:"text-sm text-black"},[t._v("Click to upload")])]),t._v(" "),r("input",{ref:"file",staticClass:"hidden",attrs:{type:"file",id:"file",accept:"image/*"},on:{change:function(e){return t.handleFileChange()}}}),t._v(" "),r("span",{staticClass:"mt-4 block uppercase text-blue-light"},[t._v("Upload Photo")])]),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()]),t._v(" "),r("t-modal",{ref:"cropModal",attrs:{header:"Crop & Upload"},scopedSlots:t._u([{key:"footer",fn:function(){return[r("div",{staticClass:"flex flex-wrap justify-between"},[r("button",{staticClass:"btn btn-small btn-primary",attrs:{type:"button"},on:{click:function(e){return t.$refs.cropModal.hide()}}},[t._v("\n Cancel\n ")]),t._v(" "),r("button",{staticClass:"btn btn-small btn-primary",attrs:{type:"button"},on:{click:function(e){return t.crop()}}},[0==t.working?r("span",[t._v("Crop & Upload")]):r("span",{staticClass:"flex items-center justify-center"},[r("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"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("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"}})]),t._v(" "),r("span",[t._v("Processing")])])])])]},proxy:!0}],null,!0)},[r("vue-croppie",{ref:"croppieRef",attrs:{enableOrientation:!0,enableResize:!1,boundary:{width:270,height:270},viewport:{width:250,height:250}},on:{result:t.result}})],1)]}}])})],1)]),t._v(" "),r("div",{staticClass:"grid grid-cols-1 sm:grid-cols-4 bg-black mb-8"},[r("div",{staticClass:"relative col-span-1"},[r("div",{staticClass:"absolute top-0 left-0 w-full h-full border-10 border-opacity-75",class:"tas-border-"+t.selected_colour}),t._v(" "),r("img",{staticClass:"w-full",attrs:{src:t.photo_url,alt:t.user.data.full_name}})]),t._v(" "),r("div",{staticClass:"sm:col-span-3 py-6 sm:py-0 flex flex-col items-center justify-center"},[r("span",{staticClass:"text-5xl text-white ",class:"tas-text-"+t.selected_colour},[t._v(t._s(t.user.data.first_name))]),t._v(" "),r("span",{staticClass:"uppercase text-xl text-white"},[t._v(t._s(t.user.data.last_name))])])]),t._v(" "),r("t-input-group",{attrs:{label:"Colour Options"}},[r("div",{staticClass:"grid grid-cols-4 sm:grid-cols-5 gap-5 sm:gap-10 mb-10 pt-3"},t._l(t.colours,(function(e,n){return r("div",{key:n,staticClass:"flex items-center justify-center"},[r("label",{staticClass:"flex items-center justify-center relative w-10 h-10 rounded cursor-pointer",class:"tas-bg-"+e.name},[e.name==t.selected_colour?r("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"}},[r("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"}})]):t._e(),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.selected_colour,expression:"selected_colour"}],staticClass:"absolute top-0 left-0 w-full h-full hidden",attrs:{name:"colours",type:"radio"},domProps:{value:e.name,checked:t._q(t.selected_colour,e.name)},on:{change:[function(r){t.selected_colour=e.name},t.saveTheme]}})])])})),0)])],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Block:r(377).default})},424:function(t,e,r){"use strict";r.r(e);var n=r(0),o=(r(3),{name:"ProfileRates",data:function(){return{working:!1,products:{individuals_price:0,couples_price:0},money:{decimal:",",thousands:",",prefix:"£ ",suffix:"",precision:0,masked:!1}}},computed:{session_types:function(){return this.$store.state.session_types.list}},mounted:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.get("/account/profile/products").then((function(e){e.data.data.length&&(t.products.individuals_price=e.data.data[0].price,t.products.couples_price=e.data.data[1].price)})).catch((function(e){t.$toast.error(e).goAway(1e3)}));case 2:case"end":return e.stop()}}),e)})))()},methods:{submit:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.form.validate().then((function(e){e&&(t.working=!0,t.$axios.post("/account/profile/products/create",{individuals_price:t.products.individuals_price,couples_price:t.products.couples_price}).then((function(e){t.working=!1,t.$store.dispatch("account/progress/get",{slug:"profile"}),t.$toast.success("Successfully updated your rates!").goAway(3e3)})).catch((function(e){t.working=!1,t.$toast.error(e).goAway(3e3)})))}));case 1:case"end":return e.stop()}}),e)})))()}}}),l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("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"}},[r("ValidationObserver",{ref:"form"},[r("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[r("div",{staticClass:"grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-0"},[r("ValidationProvider",{attrs:{rules:"required|integer"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("t-input-group",{attrs:{label:"Individual Price"}},[r("money",t._b({model:{value:t.products.individuals_price,callback:function(e){t.$set(t.products,"individuals_price",e)},expression:"products.individuals_price"}},"money",t.money,!1)),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()],1)]}}])}),t._v(" "),r("ValidationProvider",{attrs:{rules:"required|integer"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("t-input-group",{attrs:{label:"Couples Price"}},[r("money",t._b({model:{value:t.products.couples_price,callback:function(e){t.$set(t.products,"couples_price",e)},expression:"products.couples_price"}},"money",t.money,!1)),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()],1)]}}])})],1),t._v(" "),r("div",{staticClass:"mt-6 flex items-center justify-center"},[r("button",{staticClass:"btn btn-primary btn-small",attrs:{type:"submit"}},[0==t.working?r("span",[t._v("Save Changes")]):r("span",{staticClass:"flex items-center justify-center"},[r("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"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("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"}})]),t._v(" "),r("span",[t._v("Saving")])])])])])])],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Block:r(377).default})},425:function(t,e,r){"use strict";r.r(e);var n=r(0),o=(r(3),{name:"ProfileSessionTypes",data:function(){return{working:!1,form:{session_types:[]}}},computed:{session_types:function(){return this.$store.state.session_types.list}},mounted:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.$get("/profile/session-types").then((function(e){t.form.session_types=e}));case 2:case"end":return e.stop()}}),e)})))()},methods:{submit:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.form.validate().then((function(e){e&&(t.working=!0,t.$axios.$post("/profile/session-types/update",{session_types:t.form.session_types}).then((function(e){t.working=!1,t.$store.dispatch("account/progress/get",{slug:"profile"}),t.$toast.success(e).goAway(1500)})))}));case 1:case"end":return e.stop()}}),e)})))()}}}),l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Block",{attrs:{title:"Session Types",description:"Please select all of the therapy session types you currently provide.."}},[r("ValidationObserver",{ref:"form"},[r("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[r("t-input-group",{attrs:{label:"Sessions Available Via:"}},[r("ValidationProvider",{attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("t-checkbox-group",{attrs:{name:"session_types",textAttribute:"name",valueAttribute:"id",options:t.session_types},model:{value:t.form.session_types,callback:function(e){t.$set(t.form,"session_types",e)},expression:"form.session_types"}}),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()]}}])})],1),t._v(" "),r("div",{staticClass:"flex items-center justify-center"},[r("button",{staticClass:"btn btn-small btn-primary rounded-full",attrs:{type:"submit"}},[0==t.working?r("span",[t._v("Save Sessions")]):r("span",{staticClass:"flex items-center justify-center"},[r("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"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("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"}})]),t._v(" "),r("span",[t._v("Saving")])])])])],1)])],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Block:r(377).default})},426:function(t,e,r){"use strict";r.r(e);var n=r(0),o=(r(60),r(136),r(11),r(22),r(26),r(3),{data:function(){return{working:!1,photo_url:"",file:"",form:{gender:"",languages:[],tags:[]},questions:[]}},computed:{languages:function(){return this.$store.state.languages.list},tags:function(){return this.$store.state.tags.list}},mounted:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("languages/get");case 2:return e.next=4,t.$store.dispatch("tags/list");case 4:return e.next=6,t.$axios.$post("/account/profile/questions",{section_id:1}).then((function(e){t.photo_url=e.image_one_url,t.form.gender=e.gender,t.form.languages=e.languages,t.form.tags=e.tags,t.questions=e.questions})).catch((function(e){t.$toast.error(e).goAway(3e3)}));case 6:case"end":return e.stop()}}),e)})))()},methods:{handleFileChange:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n,o,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$refs.provider.validate(t);case 2:n=r.sent,o=n.valid,l=e.$refs.file.files[0],1==o&&(e.$refs.cropModal.show(),l&&setTimeout((function(){e.$refs.croppieRef.bind({url:URL.createObjectURL(l)})}),250));case 6:case"end":return r.stop()}}),r)})))()},crop:function(){var t=this;this.$refs.croppieRef.result({format:"jpeg",size:{width:1500}},(function(output){t.file=output,t.uploadImage()}))},result:function(output){this.file=output},save:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.form.validate().then((function(e){e&&(t.working=!0,t.$axios.$post("/account/profile/questions/create",{gender:t.form.gender,languages:t.form.languages,questions:t.questions,tags:t.form.tags}).then((function(e){t.working=!1,t.$store.dispatch("account/progress/get",{slug:"profile"}),t.$toast.success(e).goAway(1500)})).catch((function(e){t.working=!1,t.$refs.form.setErrors(e.response.data.errors)})))}));case 1:case"end":return e.stop()}}),e)})))()},uploadImage:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).append("file",t.file),r.append("prefix","image_one_"),t.working=!0,e.next=6,t.$axios.$post("/account/profile/images/upload",r).then((function(e){t.working=!1,t.photo_url=e,t.$refs.cropModal.hide(),t.$store.dispatch("account/progress/get",{slug:"profile"}),t.$toast.success("Successfully updated your photo").goAway(1500)})).catch((function(e){t.working=!1,t.$refs.cropModal.hide(),t.$refs.form.setErrors(e.response.data.errors)}));case 6:case"end":return e.stop()}}),e)})))()},limiter:function(t){t.length>5&&(this.$toast.info("You can only select a max of five").goAway(1e3),t.pop())}}}),l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("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"}},[r("ValidationObserver",{ref:"form"},[r("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.save(e)}}},[r("ValidationProvider",{ref:"provider",attrs:{rules:"image|size:10000"},scopedSlots:t._u([{key:"default",fn:function(e){e.validate;var n=e.errors;return[r("div",{staticClass:"mb-8 text-center"},[r("label",{staticClass:"w-full cursor-pointer",attrs:{for:"photo-one"}},[t.photo_url?r("div",{staticClass:"rounded-lg overflow-hidden shadow"},[r("img",{staticClass:"w-full",attrs:{src:t.photo_url}})]):r("div",{staticClass:"border border-dashed border-1 border-black border-opacity-20 bg-white p-10 rounded-lg"},[r("span",{staticClass:"text-sm text-black text-opacity-50"},[t._v("Click to add a photo")])]),t._v(" "),r("input",{ref:"file",staticClass:"hidden",attrs:{type:"file",id:"photo-one"},on:{change:function(e){return t.handleFileChange()}}}),t._v(" "),r("span",{staticClass:"mt-4 block uppercase text-blue-light"},[t._v("Upload Photo")])]),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()]),t._v(" "),r("t-modal",{ref:"cropModal",attrs:{header:"Crop & Upload"},scopedSlots:t._u([{key:"footer",fn:function(){return[r("div",{staticClass:"flex flex-wrap justify-between"},[r("button",{staticClass:"btn btn-small btn-primary",attrs:{type:"button"},on:{click:function(e){return t.$refs.cropModal.hide()}}},[t._v("\n Cancel\n ")]),t._v(" "),r("button",{staticClass:"btn btn-small btn-primary",attrs:{type:"button"},on:{click:function(e){return t.crop()}}},[0==t.working?r("span",[t._v("Crop & Upload")]):r("span",{staticClass:"flex items-center justify-center"},[r("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"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("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"}})]),t._v(" "),r("span",[t._v("Processing")])])])])]},proxy:!0}],null,!0)},[r("vue-croppie",{ref:"croppieRef",attrs:{enableOrientation:!0,enableResize:!1,boundary:{width:500,height:250},viewport:{width:400,height:200}},on:{result:t.result}})],1)]}}])}),t._v(" "),r("div",{staticClass:"max-w-lg w-full mx-auto"},[r("t-input-group",{attrs:{label:"Gender"}},[r("ValidationProvider",{attrs:{rules:"required",name:"enthicity"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("t-select",{attrs:{placeholder:"Select...",options:["Female","Male","Prefer not to say"]},model:{value:t.form.gender,callback:function(e){t.$set(t.form,"gender",e)},expression:"form.gender"}}),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()]}}])})],1),t._v(" "),r("t-input-group",{attrs:{label:"Languages Spoken"}},[r("ValidationProvider",{attrs:{rules:"required",name:"enthicity"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("t-rich-select",{attrs:{multiple:"",options:t.languages,"close-on-select":!1,placeholder:"Select...","value-attribute":"id","text-attribute":"name"},model:{value:t.form.languages,callback:function(e){t.$set(t.form,"languages",e)},expression:"form.languages"}}),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()]}}])})],1),t._v(" "),r("t-input-group",{attrs:{label:"Describe yourself",feedback:"Please select five options that describe you or your approach"}},[r("ValidationProvider",{attrs:{rules:"required",name:"tags"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("t-rich-select",{attrs:{multiple:"",options:t.tags,"close-on-select":!1,placeholder:"Select...","value-attribute":"id","text-attribute":"name"},on:{change:t.limiter},model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}}),t._v(" "),n[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(n[0]))]):t._e()]}}])})],1),t._v(" "),t._l(t.questions,(function(e,n){return r("div",{key:n},[r("t-input-group",{attrs:{label:e.question}},[1==e.question_type?r("t-input",{model:{value:e.answer,callback:function(r){t.$set(e,"answer",r)},expression:"item.answer"}}):r("t-textarea",{model:{value:e.answer,callback:function(r){t.$set(e,"answer",r)},expression:"item.answer"}})],1)],1)})),t._v(" "),r("div",{staticClass:"flex items-center justify-center"},[r("button",{staticClass:"btn btn-primary rounded-full",attrs:{type:"submit"}},[0==t.working?r("span",[t._v("Save Changes")]):r("span",{staticClass:"flex items-center justify-center"},[r("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"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("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"}})]),t._v(" "),r("span",[t._v("Saving")])])])])],2)],1)])],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Block:r(377).default})},469:function(t,e,r){"use strict";r.r(e);var n=r(25),o=r(0),l=(r(214),r(62),r(46),r(28),r(50),r(3),{middleware:["auth","therapist"],head:function(){return{titleTemplate:"Profile | %s"}},computed:{user:function(){return this.$auth.user},session_types:function(){return this.$store.state.session_types.list},specialisms:function(){return this.$store.state.specialisms.list},tags:function(){return this.$store.state.tags.list}},data:function(){return{working:!1,customToolbar:[["bold","italic","underline"]],max_chars:750,form:{session_types:[],description:"",primary_specialism:null,specialisms:[]}}},asyncData:function(t){return Object(o.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.store,e.next=3,r.dispatch("session_types/get");case 3:return e.next=5,r.dispatch("specialisms/list");case 5:return e.next=7,r.dispatch("tags/list");case 7:case"end":return e.stop()}}),e)})))()},mounted:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.$get("/profile").then((function(e){for(var r=0,o=Object.entries(e.data);r<o.length;r++){var l=Object(n.a)(o[r],2),c=l[0],d=l[1];if(null!==d){var f=d;"description"===c&&(f=d.replace(/<div/g,"<p").replace(/<\/div>/g,"</p>")),t.form[c]=f}else Array.isArray(d)&&null!==d&&t.form[c].push(d)}}));case 2:return e.next=4,t.$axios.$get("/profile/specialisms").then((function(e){t.form.primary_specialism=e.primary_specialism,t.form.specialisms=e.specialisms}));case 4:case"end":return e.stop()}}),e)})))()},methods:{saveSpecialisms:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.specialismsForm.validate().then((function(e){e&&(t.working=!0,t.$axios.$post("/profile/specialisms/update",{primary_specialism:t.form.primary_specialism,specialisms:t.form.specialisms}).then((function(e){t.working=!1,t.$toast.success(e).goAway(1500)})))}));case 1:case"end":return e.stop()}}),e)})))()},saveBio:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.bioForm.validate().then((function(e){e&&(t.working=!0,t.$axios.$post("/profile/update",{description:t.form.description}).then((function(e){t.working=!1,t.$toast.success("Succesfully updated your bio").goAway(1500)})))}));case 1:case"end":return e.stop()}}),e)})))()}}}),c=r(10),component=Object(c.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-wrapper"},[n("PageHeader",{attrs:{classObject:"bg-pink"}},[n("img",{staticClass:"relative z-20 mb-8",attrs:{src:r(135),alt:"Takeaseat"}}),t._v(" "),n("span",{staticClass:"font-bold uppercase text-xl"},[t._v("Account")]),t._v(" "),n("h1",{staticClass:"relative z-20 text-5xl lg:text-7xl font-bold m-0"},[t._v("Profile")]),t._v(" "),n("AccountProgressBar",{attrs:{slug:"profile"}}),t._v(" "),n("div",{staticClass:"page-header-bottom"},[n("AccountNav")],1)],1),t._v(" "),n("Personalisation"),t._v(" "),n("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"}},[n("ValidationObserver",{ref:"bioForm"},[n("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.saveBio(e)}}},[n("t-input-group",{attrs:{label:"About"}},[n("div",{staticClass:"absolute top-0 -mt-5 px-3 right-0 text-xs text-pink"},[t._v(t._s(t.max_chars-t.form.description.length+" / "+t.max_chars))]),t._v(" "),n("ValidationProvider",{attrs:{rules:"required|max:750",name:"About"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.errors;return[n("vue-editor",{attrs:{"editor-toolbar":t.customToolbar},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}}),t._v(" "),r[0]?n("span",{staticClass:"field-invalid"},[t._v(t._s(r[0]))]):t._e()]}}])})],1),t._v(" "),n("div",{staticClass:"flex items-center justify-center"},[n("button",{staticClass:"btn btn-small btn-primary rounded-full",attrs:{type:"submit"}},[0==t.working?n("span",[t._v("Save Bio")]):n("span",{staticClass:"flex items-center justify-center"},[n("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"}},[n("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),n("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"}})]),t._v(" "),n("span",[t._v("Saving")])])])])],1)])],1),t._v(" "),n("ProfileRates"),t._v(" "),n("ProfileSessionTypes"),t._v(" "),n("Block",{attrs:{title:"Specialisms",description:"Let potential clients know what issues you excel at helping with. This will help with client matching when filtering."}},[n("ValidationObserver",{ref:"specialismsForm"},[n("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.saveSpecialisms(e)}}},[n("t-input-group",{attrs:{label:"Primary Specialism"}},[n("ValidationProvider",{attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.errors;return[n("t-rich-select",{attrs:{options:t.specialisms,placeholder:"Select One...","value-attribute":"id","text-attribute":"name"},model:{value:t.form.primary_specialism,callback:function(e){t.$set(t.form,"primary_specialism",e)},expression:"form.primary_specialism"}}),t._v(" "),r[0]?n("span",{staticClass:"field-invalid"},[t._v(t._s(r[0]))]):t._e()]}}])})],1),t._v(" "),n("t-input-group",{attrs:{label:"Other Specialisms"}},[n("ValidationProvider",{attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.errors;return[n("t-rich-select",{attrs:{multiple:"",options:t.specialisms,"close-on-select":!1,placeholder:"Select Multiple...","value-attribute":"id","text-attribute":"name"},model:{value:t.form.specialisms,callback:function(e){t.$set(t.form,"specialisms",e)},expression:"form.specialisms"}}),t._v(" "),r[0]?n("span",{staticClass:"field-invalid"},[t._v(t._s(r[0]))]):t._e()]}}])})],1),t._v(" "),n("div",{staticClass:"flex items-center justify-center"},[n("button",{staticClass:"btn btn-small btn-primary rounded-full",attrs:{type:"submit"}},[0==t.working?n("span",[t._v("Save Specialisms")]):n("span",{staticClass:"flex items-center justify-center"},[n("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"}},[n("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),n("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"}})]),t._v(" "),n("span",[t._v("Saving")])])])])],1)])],1),t._v(" "),n("QuestionSectionOne")],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{AccountProgressBar:r(391).default,AccountNav:r(392).default,PageHeader:r(212).default,Personalisation:r(423).default,Block:r(377).default,ProfileRates:r(424).default,ProfileSessionTypes:r(425).default,QuestionSectionOne:r(426).default})}}]);