(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{"0c81":function(s,t,e){"use strict";e.r(t);var r=function(){var s=this,t=s._self._c;return t("q-page",{staticClass:"q-px-md flex items-center"},[t("div",{staticClass:"row justify-center full-width"},[t("div",{staticClass:"col-12 col-sm-12 col-md-5 col-lg-5 desktop-only flex flex-center"},[t("img",{staticStyle:{width:"75%"},attrs:{src:e("cf05"),alt:""}})]),t("div",{staticClass:"col-12 col-sm-12 col-md-5 col-lg-5"},[t("q-form",{ref:"submitForm",on:{submit:function(t){return t.preventDefault(),s.submitForm.apply(null,arguments)}}},[t("q-card",{staticClass:"shadow-0 q-pa-md"},[t("q-card-section",{staticClass:"q-pa-sm"},[t("LanguageSelect"),t("div",{staticClass:"text-subtitle1 text-weight-bold text-grey-7"},[s._v(s._s(s.$t("pages.rest_password.title")))])],1),t("q-card-section",{staticClass:"column q-col-gutter-md q-pa-sm"},[t("q-input",{ref:"password",attrs:{outlined:"",dense:"",label:s.$t("pages.rest_password.new_password"),type:"password",hint:"","lazy-rules":"",rules:[t=>t&&!s.validationErrors.password>0||s.validationErrors.password?s.validationErrors.password:s.$t("pages.reset_password.error.passowrd")]},scopedSlots:s._u([{key:"prepend",fn:function(){return[t("q-icon",{attrs:{name:"vpn_key"}})]},proxy:!0}]),model:{value:s.password,callback:function(t){s.password=t},expression:"password"}}),t("q-input",{ref:"confirmed_password",staticClass:"col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12",attrs:{outlined:"",dense:"",label:s.$t("pages.rest_password.confirm_password"),type:"password",hint:"","lazy-rules":"",rules:[t=>t&&!s.validationErrors.confirmed_password>0||s.validationErrors.confirmed_password?s.validationErrors.confirmed_password:s.$t("pages.reset_password.error.confirm_passowrd")]},scopedSlots:s._u([{key:"prepend",fn:function(){return[t("q-icon",{attrs:{name:"vpn_key"}})]},proxy:!0}]),model:{value:s.confirmed_password,callback:function(t){s.confirmed_password=t},expression:"confirmed_password"}})],1),t("q-card-section",{staticClass:"q-pa-sm"},[t("q-btn",{staticClass:"full-width",attrs:{color:"primary","text-color":"white",label:s.$t("pages.rest_password.reset_button"),unelevated:"",size:"16px",loading:s.submitting,type:"submit","no-caps":""}})],1)],1)],1)],1)])])},a=[],o=(e("14d9"),e("8fb3")),i=(e("18d6"),e("cf57")),n={data(){return{password:null,confirmed_password:null,saveAction:"Auth/resetPassword",submitting:!1,validationErrors:{password:null,confirmed_password:null}}},created(){this.verifyLink()},methods:{verifyLink(){this.$q.loading.show({spinner:i["a"],message:this.$t("pages.rest_password.verify_link_text")}),this.$store.dispatch("Auth/verifyLink",{token:this.$route.query.token,email:this.$route.query.email}).then((s=>{this.$q.loading.hide()})).catch((s=>{this.$q.loading.hide(),Object(o["a"])({message:s.response.data.message,type:"negative"},this),this.$router.push("/")}))},submitForm(){this.submitting=!0,this.$store.dispatch(this.saveAction,{password:this.password,confirmed_password:this.confirmed_password,email:this.$route.query.email}).then((s=>{this.submitting=!1,this.$refs.submitForm.resetValidation(),this.$router.push("/login"),Object(o["a"])({message:this.$t("pages.rest_password.password_reset_notify"),type:"positive"},this)})).catch((s=>{this.submitting=!1;const t=s.response.data.message;var e=s.response.data.errors;this.validationErrors=e;var r=s.response.data.errors,a=this.$refs;for(var i in a){var n=a[i];r[i]?(n.innerError=!0,n.innerErrorMessage=r[i][0]):(n.innerError=!1,n.innerErrorMessage="")}Object(o["a"])({message:t,type:"negative"},this)}))},isValidPassword(s){return new Promise(((s,t)=>{s(!0)}))},isValidConfirmPassword(s){return new Promise(((t,e)=>{s||t("Please enter a valid password"),s!=this.password&&t("Password should match new password"),t(!0)}))}}},d=n,l=(e("92b4"),e("2877")),c=e("9989"),p=e("0378"),u=e("f09f"),m=e("a370"),w=e("27f9"),f=e("0016"),h=e("05c0"),g=e("9c40"),v=e("eebe"),_=e.n(v),b=Object(l["a"])(d,r,a,!1,null,"01507bb8",null);t["default"]=b.exports;_()(b,"components",{QPage:c["a"],QForm:p["a"],QCard:u["a"],QCardSection:m["a"],QInput:w["a"],QIcon:f["a"],QTooltip:h["a"],QBtn:g["a"]})},"92b4":function(s,t,e){"use strict";e("c1bc")},c1bc:function(s,t,e){}}]);