You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Participant dash backend and start of frontend (#72)
# Participant Dashboard Frontend
## Overview
This PR implements a comprehensive participant dashboard that allows
participants to view their volunteer matches, manage match statuses, and
request new volunteers. It includes both frontend UI components and
backend API endpoints to support the full match management workflow.
## Features
### Frontend
- **Participant Dashboard** (`/participant/dashboard`)
- Landing page with sidebar navigation (Matches, Contact tabs)
- Dynamic header messages based on match state
- User avatar display in header
- **Match Display Components**
- `VolunteerCard`: Displays pending matches with volunteer details
(name, pronouns, age, timezone, diagnosis, overview, treatments,
experiences)
- `ConfirmedMatchCard`: Displays confirmed/scheduled matches with
timeline layout (date badge, time, vertical teal bar, volunteer info)
- Both cards show volunteer overview from `volunteer_data` table
- **Request New Matches Flow**
- Inline form when all matches are completed (no card border, heading in
header area)
- Modal flow for requesting new matches from pending matches
- Success confirmation modal after submission
- Form includes optional message/notes field
- **Date/Time Utilities**
- `formatDateRelative()`: "Today", "Tomorrow", or day of week
- `formatDateShort()`: "Feb 26" format
- `formatTime()`: "12:00PM" format
### Backend
- **Match Management APIs**
- `GET /matches/me`: Get all matches for current participant with
volunteer details
- `POST /matches/request-new-volunteers`: Request new volunteers
(soft-deletes active matches, creates task, sets pending flag)
- `POST /matches/{match_id}/schedule`: Schedule a match (participant
selects time)
- `POST /matches/{match_id}/cancel-participant`: Cancel match as
participant
- `POST /matches/{match_id}/cancel-volunteer`: Cancel match as volunteer
- `POST /matches/{match_id}/request-new-times`: Request new time options
- `POST /matches/{match_id}/accept`: Volunteer accepts a match
- **Match Service Enhancements**
- Soft deletion support (`deleted_at` column)
- Match status management with cleanup logic
- Volunteer summary includes timezone and overview from `user_data` and
`volunteer_data` tables
- Prevents double-booking volunteers
- Handles match state transitions (pending → confirmed → completed)
- **Database Changes**
- Added `deleted_at` column to `matches` table (soft deletion)
- Added `pending_volunteer_request` boolean field to `users` table
- Added `description` column to `tasks` table
- **Time Block Validation**
- Updated `TimeRange` to accept half-hour boundaries
- All time slots must start at 0 or 30 minutes, be 30 minutes in length
## Database Migrations
- `d87b1000d48b`: Add soft deletion to matches table
- `14fdeccc883f`: Add pending_volunteer_request field to users table
- `e3f0a5b4b7c4`: Add task description column
## TODOs
- Schedule flow not yet implemented (placeholder handler)
- Cancel call flow not yet implemented (placeholder handler)
- View contact details flow not yet implemented (placeholder handler)
- Contact tab shows placeholder message
- Mobile styling
- Edit profile pages not yet implemented
0 commit comments