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,
|
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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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';
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue