diff --git a/web/src/app/app/datasets/[datasetId]/permissions/HeaderExplanation.tsx b/web/src/app/app/_components/PermissionComponents/HeaderExplanation.tsx similarity index 100% rename from web/src/app/app/datasets/[datasetId]/permissions/HeaderExplanation.tsx rename to web/src/app/app/_components/PermissionComponents/HeaderExplanation.tsx diff --git a/web/src/app/app/datasets/[datasetId]/permissions/PermissionSearch.tsx b/web/src/app/app/_components/PermissionComponents/PermissionSearch.tsx similarity index 100% rename from web/src/app/app/datasets/[datasetId]/permissions/PermissionSearch.tsx rename to web/src/app/app/_components/PermissionComponents/PermissionSearch.tsx diff --git a/web/src/app/app/_components/PermissionComponents/index.ts b/web/src/app/app/_components/PermissionComponents/index.ts index f4ef7809e..9154d8402 100644 --- a/web/src/app/app/_components/PermissionComponents/index.ts +++ b/web/src/app/app/_components/PermissionComponents/index.ts @@ -1 +1,3 @@ export * from './PermissionLineageBreadcrumb'; +export * from './HeaderExplanation'; +export * from './PermissionSearch'; diff --git a/web/src/app/app/datasets/[datasetId]/permissions/dataset-groups/_PermissionDatasetGroups/PermissionDatasetGroups.tsx b/web/src/app/app/datasets/[datasetId]/permissions/dataset-groups/_PermissionDatasetGroups/PermissionDatasetGroups.tsx index 897f7a3b1..19cd17c03 100644 --- a/web/src/app/app/datasets/[datasetId]/permissions/dataset-groups/_PermissionDatasetGroups/PermissionDatasetGroups.tsx +++ b/web/src/app/app/datasets/[datasetId]/permissions/dataset-groups/_PermissionDatasetGroups/PermissionDatasetGroups.tsx @@ -4,8 +4,7 @@ import { useDatasetListDatasetGroups } from '@/api/buster-rest'; import React, { useState } from 'react'; import { useDebounceSearch } from '@/hooks'; import { useMemoizedFn } from 'ahooks'; -import { HeaderExplanation } from '../../HeaderExplanation'; -import { PermissionSearch } from '../../PermissionSearch'; +import { PermissionSearch, HeaderExplanation } from '@/app/app/_components/PermissionComponents'; import { Button } from 'antd'; import { AppMaterialIcons } from '@/components'; import { PermissionListDatasetGroupContainer } from './PermissionListDatasetGroupContainer'; diff --git a/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionListUserContainer.tsx b/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionListUserContainer.tsx index a09b30e40..8329d8dea 100644 --- a/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionListUserContainer.tsx +++ b/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionListUserContainer.tsx @@ -71,7 +71,7 @@ export const PermissionListUserContainer: React.FC<{ return result; }, [filteredUsers]); - const rows = useMemo( + const rows: BusterListRowItem[] = useMemo( () => [ { diff --git a/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionOverview.tsx b/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionOverview.tsx index 39d463745..055949fac 100644 --- a/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionOverview.tsx +++ b/web/src/app/app/datasets/[datasetId]/permissions/overview/_PermissionOverview/PermissionOverview.tsx @@ -2,8 +2,7 @@ import { useGetDatasetPermissionsOverview } from '@/api/buster-rest/datasets'; import React from 'react'; -import { HeaderExplanation } from '../../HeaderExplanation'; -import { PermissionSearch } from '../../PermissionSearch'; +import { PermissionSearch, HeaderExplanation } from '@/app/app/_components/PermissionComponents'; import { PermissionListUserContainer } from './PermissionListUserContainer'; import { useDebounceSearch } from '@/hooks'; diff --git a/web/src/app/app/datasets/[datasetId]/permissions/permission-groups/_PermissionPermissionGroup/PermissionPermissionGroup.tsx b/web/src/app/app/datasets/[datasetId]/permissions/permission-groups/_PermissionPermissionGroup/PermissionPermissionGroup.tsx index 255eb81f6..7a003a939 100644 --- a/web/src/app/app/datasets/[datasetId]/permissions/permission-groups/_PermissionPermissionGroup/PermissionPermissionGroup.tsx +++ b/web/src/app/app/datasets/[datasetId]/permissions/permission-groups/_PermissionPermissionGroup/PermissionPermissionGroup.tsx @@ -1,8 +1,7 @@ 'use client'; import React, { useState } from 'react'; -import { HeaderExplanation } from '../../HeaderExplanation'; -import { PermissionSearch } from '../../PermissionSearch'; +import { PermissionSearch, HeaderExplanation } from '@/app/app/_components/PermissionComponents'; import { useMemoizedFn } from 'ahooks'; import { Button } from 'antd'; import { AppMaterialIcons } from '@/components'; diff --git a/web/src/app/app/datasets/[datasetId]/permissions/users/_PermissionUsers/PermissionUsers.tsx b/web/src/app/app/datasets/[datasetId]/permissions/users/_PermissionUsers/PermissionUsers.tsx index 9b9294bf3..698265aac 100644 --- a/web/src/app/app/datasets/[datasetId]/permissions/users/_PermissionUsers/PermissionUsers.tsx +++ b/web/src/app/app/datasets/[datasetId]/permissions/users/_PermissionUsers/PermissionUsers.tsx @@ -1,8 +1,7 @@ 'use client'; import React from 'react'; -import { HeaderExplanation } from '../../HeaderExplanation'; -import { PermissionSearch } from '../../PermissionSearch'; +import { PermissionSearch, HeaderExplanation } from '@/app/app/_components/PermissionComponents'; import { useDatasetListPermissionUsers } from '@/api/buster-rest'; import { useDebounceSearch } from '@/hooks'; import { Button } from 'antd'; diff --git a/web/src/app/app/settings/users/[userId]/UserController.tsx b/web/src/app/app/settings/users/[userId]/UserController.tsx index 8a849ab78..48a764640 100644 --- a/web/src/app/app/settings/users/[userId]/UserController.tsx +++ b/web/src/app/app/settings/users/[userId]/UserController.tsx @@ -21,8 +21,8 @@ export const UserController = React.memo(({ userId }: { userId: string }) => { - - + + ); }); diff --git a/web/src/app/app/settings/users/[userId]/UserDatasetListContainer.tsx b/web/src/app/app/settings/users/[userId]/UserDatasetListContainer.tsx new file mode 100644 index 000000000..3b3c47ff9 --- /dev/null +++ b/web/src/app/app/settings/users/[userId]/UserDatasetListContainer.tsx @@ -0,0 +1,50 @@ +import React, { useMemo } from 'react'; +import { + BusterInfiniteList, + BusterListColumn, + BusterListRowItem, + InfiniteListContainer +} from '@/components/list'; +import { PermissionLineageBreadcrumb } from '@/app/app/_components/PermissionComponents'; +import { DatasetPermissionOverviewUser } from '@/api/buster-rest'; +import { Text } from '@/components/text'; + +export const UserDatasetListContainer = React.memo( + ({ filteredDatasets }: { filteredDatasets: any[] }) => { + const columns: BusterListColumn[] = useMemo(() => [], []); + + const rows: BusterListRowItem[] = useMemo(() => [], []); + + return ( + + } + /> + + ); + } +); + +UserDatasetListContainer.displayName = 'UserDatasetListContainer'; + +const DatasetLineageCell = React.memo(({ user }: { user: DatasetPermissionOverviewUser }) => { + return ( +
+ {/* */} +
+ ); +}); +DatasetLineageCell.displayName = 'DatasetLineageCell'; + +const EmptyState = React.memo(() => { + return ( +
+ No datasets found +
+ ); +}); +EmptyState.displayName = 'EmptyState'; diff --git a/web/src/app/app/settings/users/[userId]/UserDatasetSearch.tsx b/web/src/app/app/settings/users/[userId]/UserDatasetSearch.tsx index 3ec3391cd..1f3633d11 100644 --- a/web/src/app/app/settings/users/[userId]/UserDatasetSearch.tsx +++ b/web/src/app/app/settings/users/[userId]/UserDatasetSearch.tsx @@ -1,22 +1,19 @@ import React from 'react'; -import { Input } from 'antd'; import { useDebounceSearch } from '@/hooks'; -import { InfiniteListContainer } from '@/components/list'; +import { OrganizationUser } from '@/api'; +import { PermissionSearch } from '@/app/app/_components/PermissionComponents'; +import { UserDatasetListContainer } from './UserDatasetListContainer'; -export const UserDatasetSearch = React.memo(() => { +export const UserDatasetSearch = React.memo(({ user }: { user: OrganizationUser }) => { const { filteredItems, searchText, handleSearchChange, isPending } = useDebounceSearch({ items: [], - searchPredicate: (item, searchText) => true, - debounceTime: 500 + searchPredicate: (item, searchText) => true }); return ( -
- - - -
TEST
-
+
+ +
); }); diff --git a/web/src/app/app/settings/users/[userId]/UserHeader.tsx b/web/src/app/app/settings/users/[userId]/UserHeader.tsx index cc3d11028..9e3a5b4e4 100644 --- a/web/src/app/app/settings/users/[userId]/UserHeader.tsx +++ b/web/src/app/app/settings/users/[userId]/UserHeader.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { BusterUserAvatar, Text, Title, AppMaterialIcons } from '@/components'; -import { BusterUserResponse, OrganizationUser } from '@/api'; +import { OrganizationUser } from '@/api'; import { Button } from 'antd'; export const UserHeader = React.memo(({ user }: { user: OrganizationUser }) => { diff --git a/web/src/app/app/settings/users/[userId]/UserLineageHeader.tsx b/web/src/app/app/settings/users/[userId]/UserLineageHeader.tsx index e057c4464..d07faf307 100644 --- a/web/src/app/app/settings/users/[userId]/UserLineageHeader.tsx +++ b/web/src/app/app/settings/users/[userId]/UserLineageHeader.tsx @@ -1,13 +1,17 @@ import React from 'react'; -import { Text, Title } from '@/components/text'; +import { HeaderExplanation } from '@/app/app/_components/PermissionComponents'; +import type { OrganizationUser } from '@/api/buster-rest'; -export const UserLineageHeader = React.memo(({ className = '' }: { className?: string }) => { - return ( -
- {`Dataset access & lineage`} - {`View Blake Rouse’s access to all available datasets. Lineage is provided to show where access originates from.`} -
- ); -}); +export const UserLineageHeader = React.memo( + ({ className = '', user }: { className?: string; user: OrganizationUser }) => { + return ( + + ); + } +); UserLineageHeader.displayName = 'UserLineageHeader';