mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
hide project column on project archive
This commit is contained in:
parent
fdac3a6eaf
commit
439d7c1745
@ -45,6 +45,7 @@ export interface IFeaturesArchiveTableProps {
|
|||||||
| SortingRule<string>
|
| SortingRule<string>
|
||||||
| ((prev: SortingRule<string>) => SortingRule<string>)
|
| ((prev: SortingRule<string>) => SortingRule<string>)
|
||||||
) => SortingRule<string>;
|
) => SortingRule<string>;
|
||||||
|
projectId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ArchiveTable = ({
|
export const ArchiveTable = ({
|
||||||
@ -54,6 +55,7 @@ export const ArchiveTable = ({
|
|||||||
storedParams,
|
storedParams,
|
||||||
setStoredParams,
|
setStoredParams,
|
||||||
title,
|
title,
|
||||||
|
projectId,
|
||||||
}: IFeaturesArchiveTableProps) => {
|
}: IFeaturesArchiveTableProps) => {
|
||||||
const rowHeight = theme.shape.tableRowHeight;
|
const rowHeight = theme.shape.tableRowHeight;
|
||||||
const { classes } = useStyles();
|
const { classes } = useStyles();
|
||||||
@ -129,17 +131,24 @@ export const ArchiveTable = ({
|
|||||||
Cell: FeatureArchivedCell,
|
Cell: FeatureArchivedCell,
|
||||||
sortType: 'date',
|
sortType: 'date',
|
||||||
},
|
},
|
||||||
{
|
...(!projectId
|
||||||
Header: 'Project ID',
|
? [
|
||||||
accessor: 'project',
|
{
|
||||||
sortType: 'alphanumeric',
|
Header: 'Project ID',
|
||||||
filterName: 'project',
|
accessor: 'project',
|
||||||
searchable: true,
|
sortType: 'alphanumeric',
|
||||||
maxWidth: 150,
|
filterName: 'project',
|
||||||
Cell: ({ value }: any) => (
|
searchable: true,
|
||||||
<LinkCell title={value} to={`/projects/${value}`} />
|
maxWidth: 150,
|
||||||
),
|
Cell: ({ value }: any) => (
|
||||||
},
|
<LinkCell
|
||||||
|
title={value}
|
||||||
|
to={`/projects/${value}`}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
{
|
{
|
||||||
Header: 'Status',
|
Header: 'Status',
|
||||||
accessor: 'stale',
|
accessor: 'stale',
|
||||||
@ -169,7 +178,7 @@ export const ArchiveTable = ({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
//eslint-disable-next-line
|
//eslint-disable-next-line
|
||||||
[]
|
[projectId]
|
||||||
);
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -31,6 +31,7 @@ export const ProjectFeaturesArchiveTable = ({
|
|||||||
storedParams={value}
|
storedParams={value}
|
||||||
setStoredParams={setValue}
|
setStoredParams={setValue}
|
||||||
refetch={refetchArchived}
|
refetch={refetchArchived}
|
||||||
|
projectId={projectId}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user