From 1680e675ebb9cff755fdb67e408df013ef201b73 Mon Sep 17 00:00:00 2001 From: mertmit Date: Mon, 11 Dec 2023 15:58:37 +0000 Subject: [PATCH] fix: reset base users on adding new user --- packages/nc-gui/components/tabs/auth/UserManagement.vue | 5 +++++ packages/nc-gui/store/bases.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/tabs/auth/UserManagement.vue b/packages/nc-gui/components/tabs/auth/UserManagement.vue index e177847863..2eb3ad358b 100644 --- a/packages/nc-gui/components/tabs/auth/UserManagement.vue +++ b/packages/nc-gui/components/tabs/auth/UserManagement.vue @@ -33,6 +33,8 @@ const { isUIAllowed } = useRoles() const { dashboardUrl } = useDashboard() +const { clearBasesUser } = useBases() + const users = ref(null) const selectedUser = ref(null) @@ -84,6 +86,9 @@ const inviteUser = async (user: User) => { await api.auth.baseUserAdd(base.value.id, user as ProjectUserReqType) + // clear bases user state + clearBasesUser() + // Successfully added user to base message.success(t('msg.success.userAddedToProject')) await loadUsers() diff --git a/packages/nc-gui/store/bases.ts b/packages/nc-gui/store/bases.ts index aae911ce5f..3e35306d13 100644 --- a/packages/nc-gui/store/bases.ts +++ b/packages/nc-gui/store/bases.ts @@ -51,7 +51,7 @@ export const useBases = defineStore('basesStore', () => { const isProjectsLoading = ref(false) async function getBaseUsers({ baseId, searchText, force = false }: { baseId: string; searchText?: string; force?: boolean }) { - if (!force && !limit && !page && basesUser.value.has(baseId)) { + if (!force && basesUser.value.has(baseId)) { const users = basesUser.value.get(baseId) return { users,