Conversation
…I API/used components
… doesn't work (need to find the cause) errors are displayed as required plus hook queries adjusted
…nd adjusted styling
…nd adjusted styling
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Employment History CRUD UI for trainee profiles, updates parts of the education “strikes” UI to MUI’s newer slots / slotProps APIs, and cleans up client/package-lock.json.
Changes:
- Added React Query hooks and UI components (list + modal) to add/edit/delete trainee employment history entries.
- Updated strikes components to use MUI
slots/slotPropsand cleaned up styling props/typos. - Removed
"peer": truefields from dependencies inclient/package-lock.json.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| client/src/features/trainee-profile/employment/data/employment-queries.ts | New React Query hooks for employment history endpoints. |
| client/src/features/trainee-profile/employment/EmploymentsList.tsx | New list UI for rendering employment history entries with actions. |
| client/src/features/trainee-profile/employment/EmploymentDetailsModal.tsx | New modal form for adding/editing employment entries. |
| client/src/features/trainee-profile/employment/EmploymentInfo.tsx | Integrates employment history querying + modal + delete confirmation into the Employment tab. |
| client/src/features/trainee-profile/education/strikes/StrikesList.tsx | Style prop cleanup, shorthand usage, and typo fix (alignItems). |
| client/src/features/trainee-profile/education/strikes/StrikeDetailsModal.tsx | Migrates Modal/TextField props to MUI slots/slotProps and clarifies styles. |
| client/package-lock.json | Removes unnecessary "peer": true fields from lockfile entries. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/features/trainee-profile/employment/history/EmploymentHistoryList.tsx
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentsList.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentDetailsModal.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentInfo.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentInfo.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/data/employment-queries.ts
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/data/employment-queries.ts
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentInfo.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentInfo.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/history/EmploymentDetailsModal.tsx
Show resolved
Hide resolved
…to api/api.ts, adjusted styling to fit criteria, fixed typo isEditing=>!isEditing, applied copilot feedback in most places
zalexa19
left a comment
There was a problem hiding this comment.
Hello!
I left some comments, but nothing major or critical :)
I can see that it was inspired by the strikes section, and unfortunatellly the strikes sections needs a bit of polish :sweat-smile:
I plan on cleaning it up a bit, and probably tests and interactions as well (as it was also inspired by the stikes)
My appoligies if this mislead you.
But regardless,
it looks very good! the code was very easy to follow and I appreciate it that you also fixed the slotProps :)
client/src/features/trainee-profile/employment/EmploymentsList.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentsList.tsx
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/data/employment-queries.ts
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/data/employment-queries.ts
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/data/employment-queries.ts
Outdated
Show resolved
Hide resolved
client/src/features/trainee-profile/employment/EmploymentInfo.tsx
Outdated
Show resolved
Hide resolved
…d di `npm audit fix`
client/src/features/trainee-profile/employment/history/EmploymentHistoryGroup.tsx
Outdated
Show resolved
Hide resolved
zalexa19
left a comment
There was a problem hiding this comment.
Nice!
Thank you so much for cleaning up the try/catch in the api and adding a key factory :)
…y invalidation, small UX/UI changes
This pull request adds a new Employment History UI with adding/editing/deleting, additionally focuses on updating MUI (Material UI) component usage and improving code consistency in the trainee profile's education strikes feature. It also cleans up the
package-lock.jsonby removing unnecessarypeerfields from dependencies. The most important changes are summarized below:MUI v5 Migration and Component Updates
StrikeDetailsModal.tsxto use the new MUI v5slotsandslotPropsAPI forModalandTextFieldcomponents, replacing deprecatedBackdropComponent,BackdropProps, andInputLabelPropsusage.bgcolortobackgroundColorfor better clarity and consistency with the MUI v5 API.Code Consistency and Cleanup
StrikesList.tsxto use MUI shorthand (e.g.,pr,px,py) and fixed typos likealignIntemstoalignItems.import React from 'react'inStrikesList.tsxfor clarity and consistency.Dependency File Maintenance
"peer": truefields from dependency entries inclient/package-lock.json, which are not required and help keep the lock file clean.