'use client' import type { TrainingJob } from './types' import { ProgressRing, MiniChart, StatusBadge, MetricCard } from './ChartComponents' export function TrainingJobCard({ job, onPause, onResume, onStop, onViewDetails }: { job: TrainingJob onPause: () => void onResume: () => void onStop: () => void onViewDetails: () => void }) { const isActive = ['training', 'preparing', 'validating'].includes(job.status) return (
{/* Header */}

{job.name}

Modell: {job.model_type.charAt(0).toUpperCase() + job.model_type.slice(1)}

{/* Progress Section */}
{/* Epoch Progress */}
Epoche {job.current_epoch} / {job.total_epochs}
{/* Documents Progress */}
Dokumente {job.documents_processed.toLocaleString()} / {job.total_documents.toLocaleString()}
{/* Metrics */}
{/* Loss Chart */}
Loss-Verlauf
Training Validation
{/* Time Info */}
Gestartet: {job.started_at ? new Date(job.started_at).toLocaleTimeString('de-DE') : '-'} Geschätzte Fertigstellung: {job.estimated_completion ? new Date(job.estimated_completion).toLocaleTimeString('de-DE') : '-' }
{/* Actions */}
{isActive && ( <> )}
) }