reroute to correct link for datasets

This commit is contained in:
Nate Kelley 2025-01-23 10:54:21 -07:00
parent 01f139ca38
commit b658eb2728
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
5 changed files with 16 additions and 20 deletions

View File

@ -72,8 +72,8 @@ export const DatasetGroupDatasetsListContainer: React.FC<{
id: dataset.id, id: dataset.id,
data: dataset, data: dataset,
link: createBusterRoute({ link: createBusterRoute({
route: BusterRoutes.APP_SETTINGS_USERS_ID, route: BusterRoutes.APP_DATASETS_ID,
userId: dataset.id datasetId: dataset.id
}) })
}; };
if (dataset.assigned) { if (dataset.assigned) {

View File

@ -72,8 +72,8 @@ export const PermissionGroupDatasetsListContainer: React.FC<{
id: dataset.id, id: dataset.id,
data: dataset, data: dataset,
link: createBusterRoute({ link: createBusterRoute({
route: BusterRoutes.APP_SETTINGS_USERS_ID, route: BusterRoutes.APP_DATASETS_ID,
userId: dataset.id datasetId: dataset.id
}) })
}; };
if (dataset.assigned) { if (dataset.assigned) {

View File

@ -2,10 +2,7 @@
import { useGetUserDatasets } from '@/api/buster_rest'; import { useGetUserDatasets } from '@/api/buster_rest';
import { useDebounceSearch } from '@/hooks'; import { useDebounceSearch } from '@/hooks';
import { import { PermissionSearchAndListWrapper } from '@appComponents/PermissionComponents';
NewPermissionGroupModal,
PermissionSearchAndListWrapper
} from '@appComponents/PermissionComponents';
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';
import { UserDatasetsListContainer } from './UserDatasetsListContainer'; import { UserDatasetsListContainer } from './UserDatasetsListContainer';
import { Button } from 'antd'; import { Button } from 'antd';

View File

@ -15,7 +15,6 @@ import { BusterRoutes, createBusterRoute } from '@/routes';
import { useMemoizedFn } from 'ahooks'; import { useMemoizedFn } from 'ahooks';
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';
import { UserDatasetsSelectedPopup } from './UserDatasetsSelectedPopup'; import { UserDatasetsSelectedPopup } from './UserDatasetsSelectedPopup';
import pluralize from 'pluralize';
export const UserDatasetsListContainer: React.FC<{ export const UserDatasetsListContainer: React.FC<{
filteredDatasets: BusterUserDataset[]; filteredDatasets: BusterUserDataset[];
@ -70,8 +69,8 @@ export const UserDatasetsListContainer: React.FC<{
id: dataset.id, id: dataset.id,
data: dataset, data: dataset,
link: createBusterRoute({ link: createBusterRoute({
route: BusterRoutes.APP_SETTINGS_USERS_ID, route: BusterRoutes.APP_DATASETS_ID,
userId: dataset.id datasetId: dataset.id
}) })
}; };
if (dataset.assigned) { if (dataset.assigned) {

View File

@ -70,19 +70,19 @@ export const UserPermissionGroupsListContainer: React.FC<{
cannotQueryPermissionUsers: BusterListRowItem[]; cannotQueryPermissionUsers: BusterListRowItem[];
canQueryPermissionUsers: BusterListRowItem[]; canQueryPermissionUsers: BusterListRowItem[];
}>( }>(
(acc, permissionUser) => { (acc, permissionGroup) => {
const user: BusterListRowItem = { const permissionGroupItem: BusterListRowItem = {
id: permissionUser.id, id: permissionGroup.id,
data: permissionUser, data: permissionGroup,
link: createBusterRoute({ link: createBusterRoute({
route: BusterRoutes.APP_SETTINGS_USERS_ID, route: BusterRoutes.SETTINGS_PERMISSION_GROUPS_ID_DATASETS,
userId: permissionUser.id permissionGroupId: permissionGroup.id
}) })
}; };
if (permissionUser.assigned) { if (permissionGroup.assigned) {
acc.canQueryPermissionUsers.push(user); acc.canQueryPermissionUsers.push(permissionGroupItem);
} else { } else {
acc.cannotQueryPermissionUsers.push(user); acc.cannotQueryPermissionUsers.push(permissionGroupItem);
} }
return acc; return acc;
}, },