feat: implement standard pagination for org member list (#19802)

* feat: implement standard pagination for org member list

* fix type error

* i18n for pagination

* add paginationMode

* apply the change to PlatformManagedUsersTable

* replace useInfiniteQuery with useQuery

* fix type error

* fix type error

* fix type error

* fix type error

* update comment

* remove optimistic update

* minor changes

* update usage on nuqs

---------

Co-authored-by: Benny Joo <[email protected]>
This commit is contained in:
Eunjae LeeandBenny Joo authored and GitHub committed 2025-03-11 09:55:41 +01:00
1 parent 861e3aa24f
commit 7eee2728a2
24 files changed
+403 -388

No files matched your search

@@ -389,6 +389,7 @@ function BookingsContent({ status }: BookingsProps) {
fetchNextPage={query.fetchNextPage}
isFetching={query.isFetching}
variant="compact"
paginationMode="infinite"
ToolbarLeft={
<>
<DataTableFilters.AddFilterButton table={table} hideWhenFilterApplied />
@@ -2990,6 +2990,8 @@
"limited_access_trial_mode": "Limited access during trial. Feature available after trial ends.",
"uid": "UID",
"link": "Link",
"rows_per_page": "rows per page",
"pagination_status": "{{currentRange}} of {{totalItems}}",
"tip_username_plus": "Tip: You can a '+' between usernames: cal.com/anna+brian to make a dynamic group meeting",
"user_has_no_team_yet": "You don't have a team yet",
"no_team_members": "You don't have team members yet",
+40 -4
View File
@@ -91,7 +91,17 @@ describe("generate Csv for Org Users Table", () => {
{
...mockUser,
teams: [{ id: 1, name: "Team1", slug: "team1" }],
attributes: [{ id: "1", attributeId: "attr1", value: "value1", slug: "slug1", contains: [] }],
attributes: [
{
id: "1",
attributeId: "attr1",
value: "value1",
slug: "slug1",
contains: [],
weight: 0,
isGroup: false,
},
],
},
];
@@ -115,8 +125,24 @@ describe("generate Csv for Org Users Table", () => {
...mockUser,
teams: [{ id: 1, name: "Team1", slug: "team1" }],
attributes: [
{ id: "1", attributeId: "attr1", value: "value1", slug: "slug1", contains: [] },
{ id: "2", attributeId: "attr1", value: "value2", slug: "slug1", contains: [] },
{
id: "1",
attributeId: "attr1",
value: "value1",
slug: "slug1",
contains: [],
weight: 0,
isGroup: false,
},
{
id: "2",
attributeId: "attr1",
value: "value2",
slug: "slug1",
contains: [],
weight: 0,
isGroup: false,
},
],
},
];
@@ -166,7 +192,17 @@ describe("generate Csv for Org Users Table", () => {
{
...mockUser,
teams: [{ id: 1, name: "Team,1", slug: "team1" }],
attributes: [{ id: "1", attributeId: "attr1", value: "value,1", slug: "slug1", contains: [] }],
attributes: [
{
id: "1",
attributeId: "attr1",
value: "value,1",
slug: "slug1",
contains: [],
weight: 0,
isGroup: false,
},
],
},
];