sfbrigade / compass

https://compass-chi.vercel.app
12 stars 12 forks source link

[Eng] Break up logic in 'Add Staff' to improve performance #308

Closed KCCPMG closed 2 months ago

KCCPMG commented 3 months ago

The "Add Staff" button on the "/staff" page for case managers is slow to respond. When this button is clicked after the fields have been filled in, the procedure backend/routers/para.createPara is called, which includes sending an email to the new staff member if they are not already in the database. The process of sending this email seems to halt the entire procedure, massively slowing things down and not providing any feedback to the user except for the lack of progress on their attempt to add staff. Separate the logic for the email so that things work better and faster for the user. Other GH issues related to this are #240, #213, and #215