chore(tags): move tags column in dashboard and chart list (#25504)
This commit is contained in:
parent
87c8e872ee
commit
af661ceee2
|
|
@ -407,6 +407,27 @@ function ChartList(props: ChartListProps) {
|
|||
size: 'xxl',
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
Cell: ({
|
||||
row: {
|
||||
original: { tags = [] },
|
||||
},
|
||||
}: any) => (
|
||||
// Only show custom type tags
|
||||
<TagsList
|
||||
tags={tags.filter((tag: Tag) =>
|
||||
tag.type
|
||||
? tag.type === 1 || tag.type === 'TagTypes.custom'
|
||||
: true,
|
||||
)}
|
||||
maxTags={3}
|
||||
/>
|
||||
),
|
||||
Header: t('Tags'),
|
||||
accessor: 'tags',
|
||||
disableSortBy: true,
|
||||
hidden: !isFeatureEnabled(FeatureFlag.TAGGING_SYSTEM),
|
||||
},
|
||||
{
|
||||
Cell: ({
|
||||
row: {
|
||||
|
|
@ -448,27 +469,6 @@ function ChartList(props: ChartListProps) {
|
|||
disableSortBy: true,
|
||||
size: 'xl',
|
||||
},
|
||||
{
|
||||
Cell: ({
|
||||
row: {
|
||||
original: { tags = [] },
|
||||
},
|
||||
}: any) => (
|
||||
// Only show custom type tags
|
||||
<TagsList
|
||||
tags={tags.filter((tag: Tag) =>
|
||||
tag.type
|
||||
? tag.type === 1 || tag.type === 'TagTypes.custom'
|
||||
: true,
|
||||
)}
|
||||
maxTags={3}
|
||||
/>
|
||||
),
|
||||
Header: t('Tags'),
|
||||
accessor: 'tags',
|
||||
disableSortBy: true,
|
||||
hidden: !isFeatureEnabled(FeatureFlag.TAGGING_SYSTEM),
|
||||
},
|
||||
{
|
||||
Cell: ({ row: { original } }: any) => {
|
||||
const handleDelete = () =>
|
||||
|
|
|
|||
|
|
@ -305,7 +305,31 @@ function DashboardList(props: DashboardListProps) {
|
|||
Header: t('Title'),
|
||||
accessor: 'dashboard_title',
|
||||
},
|
||||
|
||||
{
|
||||
Cell: ({
|
||||
row: {
|
||||
original: { tags = [] },
|
||||
},
|
||||
}: {
|
||||
row: {
|
||||
original: {
|
||||
tags: Tag[];
|
||||
};
|
||||
};
|
||||
}) => (
|
||||
// Only show custom type tags
|
||||
<TagsList
|
||||
tags={tags.filter(
|
||||
(tag: Tag) => tag.type === 'TagTypes.custom' || tag.type === 1,
|
||||
)}
|
||||
maxTags={3}
|
||||
/>
|
||||
),
|
||||
Header: t('Tags'),
|
||||
accessor: 'tags',
|
||||
disableSortBy: true,
|
||||
hidden: !isFeatureEnabled(FeatureFlag.TAGGING_SYSTEM),
|
||||
},
|
||||
{
|
||||
Cell: ({
|
||||
row: {
|
||||
|
|
@ -360,31 +384,6 @@ function DashboardList(props: DashboardListProps) {
|
|||
disableSortBy: true,
|
||||
size: 'xl',
|
||||
},
|
||||
{
|
||||
Cell: ({
|
||||
row: {
|
||||
original: { tags = [] },
|
||||
},
|
||||
}: {
|
||||
row: {
|
||||
original: {
|
||||
tags: Tag[];
|
||||
};
|
||||
};
|
||||
}) => (
|
||||
// Only show custom type tags
|
||||
<TagsList
|
||||
tags={tags.filter(
|
||||
(tag: Tag) => tag.type === 'TagTypes.custom' || tag.type === 1,
|
||||
)}
|
||||
maxTags={3}
|
||||
/>
|
||||
),
|
||||
Header: t('Tags'),
|
||||
accessor: 'tags',
|
||||
disableSortBy: true,
|
||||
hidden: !isFeatureEnabled(FeatureFlag.TAGGING_SYSTEM),
|
||||
},
|
||||
{
|
||||
Cell: ({ row: { original } }: any) => {
|
||||
const handleDelete = () =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue