Skip to content
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

Sending email functionality #97

Merged
merged 32 commits into from
May 29, 2024
Merged

Sending email functionality #97

merged 32 commits into from
May 29, 2024

Conversation

YashRavipati1
Copy link
Contributor

Tracking Info

Resolves #69

Changes

Implemented functionality for automated emails (backend and frontend API service)

Testing

Created a custom button to send a pre-set automated email to a certain email address every time it was pressed.

Confirmation of Change

Screenshot 2024-05-07 at 2 19 47 AM

@YashRavipati1 YashRavipati1 requested a review from petabite as a code owner May 7, 2024 09:20
@petabite petabite requested a review from Azhou2023 May 8, 2024 21:59
## Tracking Info

Resolves #92 

## Changes

Added resize images extension in Firebase automatically resize all
uploaded images to 600x400. Changed default thumbnail/carousel and made
carousel arrows more clear.

## Testing

Ensured that all uploaded images were correctly downscaled when
uploaded; observed difference in file size before and after resizing
(made files 20x smaller in some cases). Ensured that uploading from the
app with this extension was smooth and everything scaled correclty.

## Confirmation of Change

<img width="1512" alt="Screenshot 2024-05-06 at 2 41 13 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/57163201/413fee20-6497-4971-b22e-c65be84dce6c">
<img width="337" alt="Screenshot 2024-05-06 at 2 41 26 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/57163201/be984d32-6d0c-4450-8c08-cded0e998f8f">
<img width="1512" alt="Screenshot 2024-05-06 at 2 42 05 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/57163201/6e6a1260-9ffe-47a1-955d-014bccd1e6d3">

---------
Copy link
Member

@petabite petabite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a route to send emails? Since all the events that trigger an email are processed in the backend, I was thinking we can just call the backend email service's sendEmail function wherever we need to send emails. That way we can save a round trip from the frontend to backend. Thoughts?

RamtinTJB and others added 13 commits May 13, 2024 15:24
## Tracking Info

Resolves parts of #80 (Doesn't send the request to the backend on click)

## Changes

- Refactored old components
- Deleted old unused filter components
- Wrote reusable components for checkbox filters and radio button
filters
- Made the NavBar sticky and implemented the frontend for the filter
panel

## Testing

Since the "Apply" button doesn't actually send the request to the
backend, the only way to test it to make sure it visually looks the same
as the designs.

## Confirmation of Change


![image](https://github.com/TritonSE/USHS-Housing-Portal/assets/69605985/0431bdc9-24a2-41d6-818a-0f9cf14a6652)

---------

Co-authored-by: Philip Zhang <[email protected]>
## Tracking Info

Resolves #76
Resolves #83 
Resolves #67 

## Changes
I implemented the /users/:id/demote route which will demote a user from
a housing locator to simply a user. I added the functions
demoteUserHandler, a route for demote user, and demoteUser.

For issue 83, I also created the Housing Locator table and have a trash
icon next to each housing locator. When it is clicked, that housing
locator will be demoted.

There's also a pop up when the trash can is clicked.

## Testing
I tested the route so that when the delete button calls the demote user
route, the user is removed and their status is changed on MongoDB.


## Confirmation of Change
When the delete button next to the housing locator's name is clicked,
the user is removed and their status is changed on MongoDB.

When I click on the trash button by my own name - 
<img width="1440" alt="Screenshot 2024-04-23 at 6 39 52 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/35088854/e50b6d83-4763-4202-a2fa-63399aee3b88">

Then, this is my view after I am no longer a housing locator 
<img width="1184" alt="Screenshot 2024-04-23 at 6 40 13 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/35088854/f56e0a8b-1152-4945-9887-114578a7cd41">

Finally, this is my status after it is updated in MongoDB and I am no
longer a housing locator
<img width="686" alt="Screenshot 2024-04-23 at 6 40 33 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/35088854/d33225a9-ed47-409c-a988-3134e8ab0728">

<img width="1032" alt="Screenshot 2024-04-24 at 3 34 09 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/35088854/55791c75-2e2e-40b5-b52b-77480331f054">
<img width="865" alt="Screenshot 2024-04-24 at 3 34 15 PM"
src="https://github.com/TritonSE/USHS-Housing-Portal/assets/35088854/accdf978-921a-401e-93c5-56f6ef200219">

---------

Co-authored-by: Philip Zhang <[email protected]>
## Tracking Info

Resolves #84 
Resolves #66 

## Changes

I implemented a get route in the backend to get information about a
renter candidate.

Extract `Table` component for reuse and refactor code in `ReferralTable`
to use it.

## Testing

I tested the route on Postman and implemented the frontend on the renter
candidate page to display the information.



## Confirmation of Change


![image](https://github.com/TritonSE/USHS-Housing-Portal/assets/24444266/2995c3c0-c6fa-4224-a3c8-4663ffa90454)

---------

Co-authored-by: Philip Zhang <[email protected]>
…Housing-Portal into feature/Yash/EmailSending
…Housing-Portal into feature/Yash/EmailSending
Copy link
Member

@petabite petabite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far! Just a couple things:

frontend/package-lock.json Outdated Show resolved Hide resolved
backend/src/services/email.ts Outdated Show resolved Hide resolved
backend/src/services/referral.ts Outdated Show resolved Hide resolved
backend/src/services/referral.ts Outdated Show resolved Hide resolved
Copy link
Member

@petabite petabite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 🔥

Copy link

Visit the preview URL for this PR (updated for commit a05ffa5):

https://ushs-housing-portal-staging--pr97-feature-yash-emailse-pa4tdmri.web.app

(expires Wed, 05 Jun 2024 20:02:49 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7c2f834b767adfbe0b81630135daffa0bb77f003

Copy link
Contributor

@Azhou2023 Azhou2023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@petabite petabite merged commit 693e9f5 into main May 29, 2024
4 checks passed
@petabite petabite deleted the feature/Yash/EmailSending branch May 29, 2024 21:24
petabite added a commit that referenced this pull request May 30, 2024
petabite added a commit that referenced this pull request May 30, 2024
petabite added a commit that referenced this pull request May 30, 2024
Redo #97

---------

Co-authored-by: Yashwanth Ravipati <[email protected]>
petabite added a commit that referenced this pull request Jun 3, 2024
Follow up to #97 

## Changes

<!-- What changes did you make? -->

- add env vars for dummy gmail account for email notifications to CI

## Testing

<!-- How did you confirm your changes worked? -->

- test email sending via preview branch (e.g. demote a HL/promote a RS)

## Confirmation of Change

<!-- Upload a screenshot, if possible. Otherwise, please provide
instructions on how to see the change. -->

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email Notification System [ Epic 🏔️ ]
6 participants