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

Refactor isCommunity field #587

Merged
merged 2 commits into from
Mar 2, 2024
Merged

Conversation

cchrischen
Copy link
Collaborator

Summary

  • Change most (see notes below) references of isCommunity field to isInitiativeEvent in FE
  • Fix bug with displaying total initiative event credits in Dashboard
  • Fix bug with not retrieving isInitiativeEvent when requesting all team event info

This pull request is the second step towards implementing support for initiative TEC

Notion/Figma Link

https://www.notion.so/TEC-Add-support-for-Initiative-tec-279c8cac37124630b2b7d7f383c70e55

Test Plan

image
image

Notes

  • isCommunity is still referenced in some files to be safe, namely in index.d.ts and TeamEventForm.tsx when editing an event. In the latter case, isCommunity is updated to the value of isInitiativeEvent.

Breaking Changes

  • Database schema change (anything that changes Firestore collection structure)

@cchrischen cchrischen requested a review from a team as a code owner February 29, 2024 04:19
@dti-github-bot
Copy link
Member

dti-github-bot commented Feb 29, 2024

[diff-counting] Significant lines: 44.

Copy link
Collaborator

@andrew032011 andrew032011 left a comment

Choose a reason for hiding this comment

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

Great work!

Can you update backend/tests/data/createData.ts:89 as well?

@@ -104,7 +104,7 @@ const TeamEventDashboard: React.FC = () => {
0
);
const initiativeCredits = teamEvents.reduce(
(val, event) => calculateInitiativeCreditsForEvent(member, event),
(val, event) => val + calculateInitiativeCreditsForEvent(member, event),
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -53,7 +55,8 @@ const TeamEventForm = (props: Props): JSX.Element => {
date: teamEventDate,
numCredits: teamEventCreditNum,
hasHours: teamEventHasHours,
isCommunity
isCommunity: isInitiativeEvent,
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@cchrischen cchrischen merged commit 1a46f5b into main Mar 2, 2024
17 checks passed
@cchrischen cchrischen deleted the cc2785/community-to-initiative branch March 2, 2024 20:28
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