Fix critical 'any' types in components

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 20:30:01 +00:00
parent 2cd6b2c6c3
commit 3d07198454
10 changed files with 403 additions and 28 deletions

View File

@@ -100,6 +100,14 @@ export function EntityTimelineManager({
setIsDialogOpen(true);
};
// Convert TimelineEvent to the format expected by the dialog
const editingEventForDialog = editingEvent ? {
...editingEvent,
event_date: new Date(editingEvent.event_date),
id: editingEvent.id,
approved_by: editingEvent.approved_by || null,
} : undefined;
// Handle delete
const handleDelete = async (eventId: string) => {
if (!user) {
@@ -211,7 +219,7 @@ export function EntityTimelineManager({
entityType={entityType}
entityId={entityId}
entityName={entityName}
existingEvent={editingEvent}
existingEvent={editingEventForDialog}
onSuccess={handleSuccess}
/>
</div>

View File

@@ -93,7 +93,7 @@ interface TimelineEventEditorDialogProps {
entityType: EntityType;
entityId: string;
entityName: string;
existingEvent?: any;
existingEvent?: TimelineEventFormData & { id: string; approved_by?: string | null };
onSuccess?: () => void;
}