%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/794de64.js |
(window.webpackJsonp=window.webpackJsonp||[]).push([[30,11],{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})},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})}}]);