-
Notifications
You must be signed in to change notification settings - Fork 1
Add trainee test component. Enabling viewing/editing/removing trainee tests #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
-shows all test entries of a student -result icon depend on the grade result -does not fully implement the edit and delete buttons yet
-matches the server-side test interface
added formatter from helperfunction `formHelper.ts`
Prompts a modal for adding/editing tests as described in #219 Will be used in the `TestsComponent` that will be created next.
…b.com/HackYourFuture/dojo into frontend/TestsList-crud-functionality
uses testslist and testdetailsmodal components. implements feature #219
not resetting form after submission
on a straight column in the Tests List component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a test results management feature for trainee profiles, allowing users to add, edit, and view test results. The implementation builds upon previous work (#257) and addresses feature request #219.
Key changes:
- Added a new
TestsComponentfor managing trainee test records with CRUD operations - Created
TestDetailsModalfor adding/editing test information including type, date, score, and result - Integrated the tests component into the Education Info section alongside the existing Strikes component
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
client/src/components/education/TestsComponent.tsx |
New component implementing test management with add, edit, and delete functionality |
client/src/components/education/TestDetailsModal.tsx |
Modal form for creating and editing test records with validation |
client/src/components/education/EducationInfo.tsx |
Integrated TestsComponent into the education section |
client/src/components/education/TestsList.tsx |
Updated styling to remove gap property and add explicit width |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }; | ||
|
|
||
| /** | ||
| * Function to enable adding tests. |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 74-76 is a duplicate of the comment on lines 67-69. The closeModal function comment should describe closing the modal, not 'enable adding tests'.
| * Function to enable adding tests. | |
| * Function to close the modal and reset related state. |
| <FormControl fullWidth> | ||
| <TextField | ||
| disabled={isLoading} | ||
| id={testFields?.date ? 'date' : 'dateEmpty'} |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dynamic id attribute based on whether testFields.date exists is unnecessary and could cause issues with form handling and accessibility. The id should remain constant ('date') regardless of whether the field has a value.
| id={testFields?.date ? 'date' : 'dateEmpty'} | |
| id="date" |
Tests component for adding/editing trainee tests
2025-10-27.16-20-08.mp4