mirror of
https://github.com/docmost/docmost.git
synced 2025-11-11 16:12:06 +10:00
fix: bug fixes (#1000)
* sort by groups first * add scroll area * fix group members pagination * move pagination to the right
This commit is contained in:
@ -21,7 +21,7 @@ export default function Paginate({
|
||||
}
|
||||
|
||||
return (
|
||||
<Group mt="md">
|
||||
<Group mt="md" justify="flex-end">
|
||||
<Button
|
||||
variant="default"
|
||||
size="compact-sm"
|
||||
|
||||
@ -33,7 +33,7 @@ export async function getGroupMembers(
|
||||
groupId: string,
|
||||
params?: QueryParams,
|
||||
): Promise<IPagination<IUser>> {
|
||||
const req = await api.post("/groups/members", { groupId, params });
|
||||
const req = await api.post("/groups/members", { groupId, ...params });
|
||||
return req.data;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
import { Group, Table, Text, Menu, ActionIcon } from "@mantine/core";
|
||||
import {
|
||||
Group,
|
||||
Table,
|
||||
Text,
|
||||
Menu,
|
||||
ActionIcon,
|
||||
ScrollArea,
|
||||
} from "@mantine/core";
|
||||
import React from "react";
|
||||
import { IconDots } from "@tabler/icons-react";
|
||||
import { modals } from "@mantine/modals";
|
||||
@ -106,6 +113,7 @@ export default function SpaceMembersList({
|
||||
return (
|
||||
<>
|
||||
<SearchInput onSearch={handleSearch} />
|
||||
<ScrollArea h={400}>
|
||||
<Table.ScrollContainer minWidth={500}>
|
||||
<Table highlightOnHover verticalSpacing={8}>
|
||||
<Table.Thead>
|
||||
@ -193,6 +201,7 @@ export default function SpaceMembersList({
|
||||
</Table.Tbody>
|
||||
</Table>
|
||||
</Table.ScrollContainer>
|
||||
</ScrollArea>
|
||||
|
||||
{data?.items.length > 0 && (
|
||||
<Paginate
|
||||
|
||||
@ -17,7 +17,6 @@ import Paginate from "@/components/common/paginate.tsx";
|
||||
import { SearchInput } from "@/components/common/search-input.tsx";
|
||||
import NoTableResults from "@/components/common/no-table-results.tsx";
|
||||
import { usePaginateAndSearch } from "@/hooks/use-paginate-and-search.tsx";
|
||||
import InviteActionMenu from "@/features/workspace/components/members/components/invite-action-menu.tsx";
|
||||
import MemberActionMenu from "@/features/workspace/components/members/components/members-action-menu.tsx";
|
||||
|
||||
export default function WorkspaceMembersTable() {
|
||||
|
||||
@ -114,6 +114,7 @@ export class SpaceMemberRepo {
|
||||
])
|
||||
.select((eb) => this.groupRepo.withMemberCount(eb))
|
||||
.where('spaceId', '=', spaceId)
|
||||
.orderBy((eb) => eb('groups.id', 'is not', null), 'desc')
|
||||
.orderBy('spaceMembers.createdAt', 'asc');
|
||||
|
||||
if (pagination.query) {
|
||||
|
||||
Reference in New Issue
Block a user