Summary
Create a reusable Vue component CalibrationVariantAssignmentTable that renders an inline, editable table of variant → assignment pairs, with support for adding/removing individual rows and CSV upload. This component is the shared foundation for calibration controls and future class-based assignment editing.
Background
Two calibration workflows need a UI for assigning a clinical or functional label to a score-set variant:
- Controls: variant →
Pathogenic | Benign
- Class-based calibrations: variant → one of the calibration's defined class labels (tracked separately as a follow-up)
Rather than building two separate UIs, a single parameterized component handles both. Assignment options are passed as a prop so the same component works for fixed enums and dynamic label sets alike.
Proposed Behavior
Props
modelValue: { variantUrn: string; assignment: string }[] — current rows (v-model)
assignmentOptions: { label: string; value: string }[] — available assignment values
scoreSetUrn: string | null — the score set to search variants from
assignmentColumnName?: string — column header label (defaults to "Clinical Status")
validationErrors?: Record<string, string> — keyed by row index/field for inline errors
readonly?: boolean — hides add/remove controls and disables editing (for viewer use)
disabled?: boolean
Behavior
- Renders a table with columns: variant (typeahead search from score set variants), assignment (dropdown from
assignmentOptions), remove button
- "Add row" button appends a new empty row
- "Upload CSV" button opens a file picker; the CSV is parsed client-side and valid rows are merged into
modelValue
- Emits
update:modelValue on any change (v-model compatible)
- Row-level validation errors displayed inline
CSV format
- Two columns:
variant (URN or HGVS), [assignment] (column name configurable via prop)
- Invalid rows highlighted with an error message; valid rows added to the table
Acceptance Criteria
Implementation Notes
- Place in
src/components/calibration/CalibrationVariantAssignmentTable.vue
- Use existing
PSelect / PrimeVue components for the dropdown; follow the file upload pattern from CalibrationFields.vue for CSV
- Debounce the variant typeahead API calls; display URN + HGVS in option labels
- Keep the component presentational — no direct API calls except the variant search typeahead
Summary
Create a reusable Vue component
CalibrationVariantAssignmentTablethat renders an inline, editable table of variant → assignment pairs, with support for adding/removing individual rows and CSV upload. This component is the shared foundation for calibration controls and future class-based assignment editing.Background
Two calibration workflows need a UI for assigning a clinical or functional label to a score-set variant:
Pathogenic|BenignRather than building two separate UIs, a single parameterized component handles both. Assignment options are passed as a prop so the same component works for fixed enums and dynamic label sets alike.
Proposed Behavior
Props
modelValue: { variantUrn: string; assignment: string }[]— current rows (v-model)assignmentOptions: { label: string; value: string }[]— available assignment valuesscoreSetUrn: string | null— the score set to search variants fromassignmentColumnName?: string— column header label (defaults to"Clinical Status")validationErrors?: Record<string, string>— keyed by row index/field for inline errorsreadonly?: boolean— hides add/remove controls and disables editing (for viewer use)disabled?: booleanBehavior
assignmentOptions), remove buttonmodelValueupdate:modelValueon any change (v-model compatible)CSV format
variant(URN or HGVS),[assignment](column name configurable via prop)Acceptance Criteria
assignmentOptionsprop (no hardcoded values)readonlyprop hides editing controls and disables inputsImplementation Notes
src/components/calibration/CalibrationVariantAssignmentTable.vuePSelect/ PrimeVue components for the dropdown; follow the file upload pattern fromCalibrationFields.vuefor CSV