-
Notifications
You must be signed in to change notification settings - Fork 4
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
Pcp schedule sharing - frontend+backend #486
Conversation
…nn-courses into pcp-schedule-sharing
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.
Nice work! Thanks for also refactoring / removing locally storing schedule data - left some comments on refactoring and naming for code readability. Besides from that, we just need to:
- Throughly test schedule sharing - approving requests doesn't seem to be working for me locally (giving me 409 error).
- Viewing friends schedule: no courses added to their schedule, not sharing a schedule
- Loading friends schedule
- Test schedule / cart changes syncing with backend - ex. add courses to cart, log out, and make sure its up-to-date after logging in, edge cases: cart, semester, new acc (cart, "Schedule")??
- @mialana can you add a few sentence to the PR describing the changes to backend-frontend syncing / locally storing some schedule data on the frontend for future reference?
|
||
interface AddScheduleFriendsModalInteriorProps { | ||
user: User; | ||
existingData: string[] | User[]; |
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.
Can we add a Friends
type, defined as User[]
// hash every section to a color, but if that color is taken, try the next color in the | ||
// colors array. Only start reusing colors when all the colors are used. | ||
const getColor = (() => { | ||
const colors = [ |
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.
move to utils
delete newSchedule.id; | ||
return newSchedule; | ||
readOnly: false, | ||
primaryScheduleId: "-1", |
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.
is there a reason why primaryScheduleId
is a string?
newState.deletedSchedules.reduce( | ||
(acc, schedule) => acc || schedule === scheduleFromBackend.name, | ||
false | ||
) |
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.
find
foundSchedule.pushedToBackend && | ||
cloudUpdated >= foundSchedule.updated_at && | ||
foundSchedule.updated_at - cloudUpdated >= | ||
MIN_TIME_DIFFERENCE) |
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.
foundSchedule.updated_at - cloudUpdated
would always be negative and thus this if statement would always be false
?
TODO: @anshnagwekar @andyjiang3 remove reverse_func in doc_settings and potentially other places |
Primary updates:
|
No description provided.