-
Notifications
You must be signed in to change notification settings - Fork 1
Scheduling a call, request new times, cancelling call, & edit profile flows in participant dash. Contact form and sign out button for participant and volunteer dash. #81
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
… profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Group time slots by day | ||
| const slotsByDay: { [day: string]: TimeSlot[] } = {}; | ||
| timeSlots.forEach((slot) => { | ||
| if (!slotsByDay[slot.day]) { | ||
| slotsByDay[slot.day] = []; |
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.
Fix request-new-times day key mismatch
The request-new-times flow never includes the selected slots in the payload. convertTimeSlotsToTimeRanges stores selectedDays by full weekday name (e.g., "Monday"), but the slots coming from TimeScheduler use abbreviated keys like "Mon" (see slot.day). When iterating dayNameToDate later, slotsByDay[dayName] is always empty, so timeRanges stays empty and the POST to /matches/{id}/request-new-times submits no ranges, failing validation (backend MatchRequestNewTimesRequest requires at least one range). Participants who pick days and hours will always get a 422 instead of submitting their availability.
Useful? React with 👍 / 👎.
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.
👎 fake news bruh it works
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Object.keys(dayNameToDate).forEach((dayName) => { | ||
| const day = dayNameToDate[dayName]; | ||
| const daySlots = slotsByDay[dayName] || []; | ||
|
|
||
| if (daySlots.length === 0) return; |
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.
Fix day-name mismatch when building new-time ranges
The new-times payload is always empty: convertTimeSlotsToTimeRanges iterates over selected days keyed by full weekday names, then looks up slots with slotsByDay[dayName]. However, TimeScheduler normalizes visibleDays to abbreviated names like Mon/Tues (see frontend/src/components/dashboard/TimeScheduler.tsx lines 167‑180), so slotsByDay never shares the same keys. Even when the user selects hours, daySlots stays empty and the request sends suggested_new_times: [], which the /matches/{id}/request-new-times endpoint rejects (Pydantic requires at least one range). This currently prevents participants from submitting new time requests at all.
Useful? React with 👍 / 👎.
…ash, made email uneditable
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // For each selected day, find the corresponding time slots | ||
| Object.keys(dayNameToDate).forEach((dayName) => { | ||
| const day = dayNameToDate[dayName]; | ||
| const daySlots = slotsByDay[dayName] || []; |
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.
Fix day label mismatch when building request time ranges
In convertTimeSlotsToTimeRanges the loop looks up daySlots using the full weekday names produced by toLocaleDateString (e.g., “Tuesday”), but the TimeScheduler feeds slot.day values using abbreviated labels (Mon, Tues, etc.). That mismatch means slotsByDay[dayName] is always empty, so timeRanges stays empty and the POST to /matches/{id}/request-new-times fails validation (suggested_new_times requires at least one entry) whenever a participant submits new availability.
Useful? React with 👍 / 👎.
TDLR: Implemented scheduling call, request new times, cancelling call, & edit profile flows in participant dash. implemented contact form and sign out button for participant and volunteer dash
i'm too lazy to write one so here's claude's pr message:
Summary
Implements comprehensive participant dashboard improvements including
call scheduling, requesting new times, cancelling calls, profile editing,
and contact form functionality.
What Changed
Participant Dashboard Features
from volunteer-proposed time blocks with a clean date/time picker
interface
alternative availability when volunteer times don't work
cancer experience, and account settings
volunteer dashboards
Backend API Enhancements
/contact/submitendpoint for contact form (with logging; emailintegration pending)
/schedule,/cancel,/request-new-times/user-data/mePATCH to support timezone and language updatesdeleted_atandcleans up time blocks)
UI/UX Improvements
Data & Testing
and timezone information
Technical Details
New Components:
ParticipantEditProfileModal- Full profile editingDaySelectionCalendar- Multi-day selection calendarCancelCallConfirmationModal&CancelCallSuccessModalRequestNewTimesSuccessModalViewContactDetailsModalContactForm&ContactSuccessModalReadOnlyDiagnosisFieldAccountSettingsNew Pages:
/participant/schedule/[matchId]- Call scheduling interface/participant/request-new-times/[matchId]- Request new availability/participant/dashboard/contact- Contact form/volunteer/dashboard/contact- Volunteer contact formAPI Client Updates:
participantMatchAPIClient- AddedscheduleMatch,cancelMatch,requestNewTimescontactAPIClient- New client for contact form submissionauthAPIClient- Enhanced logout to clear both backend and Firebasesessions
Testing Checklist
Known Limitations
integration pending)
🤖 Generated with Claude Code