Skip to content

Conversation

@parsa-tehranipoor
Copy link
Contributor

@parsa-tehranipoor parsa-tehranipoor commented May 27, 2025

Summary

This pull request is split into two; the first half consists of the work I completed last semester, and the second half consists of the work I have added since then.

The first part of this PR includes all of the code for this feature's frontend on both mobile and computer devices. This PR also consists of the backend route needed for sending an email out to the landlord using the CUAPTs team email.

  • Backend route to send an email to the landlord
  • First frontend display on laptop with all features for email creation
  • Second frontend display on laptop with all features for confirming email send
  • Mobile integration of frontend

The second part of this PR involves fixing multiple backend bugs as well as polishing up the frontend. A test plan for the entire feature, ensuring emails are sent properly, is also included.

  • UX Bugs fixed
  • Backend bugs fixed
  • Calendar pop-up bug fixed
  • Non-existence of landlord email corner case
  • Testing plan for email being properly sent out

Test Plan

The backend route was successfully tested using my friend's email in place of the landlord's email to make sure I didn't accidentally send any test emails to the landlord. My friend successfully received an email from the CUAPTS email and was able to respond back to my personal email by replying to the previous email.

Image 10-1-25 at 12 35 AM
Image 10-1-25 at 12 36 AM

For testing out the frontend, here are screenshots of what the display looks like for different cases

Screenshot 2025-05-27 at 12 51 36 AM Screenshot 2025-10-01 at 2 14 32 PM Screenshot 2025-10-01 at 2 15 30 PM Screenshot 2025-10-01 at 2 16 22 PM Screenshot 2025-05-27 at 12 55 55 AM Screenshot 2025-05-27 at 12 56 00 AM Screenshot 2025-05-27 at 12 56 25 AM

@CLAassistant
Copy link

CLAassistant commented May 27, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ CasperL1218
❌ Parsa Tehranipoor


Parsa Tehranipoor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dti-github-bot
Copy link
Member

dti-github-bot commented May 27, 2025

[diff-counting] Significant lines: 1512. This diff might be too big! Developer leads are invited to review the code.

Copy link

@laurenp-2 laurenp-2 left a comment

Choose a reason for hiding this comment

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

This PR is very comprehensive and well organized! The code is clear and readable, and the modal flow works smoothly. I've left comments on a few small issues—mainly some form validation bugs (wrong error states being checked) and also some error handling—that can be easily fixed. Overall it looks good!

if (inquiryType == 'availability') {
setSubject('Inquiry for ' + aptName + ' Rental Availabilities');
setMessage(
'Dear ' +

Choose a reason for hiding this comment

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

You could consider using template literals for better readability here.

try {
// Check if email is null
if (email === null) {
console.error('No contact information found');

Choose a reason for hiding this comment

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

Adding an error toast here would let users know that an error occurred and that their email didn't go through.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great catch! We will be working to create an alternative modal that allows users to direct to the landlord sight. The toast message could also be a good approach.

<Box style={{ flex: isMobile ? 1 : '0 0 206px' }}>
<Box style={{ display: 'flex' }}>
<Typography className={classes.secondTitleBox}>Name</Typography>
{subjectError && (

Choose a reason for hiding this comment

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

You're checking subjectError for the name field validation here, but this should be nameError. The same issue occurs on lines 562 (should use phoneError) and 598 (should use dateError).

Copy link
Contributor

@CasperL1218 CasperL1218 left a comment

Choose a reason for hiding this comment

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

Great job with implementing the feature, the design was spot on too. As pointed out, it will be great to add some form of notification to the user to indicate the absence of the landlord email. Some approach proposed include:

  • A toast message
  • An alternative modal (e.g. linking to the apartment/landlord website)

For the testings, please also include some notes about each of the image/image groups. This will help organize tests and clearly indicate requirement achievements.

Overall good job!

@parsa-tehranipoor parsa-tehranipoor changed the title Finished Landlord Messaging Feature <WIP> Finished Landlord Messaging Feature Sep 22, 2025
@parsa-tehranipoor parsa-tehranipoor changed the title <WIP> Finished Landlord Messaging Feature Finished Landlord Messaging Feature Oct 1, 2025
Copy link
Contributor

@CasperL1218 CasperL1218 left a comment

Choose a reason for hiding this comment

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

  • Nice fix with that calendar popup, you resolved the problem elegantly and it turns out to be pretty neat with the centered modal style. Even though it is not the same as the design, it could be beneficial, especially under the mobile screen layout. It is nice that we do not need to switch out the UI choice or conduct upgrades, so this really shows how deep understanding or good research of the UI kit you are using is important.

  • Overall welldone with completing the feature, excited to see it in production after we resolve the node version issue. Good job!

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.

6 participants