Change relationship of team members and bookings to many-to-many#6553
Closed
joeauyeung wants to merge 38 commits intomainfrom
Closed
Change relationship of team members and bookings to many-to-many#6553joeauyeung wants to merge 38 commits intomainfrom
joeauyeung wants to merge 38 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
|
Just to be sure. What problem is this PR solving specifically? |
This reverts commit 606e538. # Conflicts: # packages/prisma/schema.prisma
fa37ec8 to
681b6f4
Compare
zomars
suggested changes
Feb 8, 2023
Contributor
zomars
left a comment
There was a problem hiding this comment.
Will block to address some questions. Maybe I'm missing some context on why this PR is necessary as well. But still I cannot merge a PR that I cannot understand yet.
| appId String? | ||
| destinationCalendars DestinationCalendar[] | ||
| invalid Boolean? @default(false) | ||
| bookingReferences BookingReference[] |
| externalCalendarId String? | ||
| deleted Boolean? | ||
| credentialId Int? | ||
| credential Credential? @relation(fields: [credentialId], references: [id]) |
| id Int @id @default(autoincrement()) | ||
| uid String @unique | ||
| user User? @relation(fields: [userId], references: [id]) | ||
| user User[] |
Contributor
There was a problem hiding this comment.
Some observations:
- Are we trying to keep track of attendees here?
- How do we differentiate between an owner and attendee?
- What does it means that a Booking has a ´user´?
| name: booking.user.name || "", | ||
| email: booking.user.email, | ||
| timeZone: booking.user.timeZone, | ||
| language: { locale: booking.user[0]?.locale || "" }, |
Contributor
There was a problem hiding this comment.
I'm not a fan of polluting with ´booking.user[0]´ everywhere. It is not legible. Let's either set a constant (const organizer = booking.user[0]) or rethink where to save the organizer.
Contributor
Author
|
Closing for now and reevaluate at a later date. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR changes the relationship between team members and bookings to a many-to-many relationship. This should help with future bug fixes and features surrounding teams.
Fixes #6582
TODO:
Ensure that all features involving team members and bookings are working correctly
workflows.tsxEnvironment: Staging(main branch) / Production
Type of change
Checklist