import { useEffect, useState } from 'react'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { ScrollArea } from '@/components/ui/scroll-area'; import { AlertCircle } from 'lucide-react'; import { Alert, AlertDescription } from '@/components/ui/alert'; import type { EntityType } from '@/types/versioning'; interface FieldHistoryDialogProps { open: boolean; onOpenChange: (open: boolean) => void; entityType: EntityType; entityId: string; fieldName: string; } /** * Field-level history has been removed in the relational versioning system. * Use version comparison instead to see field changes between versions. * This component now shows a helpful message directing users to use version comparison. */ export function FieldHistoryDialog({ open, onOpenChange, entityType, entityId, fieldName, }: FieldHistoryDialogProps) { const formatFieldName = (name: string): string => { return name .split('_') .map(word => word.charAt(0).toUpperCase() + word.slice(1)) .join(' '); }; return ( Field History: {formatFieldName(fieldName)}

Field-level history is not available in the current versioning system.

To see changes to the "{formatFieldName(fieldName)}" field, please use the Version Comparison feature in the Version History tab. This will show you all field changes between any two versions.

); }