-
Notifications
You must be signed in to change notification settings - Fork 0
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
Schedule Review Table Data Fetch #259
Conversation
e010ec8
to
833ff65
Compare
Visit the preview URL for this PR (updated for commit 7c7b8e3): https://sistering-dev--pr259-joseph-schedule-revi-rnqlxck9.web.app (expires Fri, 29 Apr 2022 00:42:39 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
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.
looking good, the main changes have to do with 1) removing skills + branches from the response and 2) add another where
filter to the prisma query for userId
and signupStatus
const firebaseUser = await firebaseAdmin | ||
.auth() | ||
.getUser(signup.user.authId); | ||
|
||
filteredSignups.push( | ||
this.convertSignupResponeWithUserAndVolunteerToDTO( | ||
signup, | ||
shift.startTime, | ||
shift.endTime, | ||
firebaseUser.email ?? "", | ||
), | ||
); |
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.
No action needed on this pr but we should probably store user emails in the db so we don't have to make a call to firebase every time. We'll do this in the future!
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.
remember to run yarn fix to address linter errors :)
222a876
to
c517b89
Compare
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.
Ticket link
Closes #162
Implementation description
shiftsWithSignupsAndVolunteersByPosting
Steps to test
insert into skills values (1, "test skill");
insert into branches values (1, "test branch");
insert into "_SkillToVolunteer" values (1, 1);
insert into "_BranchToVolunteer" values (1, 1);
:5000/graphql
/admin/scheduleTableDemo
to see demo of queryNote that the queries
createShifts
,createShiftSignups
, andupdateShiftSignup
will likely be useful for creating shifts and signing up to them.What should reviewers focus on?
Checklist