codersforcauses / codersforcauses/teach-learn-grow
As a volunteer I want to be able to see a list of all programs
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
There should be a programs page which shows all tlg programs. This page should be accessible from the dashboard. Each program should be shown in a card. If the user can apply for the program then it should be shown normally. Any program older than this shouldn't be shown. Programs should also be listed with the most recent currently enrolled programs first and then by the most recent date to least.
**Tasks**
Frontend
- [ ] Programs page
- Create a new programs page on a new route and add it to the side bar
- retrieve a list of all programs from the backend
- display this list of programs as a list of cards with their details with an 'apply' button.
- if the user can apply to the program (as indicated in the backend's response) then link perform tasks in #6. Otherwise, disable the button
Backend
- [x] Program schema
- edit the prisma schema and create a migration
- add a new table for programs that contains necessary fields
- create an `application` table - this represents a volunteer applying for a program, containing the user, the program and a status flag (pending, accepted, rejected)
- one program can have many applications and one user can apply to multiple programs
- create the relationship between the `program`, `application` and `user` tables
- [ ] List programs endpoint
- GET requests, return a list of all programs where the date is later than the current date sorted by date (see description)
- also returns a flag attached to each program that indicates whether the user who made the request can apply to the program
- also return a flag attached to each program that indicates whether the user is enrolled in the program
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.