ARCHIVED: This plan was not delivered. Preserved for context.
Implementation Plan: Student FTE Calculator Helper¶
Overview¶
Add calculator helper to student headcount form. Formula: (students × duration × avg_fte) / 12 = Annual FTE. Button adds result to Total Student FTE input.
Requirements¶
- Calculator component with 3 inputs + calculated result display
- "Use This Value" button adds calculation to FTE field
- Error handling for incomplete data
- i18n support (EN/FR)
Implementation Steps¶
Frontend (2 files)¶
1. Create Calculator Component¶
File: frontend/src/components/organisms/module/StudentFTECalculator.vue (new)
Template:
- 3 number inputs: students, duration (months), avg FTE per student
- Computed display: "Calculated Annual FTE: X.XX"
- Button: "Use This Value" (disabled if inputs incomplete)
Script:
- Computed
calculatedFTE:(students × duration × avgFTE) / 12 - Computed
isValid: all 3 fields have values > 0 emits('use-value', calculatedFTE)on button click
2. Update Form Component¶
File: frontend/src/components/organisms/module/ModuleForm.vue:18-26 Add method:
function onUseCalculatedFTE(value: number) {
form["fte"] = value;
}
i18n Strings¶
File: frontend/src/i18n/mylab.ts
Add keys:
student_helper_students_label: "Number of students" / "Nombre d'étudiant·es"student_helper_duration_label: "Average duration (months)" / "Durée moyenne (mois)"student_helper_avg_fte_label: "Average FTE per student" / "EPT moyen par étudiant·e"student_helper_calculated_label: "Calculated Annual FTE" / "EPT annuel calculé"student_helper_use_button: "Use This Value" / "Utiliser cette valeur"
Data Flow¶
- User expands "Student FTE Calculator Helper"
- Fills 3 inputs → calculation updates in real-time
- Clicks "Use This Value" →
form['fte']populated - User clicks "Update" → form submits with aggregated FTE
Critical Files (3 total)¶
- frontend/src/components/organisms/module/StudentFTECalculator.vue (new)
- frontend/src/components/organisms/module/ModuleForm.vue
- frontend/src/i18n/mylab.ts
Success Criteria¶
✅ Calculator displays live calculation ✅ Button disabled when inputs incomplete ✅ Value populates FTE field on click ✅ i18n strings for EN/FR