Skip to content

Commit

Permalink
[KNOWAGE-8719] Fixed form validation reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Redjaw committed Jan 7, 2025
1 parent fb81e77 commit 67c6c01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/managers/usersManagement/UsersManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ export default defineComponent({
this.userDetailsForm.id = null
this.userDetailsForm.userId = ''
this.userDetailsForm.fullName = ''
if(this.userDetailsForm.password) delete this.userDetailsForm.password
if(this.userDetailsForm.passwordConfirm) delete this.userDetailsForm.passwordConfirm
this.userDetailsForm.failedLoginAttempts = 0
this.userDetailsForm.sbiExtUserRoleses = []
this.userDetailsForm.sbiUserAttributeses = {}
Expand Down Expand Up @@ -295,12 +297,15 @@ export default defineComponent({
},
populateForms(userObj: any) {
this.dirty = false
this.v$.$reset()
this.attributesForm = {}
this.hiddenForm = false
this.disableUsername = userObj.id ? true : false
this.defaultRole = userObj.defaultRoleId
this.selectedRoles = this.getSelectedUserRoles(userObj.sbiExtUserRoleses)
this.userDetailsForm = { ...userObj }
if(this.userDetailsForm.password) delete this.userDetailsForm.password
if(this.userDetailsForm.passwordConfirm) delete this.userDetailsForm.passwordConfirm
this.populateAttributesForm(userObj.sbiUserAttributeses)
},
populateAttributesForm(userAttributeValues: any) {
Expand Down

0 comments on commit 67c6c01

Please sign in to comment.