codersforcauses / codersforcauses/teach-learn-grow

As an administrator I want to import a list of application decisions

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

On the administrators page and in the recruitment tab, we should have an "Import recruitment decisions" card. A file can be selected for import, a program is selected for import and it will mass update the recruitment decisions made for applicants of a certain program.

**Tasks**

Frontend
- [ ] Import decision section
- Add a new section in the page created in #7 to import decisions
- Add a file input field that only accepts CSV files
- When user uploads a file, read its content as text and validate the header of the CSV file (according to a predetermined format)
- if the headers are not correct, reject the file and inform user
- turn this into an array of objects in JSON format and make a request to backend to update applications
- inform the user of the changes made (e.g. 30 total, 20 accepted, 10 rejected)

Backend
- [ ] Group schema
- update prisma schema and add migration
- create a new `group` table that has a id, name and other description (client to elaborte)
- there are multiple groups within a program and multiple users within a group
- create a one to many relationship between program and group
- create a new `membership` (or similar) table that link a user to a group. this contains their role and the group id
- [ ] Bulk update decision endpoint
- POST request, given a list of JSON objects containing the application id and a role and a group name, update the applications to reflect the new status
- create groups that are attached to the program
- create new membership to link accepted users to their groups with their role
- respond with a summary of changes made

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.