mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-18 04:05:42 +00:00
refactor: remove incident column rendering logic from DataQualityTab component
This commit is contained in:
parent
65b270e03f
commit
436aec7fab
@ -350,43 +350,6 @@ const DataQualityTab: React.FC<DataQualityTabProps> = ({
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t('label.incident'),
|
||||
dataIndex: 'testCaseResult',
|
||||
key: 'incident',
|
||||
width: 120,
|
||||
render: (_, record) => {
|
||||
const testCaseResult = testCaseStatus.find(
|
||||
(status) =>
|
||||
status.testCaseReference?.fullyQualifiedName ===
|
||||
record.fullyQualifiedName
|
||||
);
|
||||
|
||||
if (isStatusLoading) {
|
||||
return <Skeleton.Input size="small" />;
|
||||
}
|
||||
|
||||
if (!testCaseResult) {
|
||||
return '--';
|
||||
}
|
||||
|
||||
// Check if user has permission to edit incident status
|
||||
const testCasePermission = testCasePermissions.find(
|
||||
(permission) =>
|
||||
permission.fullyQualifiedName === record.fullyQualifiedName
|
||||
);
|
||||
const hasEditPermission =
|
||||
isEditAllowed || testCasePermission?.EditAll;
|
||||
|
||||
return (
|
||||
<TestCaseIncidentManagerStatus
|
||||
data={testCaseResult}
|
||||
hasPermission={hasEditPermission}
|
||||
onSubmit={handleStatusSubmit}
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t('label.action-plural'),
|
||||
dataIndex: 'actions',
|
||||
|
Loading…
x
Reference in New Issue
Block a user