From 49ed8c949bfa144765c4fe01c6c022058ef3188a Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 28 Jul 2022 23:51:32 +0530 Subject: [PATCH] refactor/gui-v2-user-management-invite-ui-improvements --- .../dashboard/settings/ApiTokenManagement.vue | 12 +++---- .../dashboard/settings/UserManagement.vue | 35 ++++++++++--------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/nc-gui-v2/components/dashboard/settings/ApiTokenManagement.vue b/packages/nc-gui-v2/components/dashboard/settings/ApiTokenManagement.vue index 7f6354a641..ff79641891 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/ApiTokenManagement.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/ApiTokenManagement.vue @@ -172,7 +172,7 @@ onMounted(() => { - +
@@ -183,12 +183,10 @@ onMounted(() => { diff --git a/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue b/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue index d4ebb2e45a..a225ba9241 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue @@ -27,6 +27,7 @@ let users = $ref(null) let selectedUser = $ref(null) let showUserModal = $ref(false) let showUserDeleteModal = $ref(false) +let isLoading = $ref(false) let totalRows = $ref(0) const currentPage = $ref(1) @@ -37,6 +38,7 @@ const debouncedSearchText = useDebounce(searchText, 300) const loadUsers = async (page = currentPage, limit = currentLimit) => { try { if (!project.value?.id) return + isLoading = true // TODO: Types of api is not correct const response = await $api.auth.projectUserList(project.value?.id, { @@ -53,6 +55,8 @@ const loadUsers = async (page = currentPage, limit = currentLimit) => { } catch (e: any) { console.error(e) toast.error(await extractSdkResponseErrorMsg(e)) + } finally { + isLoading = false } } @@ -140,7 +144,10 @@ watch(