%PDF- %PDF-
Mini Shell

Mini Shell

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

exports.ids = [64];
exports.modules = {

/***/ 237:
/***/ (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/reset-password.vue?vue&type=template&id=0b4ff43d&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"page-wrapper"},[_vm._ssrNode("<section class=\"bg-gray py-20 px-8\">","</section>",[_vm._ssrNode("<div class=\"max-w-xl mx-auto w-full\">","</div>",[_vm._ssrNode("<header class=\"text-center mb-10\"><h1 class=\"text-4xl font-bold\">Reset Password</h1></header> "),_c('ValidationObserver',{ref:"form"},[_c('form',{attrs:{"role":"form","method":"POST"},on:{"submit":function($event){$event.preventDefault();return _vm.resetPassword($event)}}},[_c('t-input-group',{attrs:{"label":"Email"}},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.form.email),expression:"form.email"}],staticClass:"form-control",attrs:{"type":"email","id":"email","disabled":"disabled","placeholder":"Enter your email address"},domProps:{"value":(_vm.form.email)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, "email", $event.target.value)}}})]),_vm._v(" "),_c('ValidationProvider',{attrs:{"rules":"required|password:@password_confirmation","name":"password"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-input-group',{attrs:{"label":"Password"}},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.form.password),expression:"form.password"}],staticClass:"form-control",attrs:{"type":"password","id":"password","placeholder":"Enter a strong password"},domProps:{"value":(_vm.form.password)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, "password", $event.target.value)}}}),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e(),_vm._v(" "),_c('password',{attrs:{"strength-meter-only":true},model:{value:(_vm.form.password),callback:function ($$v) {_vm.$set(_vm.form, "password", $$v)},expression:"form.password"}})],1)]}}])}),_vm._v(" "),_c('ValidationProvider',{attrs:{"name":"password_confirmation","rules":"required"},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var errors = ref.errors;
return [_c('t-input-group',{attrs:{"label":"Password Confirmation"}},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.form.password_confirmation),expression:"form.password_confirmation"}],staticClass:"form-control",attrs:{"type":"password","id":"password_confirmation","placeholder":"Enter your password again"},domProps:{"value":(_vm.form.password_confirmation)},on:{"input":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, "password_confirmation", $event.target.value)}}}),_vm._v(" "),(errors[0])?_c('span',{staticClass:"field-invalid"},[_vm._v(_vm._s(errors[0]))]):_vm._e()])]}}])}),_vm._v(" "),_c('button',{staticClass:"w-full btn btn-primary rounded-full",attrs:{"disabled":_vm.working == true,"type":"submit"}},[(_vm.working == false)?_c('span',[_vm._v("Reset Password")]):_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")])])])],1)])],2)])])}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/reset-password.vue?vue&type=template&id=0b4ff43d&

// 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/reset-password.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var reset_passwordvue_type_script_lang_js_ = ({
  auth: 'guest',

  head() {
    return {
      titleTemplate: 'Reset your password | %s'
    };
  },

  data() {
    return {
      working: false,
      form: {
        email: null,
        password: null,
        password_confirmation: null
      }
    };
  },

  async asyncData({
    app,
    query,
    redirect
  }) {
    await app.$axios.$get('/password/reset', {
      params: query
    }).catch(() => {
      redirect('/');
    });
  },

  mounted() {
    this.form.email = this.$route.query.email;
  },

  methods: {
    async resetPassword() {
      let token = this.$route.query.token;
      let email = this.$route.query.email;
      this.$refs.form.validate().then(success => {
        if (!success) {
          return;
        }

        this.working = true;
        this.$axios.post('/password/reset', {
          email: email,
          token: token,
          password: this.form.password,
          password_confirmation: this.form.password_confirmation
        }).then(response => {
          this.working = false;

          if (response.status == 200) {
            this.$router.push({
              path: '/'
            });
            this.$toast.success(response.data).goAway(3000);
          }
        }).catch(error => {
          this.working = false;
          this.$router.push({
            path: '/forgot-password'
          });
          this.$toast.error(error.response.data).goAway(3000);
          this.$refs.form.setErrors(error.response.data.errors);
        });
      });
    }

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

// CONCATENATED MODULE: ./pages/reset-password.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  pages_reset_passwordvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "1c98eda5"
  
)

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

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


/***/ })

};;
//# sourceMappingURL=reset-password.js.map

Zerion Mini Shell 1.0