Browse Source

fix: reset base users on adding new user

pull/7202/head
mertmit 11 months ago
parent
commit
1680e675eb
  1. 5
      packages/nc-gui/components/tabs/auth/UserManagement.vue
  2. 2
      packages/nc-gui/store/bases.ts

5
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 | User[]>(null)
const selectedUser = ref<null | User>(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()

2
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,

Loading…
Cancel
Save