mirror of https://github.com/buster-so/buster.git
reroute to correct link for datasets
This commit is contained in:
parent
01f139ca38
commit
b658eb2728
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue