From 5e881840296c6351f1028e77304cbb2acc3a398c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 15 Nov 2021 11:48:52 +0530 Subject: [PATCH] fix: disable validation error(share dialog) unless inviting user Signed-off-by: Pranav C --- .../nc-gui/components/auth/userManagement.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/auth/userManagement.vue b/packages/nc-gui/components/auth/userManagement.vue index 2a31671414..6d1da0abb0 100644 --- a/packages/nc-gui/components/auth/userManagement.vue +++ b/packages/nc-gui/components/auth/userManagement.vue @@ -365,10 +365,17 @@

- + mdi-account-multiple-plus-outline - Invite more + + Invite more
@@ -385,7 +392,7 @@ dense validate-on-blur outlined - :rules="emailRules" + :rules="validate && emailRules" class="caption" hint="You can add multiple comma(,) separated emails" label="Email" @@ -460,6 +467,7 @@ export default { name: 'UserManagement', components: { XBtn, ShareBase, FeedbackForm, DlgLabelSubmitCancel, SetListCheckboxCell }, data: () => ({ + validate: false, deleteItem: null, invite_token: null, userEditDialog: false, @@ -516,6 +524,9 @@ export default { } }, watch: { + userEditDialog(v) { + if (!v) { this.validate = false } + }, options: { async handler() { await this.loadUsers() @@ -696,6 +707,8 @@ export default { } }, async saveUser() { + this.validate = true + await this.$nextTick() if (this.loading || !this.$refs.form.validate() || !this.selectedUser) { return }