Skip to content

Commit

Permalink
fix: settings password fix [WTEL-4784, WTEL-4785, WTEL-4786]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Jul 22, 2024
1 parent f19688d commit 17c88e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/modules/settings/components/change-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const confirmNewPassword = ref('');
const v$ = useVuelidate(
computed(() => ({
newPassword: {
required,
},
confirmNewPassword: {
sameAs: sameAs(newPassword),
},
Expand All @@ -68,6 +71,9 @@ async function changePassword() {
id: userId.value,
changes,
});
newPassword.value = '';
confirmNewPassword.value = '';
v$.value.$reset();
$eventBus.$emit('notification', {
type: 'success',
text: 'Password is successfully updated!',
Expand Down
4 changes: 0 additions & 4 deletions src/modules/settings/components/the-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ export default {
return getNamespacedState(state, 'userinfo').userId;
},
}),
disablePasswordChange() {
this.v$.$touch();
return this.v$.$pending || this.v$.$error;
},
},
async mounted() {
try {
Expand Down

0 comments on commit 17c88e9

Please sign in to comment.