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

fixed check-in filter on frontend #187

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

JustKong13
Copy link
Contributor

Summary

This pull request fixes the bug that the "no check-in" filter was showing classes in which all groups were already sent a check-in email.

This bug stemmed from the fact that in order to display the order of email templates accurately in the send email modal, the backend fields were updated with numbers to reflect that order of email templates alphanumerically, rather than fixing the order on the frontend. Although this field name was changed in the database, it was not reflected in the filter logic. In this PR, filter logic was then updated to reflect the updated field.

Screenshot 2024-03-05 at 1 50 03 PM

Test Plan

In this example, ECON 1110 and PHYS 2213 students were matched, and updated the templateTimestamps field in the emulator database through the backend for ECON 1100. This was done through calling the updateGroupTimestamp in backend/functions/src/emailing/functions.ts.

Since the Microsoft Graph PR (#165) was not merged, I was not able to use the emailing feature via the frontend, which is why I called the backend function instead so that the database can update appropriately.

Screenshot 2024-03-05 at 1 29 14 PM

After applying the filter, ECON 1100 no longer shows up when applying the "no checkin email" filter, as expected.

Screenshot 2024-03-05 at 1 38 35 PM

Notes

This change has no affect on the ability of the system to get email templates. Although the id for the check-in email is check-in, it is still able to retrieve the correct email template since the filter does not communicate with the email templates.

Breaking Changes

@JustKong13 JustKong13 requested a review from a team as a code owner March 5, 2024 19:07
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 2.

Copy link

github-actions bot commented Mar 5, 2024

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

https://zing-lsc--pr187-fix-no-checkin-filte-n2deye59.web.app

(expires Tue, 12 Mar 2024 19:10:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1fc18307b178c916e2663810a6932f60b173c01b

Copy link
Contributor

@rgu0114 rgu0114 left a comment

Choose a reason for hiding this comment

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

Looks good Justin, and thanks for the detailed explanation of your changes! It was definitely helpful in understanding the reasoning behind the change.

@JustKong13 JustKong13 merged commit 7d46282 into main Mar 6, 2024
5 checks passed
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.

3 participants