From a3912d3ed26f8e44860573702e185894173eb5d9 Mon Sep 17 00:00:00 2001 From: Joel Jacob Stephen <70131076+JoelJacobStephen@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:18:14 -0600 Subject: [PATCH] fix(sh-admin): resolve record retrieval limits in pending invites section by implementing pagination (#4624) --- .../hoppscotch-sh-admin/src/components.d.ts | 1 + .../backend/gql/queries/InvitedUsers.graphql | 4 +- .../src/pages/users/invited.vue | 73 ++++++++++++++----- 3 files changed, 59 insertions(+), 19 deletions(-) diff --git a/packages/hoppscotch-sh-admin/src/components.d.ts b/packages/hoppscotch-sh-admin/src/components.d.ts index dfb703fe..0d8c40d4 100644 --- a/packages/hoppscotch-sh-admin/src/components.d.ts +++ b/packages/hoppscotch-sh-admin/src/components.d.ts @@ -45,6 +45,7 @@ declare module 'vue' { SettingsAuthProvider: typeof import('./components/settings/AuthProvider.vue')['default'] SettingsConfigurations: typeof import('./components/settings/Configurations.vue')['default'] SettingsDataSharing: typeof import('./components/settings/DataSharing.vue')['default'] + SettingsHistoryConfiguration: typeof import('./components/settings/HistoryConfiguration.vue')['default'] SettingsReset: typeof import('./components/settings/Reset.vue')['default'] SettingsServerRestart: typeof import('./components/settings/ServerRestart.vue')['default'] SettingsSmtpConfiguration: typeof import('./components/settings/SmtpConfiguration.vue')['default'] diff --git a/packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InvitedUsers.graphql b/packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InvitedUsers.graphql index 4083ccf5..f947a931 100644 --- a/packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InvitedUsers.graphql +++ b/packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InvitedUsers.graphql @@ -1,6 +1,6 @@ -query InvitedUsers { +query InvitedUsers($skip: Int, $take: Int) { infra { - invitedUsers { + invitedUsers(skip: $skip, take: $take) { adminUid adminEmail inviteeEmail diff --git a/packages/hoppscotch-sh-admin/src/pages/users/invited.vue b/packages/hoppscotch-sh-admin/src/pages/users/invited.vue index 79f721f7..6e583751 100644 --- a/packages/hoppscotch-sh-admin/src/pages/users/invited.vue +++ b/packages/hoppscotch-sh-admin/src/pages/users/invited.vue @@ -87,6 +87,15 @@ +
+ {{ t('users.show_more') }} + +
+