Repository navigation
Added Volunteer management UI - #416
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Cached searches remain stale after volunteer mutations, and table profiles lack keyboard-accessible navigation.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Replaces the volunteer placeholder with management screens integrated into Dojo’s shared profile components.
Changes:
- Adds a paginated overview, creation dialog, and editable volunteer profiles.
- Connects volunteer APIs, routes, and profile pictures.
- Extends shared types and documentation for volunteers.
| File | Description |
|---|---|
| README.md | Documents volunteer management. |
| client/src/routes/routes.tsx | Adds overview and profile routes. |
| client/src/layout/Sidebar/constants.ts | Updates volunteer navigation. |
| client/src/features/volunteers/VolunteerStatus.ts | Defines statuses and labels. |
| client/src/features/volunteers/VolunteersPage.tsx | Removes the placeholder. |
| client/src/features/volunteers/VolunteersOverviewPage.tsx | Adds the overview page. |
| client/src/features/volunteers/VolunteerProfilePage.tsx | Loads volunteer profiles. |
| client/src/features/volunteers/Volunteer.ts | Defines domain and editing types. |
| client/src/features/volunteers/profile/VolunteerProfile.tsx | Coordinates tabs and editing. |
| client/src/features/volunteers/profile/VolunteerInfo.tsx | Adds editable overview fields. |
| client/src/features/volunteers/profile/VolunteerHeader.tsx | Displays identity and picture controls. |
| client/src/features/volunteers/data/volunteer-queries.ts | Adds list and detail queries. |
| client/src/features/volunteers/data/mutations.ts | Adds create and update mutations. |
| client/src/features/volunteers/data/keys.ts | Defines cache keys. |
| client/src/features/volunteers/components/VolunteerStatusChip.tsx | Displays volunteer status. |
| client/src/features/volunteers/components/VolunteersTable.tsx | Displays volunteer rows. |
| client/src/features/volunteers/components/AddVolunteerDialog.tsx | Adds validated creation form. |
| client/src/features/volunteers/api/types.ts | Defines API payloads. |
| client/src/features/volunteers/api/mapper.ts | Maps domain and API data. |
| client/src/features/volunteers/api/api.ts | Implements volunteer API calls. |
| client/src/features/search/models/search-result.ts | Adds volunteer result type. |
| client/src/features/search/components/SearchResultsList.tsx | Generalizes the component comment. |
| client/src/features/profile-picture/data/mutations.ts | Supports volunteer picture caching. |
| client/src/features/interactions/Interaction.ts | Defines volunteer interaction choices. |
| client/src/data/types/ProfileType.ts | Adds volunteer profile API mapping. |
| client/src/components/DropdownSelect.tsx | Supports an empty selection. |
| CLIENT_STRUCTURE.md | Documents volunteer feature structure. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+5
to
+25
| import { volunteerKeys } from './keys'; | ||
|
|
||
| /** Hook to save the edited fields of a volunteer profile. */ | ||
| export const useUpdateVolunteer = (volunteerId: string) => { | ||
| const queryClient = useQueryClient(); | ||
|
|
||
| return useMutation({ | ||
| mutationFn: (changes: VolunteerChanges) => updateVolunteer(volunteerId, changes), | ||
| // The response is the saved volunteer, so the profile shows it without loading it again. | ||
| onSuccess: (volunteer) => queryClient.setQueryData(volunteerKeys.details(volunteerId), volunteer), | ||
| }); | ||
| }; | ||
|
|
||
| /** Hook to create a new volunteer. */ | ||
| export const useCreateVolunteer = () => { | ||
| return useMutation({ | ||
| mutationFn: (newVolunteer: NewVolunteer) => createVolunteer(newVolunteer), | ||
| // A failed request may still have created it, and a retry would then fail on the taken email. | ||
| retry: false, | ||
| }); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.