diff --git a/src/pages/manage/ownerships/index.page.tsx b/src/pages/manage/ownerships/index.page.tsx index 0e058495e..8cafbd49f 100644 --- a/src/pages/manage/ownerships/index.page.tsx +++ b/src/pages/manage/ownerships/index.page.tsx @@ -1,5 +1,7 @@ +import capitalize from 'lodash/capitalize'; import { useRouter } from 'next/router'; -import { useMemo, useState } from 'react'; +import { useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; import { UseQueryResult } from 'react-query'; import { @@ -8,13 +10,17 @@ import { OwnershipState, useGetOwnershipRequestsQuery, } from '@/hooks/api/ownerships'; -import { List } from '@/ui/List'; +import { useShallowRouter } from '@/hooks/useShallowRouter'; +import { OwnershipsTable } from '@/pages/organizers/[organizerId]/ownerships/OwnershipsTable'; +import { Button, ButtonVariants } from '@/ui/Button'; +import { Icons } from '@/ui/Icon'; +import { Inline } from '@/ui/Inline'; +import { Input } from '@/ui/Input'; import { Page } from '@/ui/Page'; import { Pagination } from '@/ui/Pagination'; import { Panel } from '@/ui/Panel'; import { Select } from '@/ui/Select'; import { Spinner } from '@/ui/Spinner'; -import { Text } from '@/ui/Text'; import { getValueFromTheme } from '@/ui/theme'; import type { FetchError } from '@/utils/fetchFromApi'; @@ -23,28 +29,72 @@ const getGlobalValue = getValueFromTheme('global'); const itemsPerPage = 14; +const Actions = ({ request }: { request: OwnershipRequest }) => { + const { t } = useTranslation(); + + if (request.state === OwnershipState.REQUESTED) { + return ( + + + + + ); + } + + if (request.state === OwnershipState.DELETED) { + return null; + } + + return ( +