Files
WebApp/src/app/governance/components/tea-eeg-panel/report-fields.ts
T

18 lines
947 B
TypeScript

/** The three validation report fields with the labels the model version dialog shows. */
import { ReportField } from '../../api/governance.types';
export const REPORT_FIELDS: { field: ReportField; label: string }[] = [
{ field: 'technical_validation_report_uri', label: 'Pruebas técnicas (MLD-01)' },
{ field: 'clinical_validation_report_uri', label: 'Validación clínica (MLD-01b)' },
{ field: 'interpretability_report_uri', label: 'Interpretabilidad (MLD-03)' },
];
/** The PATCH body from the form values; empty fields clear the tag. */
export function reportsBody(values: Record<ReportField, string>): Partial<Record<ReportField, string | null>> {
return {
technical_validation_report_uri: values.technical_validation_report_uri.trim() || null,
clinical_validation_report_uri: values.clinical_validation_report_uri.trim() || null,
interpretability_report_uri: values.interpretability_report_uri.trim() || null,
};
}