Browse Source

refactor/gui-v2-user-management-invite-ui-improvements

pull/2854/head
Muhammed Mustafa 2 years ago
parent
commit
b570f25209
  1. 10
      packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue

10
packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue

@ -38,7 +38,6 @@ const debouncedSearchText = useDebounce(searchText, 300)
const loadUsers = async (page = currentPage, limit = currentLimit) => { const loadUsers = async (page = currentPage, limit = currentLimit) => {
try { try {
if (!project.value?.id) return if (!project.value?.id) return
isLoading = true
// TODO: Types of api is not correct // TODO: Types of api is not correct
const response = await $api.auth.projectUserList(project.value?.id, <any> { const response = await $api.auth.projectUserList(project.value?.id, <any> {
@ -55,8 +54,6 @@ const loadUsers = async (page = currentPage, limit = currentLimit) => {
} catch (e: any) { } catch (e: any) {
console.error(e) console.error(e)
toast.error(await extractSdkResponseErrorMsg(e)) toast.error(await extractSdkResponseErrorMsg(e))
} finally {
isLoading = false
} }
} }
@ -132,7 +129,12 @@ const copyInviteUrl = (user: User) => {
onMounted(async () => { onMounted(async () => {
if (!users) { if (!users) {
await loadUsers() isLoading = true
try {
await loadUsers()
} finally {
isLoading = false
}
} }
}) })

Loading…
Cancel
Save