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,
data: dataset,
link: createBusterRoute({
route: BusterRoutes.APP_SETTINGS_USERS_ID,
userId: dataset.id
route: BusterRoutes.APP_DATASETS_ID,
datasetId: dataset.id
})
};
if (dataset.assigned) {

View File

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

View File

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

View File

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

View File

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