-
Notifications
You must be signed in to change notification settings - Fork 2
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
Coffee Chat: Suggestions for Categories with No Submissions #680
Conversation
[diff-counting] Significant lines: 122. |
backend/src/dao/CoffeeChatDao.ts
Outdated
@@ -172,4 +173,16 @@ export default class CoffeeChatDao extends BaseDao<CoffeeChat, DBCoffeeChat> { | |||
static async deleteMemberProperties(email: string): Promise<void> { | |||
memberPropertiesCollection.doc(email).delete(); | |||
} | |||
|
|||
/** | |||
* Gets a mapping of all categories to corresponding members, given the semester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note here that this data could be up to X number of days stale? So changes made to member info or category info aren't immediately reflected here.
Also, how is this data populated initially? It might be good to have a script that refreshes this data once a day.
frontend/src/API/CoffeeChatAPI.ts
Outdated
public static async getCategoryToMembers(semester: string): Promise<BingoBoard> { | ||
const res = APIWrapper.get(`${backendURL}/bingo-board/${semester}`).then((res) => res.data); | ||
return res.then((val) => { | ||
if (val.error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could move this error handling to wherever its used in the UI. I think it should be the UI who gets to decide how to handle this. getCategoryToMembers
should just return the promise (could be pending/fulfilled/rejected).
The I might format this function the same way the other ones above are, and just return the promise.
5ab3173
to
9aa1a34
Compare
Summary
This PR lists all members who meet a category if there is no submission in that category yet. The members listed won't already have a pending/approved coffee chat with the submitter, and won't be the submitter themselves.
Requires addition of
coffee-chat-bingo-board
collection, with documents formatted like 'fall-2024' to store boards from multiple semesters. Each document has formatcategory: [{netid: __, name: __}]
Demo
Screen.Recording.2024-11-11.at.7.06.19.PM.mov
Notion/Figma Link
https://www.notion.so/Coffee-Chat-Suggestions-for-Categories-with-No-Submissions-13c0ad723ce1804ab3c0d35531f4112b?pvs=4