Add new TestType enum values and update tests dropdown UI#310
Conversation
Co-authored-by: stasel <2033301+stasel@users.noreply.github.com>
client/src/data/types/Trainee.ts
Outdated
| ReactInterview = 'react-interview', | ||
| FinalProjectInterview = 'final-project-interview', | ||
| CoreMidTermInterview = 'core-mid-term-interview', | ||
| CoreEndTermInterview = 'core-end-interview', |
There was a problem hiding this comment.
I made a mistake in the ticket, can you please rename the key to CoreEndInterview
There was a problem hiding this comment.
Done in b0e3093 — renamed to CoreEndInterview in both backend and frontend enums.
| <MenuItem value={TestType.ReactInterview}>React interview</MenuItem> | ||
| <MenuItem value={TestType.FinalProjectInterview}>Final project interview</MenuItem> | ||
| <MenuItem value={TestType.CoreMidTermInterview}>Core mid-term interview</MenuItem> | ||
| <MenuItem value={TestType.CoreEndTermInterview}>Core end-term interview</MenuItem> |
There was a problem hiding this comment.
change the caption to Core end interview
There was a problem hiding this comment.
Updated in b0e3093 — caption is now Core end interview.
There was a problem hiding this comment.
Pull request overview
Adds seven new interview-type TestType enum values across the backend model, frontend types, and OpenAPI docs, and updates the test-type dropdown UI to show only the new options while keeping legacy values for archive/compatibility.
Changes:
- Added 7 new
TestTypeenum values in both server and client type definitions. - Updated
server/api.yamlTest.typeenum to include the 7 new values. - Updated
TestDetailsModaltest-type<Select>options to only show the new interview types.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/src/models/Trainee.ts | Extends backend TestType enum with 7 new interview types. |
| client/src/data/types/Trainee.ts | Mirrors backend enum updates on the frontend type layer. |
| server/api.yaml | Documents the new Test.type enum values in OpenAPI. |
| client/src/features/trainee-profile/education/tests/TestDetailsModal.tsx | Replaces dropdown options to show only the new interview types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/features/trainee-profile/education/tests/TestDetailsModal.tsx
Show resolved
Hide resolved
…ow legacy types when editing old tests Co-authored-by: stasel <2033301+stasel@users.noreply.github.com>
stasel
left a comment
There was a problem hiding this comment.
There are two bugs:
Selection from the drop down no longer works.
When editing a legacy test, the default value in the dropdown is empty even though the existing value is rendered
…MenuItems Co-authored-by: stasel <2033301+stasel@users.noreply.github.com>
Fixed in ede348b. Both bugs had the same root cause: MUI's |
stasel
left a comment
There was a problem hiding this comment.
Please remove all legacy tests from the UI (Keep them in the frontend UI).
If a user tries to edit a legacy test - it's ok to keep the drop down value empty and let it allow to select only new tests. There will be no future edits of a legacy test.
…ditional logic Co-authored-by: stasel <2033301+stasel@users.noreply.github.com>
Done in c4f4843 — removed all legacy conditional logic. The dropdown now always shows only the 7 new test types. Legacy values remain in the enum for API/DB compatibility but are no longer referenced in the UI. |
TestTypeenum values to backend and frontendserver/api.yaml) with new enum values (fixjavaScript→javascript)CoreEndTermInterview→CoreEndInterviewin backend, frontend, and UIOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.