|
|
@ -220,14 +220,20 @@ export default { |
|
|
|
async resetUserPassword(e) { |
|
|
|
async resetUserPassword(e) { |
|
|
|
e.preventDefault() |
|
|
|
e.preventDefault() |
|
|
|
if (this.$refs.formType[0].validate()) { |
|
|
|
if (this.$refs.formType[0].validate()) { |
|
|
|
// console.log('passworDetails',this.passwordDetails); |
|
|
|
try { |
|
|
|
const err = await this.$store.dispatch('users/ActPostPasswordChange', this.passwordDetails) |
|
|
|
await this.$api.auth.passwordChange( |
|
|
|
if (err) { |
|
|
|
{ |
|
|
|
this.formUtil.formErr = true |
|
|
|
currentPassword: this.passwordDetails.currentPassword, |
|
|
|
this.formUtil.formErrMsg = err.data.msg |
|
|
|
newPassword: this.passwordDetails.newPassword |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
this.$toast.success('Password changed successfully.').goAway(3000) |
|
|
|
this.$toast.success('Password changed successfully.').goAway(3000) |
|
|
|
this.$refs.formType[0].reset() |
|
|
|
this.$refs.formType[0].reset() |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
this.$toast |
|
|
|
|
|
|
|
.error(await this._extractSdkResponseErrorMsg(e)) |
|
|
|
|
|
|
|
.goAway(3000); |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -251,6 +257,7 @@ export default { |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Naveen MR <oof1lab@gmail.com> |
|
|
|
* @author Naveen MR <oof1lab@gmail.com> |
|
|
|
* @author Pranav C Balan <pranavxc@gmail.com> |
|
|
|
* @author Pranav C Balan <pranavxc@gmail.com> |
|
|
|
|
|
|
|
* @author Wing-Kam Wong <wingkwong.code@gmail.com> |
|
|
|
* |
|
|
|
* |
|
|
|
* @license GNU AGPL version 3 or any later version |
|
|
|
* @license GNU AGPL version 3 or any later version |
|
|
|
* |
|
|
|
* |
|
|
|