import React from 'react'; import { Button, Descriptions, Input } from 'antd'; import type { DescriptionsProps } from 'antd'; import { CopyOutlined } from '@ant-design/icons'; import { FEEDBACK_RESULT, PREDICTED_RESULT, REVIEWED_RESULT } from './const'; const DocumentCompareInfo = ({ key, data, selectedFileDataSource, updateRevisedByFeedback, handleUpdateFileInField, shouldRevised, disabledInput }) => { const items: DescriptionsProps['items'] = [ { key: selectedFileDataSource[data]?.[FEEDBACK_RESULT] || '1', label: 'Feedback', children: selectedFileDataSource[data]?.[FEEDBACK_RESULT], labelStyle: { color: '#333', padding: '4px 16px' }, contentStyle: { padding: '4px 16px' }, span: 3 }, { key: selectedFileDataSource[data]?.[PREDICTED_RESULT] || '2', label: 'Predicted', children: selectedFileDataSource[data]?.[PREDICTED_RESULT], labelStyle: { color: '#333', padding: '4px 16px' }, contentStyle: { padding: '4px 16px' }, span: 3 }, { key: selectedFileDataSource[data]?.[REVIEWED_RESULT] || '3', label: 'Revised', children: handleUpdateFileInField(data, e.target.value) } variant="borderless" disabled={disabledInput === undefined || disabledInput === 0} />, labelStyle: { color: '#333', padding: '4px 16px' }, contentStyle: { padding: '4px 16px' }, span: 3 }, ]; return (
{data}
} size='small' onClick={() => updateRevisedByFeedback(data)} disabled={disabledInput === undefined || disabledInput === 0} />