-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2215 from Northeastern-Electric-Racing/2136-desig…
…n-review-calendar-design-review-edit-page #2136 finalize design review modal
- Loading branch information
Showing
21 changed files
with
665 additions
and
199 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
19 changes: 19 additions & 0 deletions
19
src/backend/src/transformers/designReviewUser.transformer.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Prisma } from '@prisma/client'; | ||
import { UserWithScheduleSettings } from 'shared'; | ||
import userScheduleSettingsTransformer from './user-schedule-settings.transformer'; | ||
|
||
const userWithScheduleSettingsTransformer = ( | ||
user: Prisma.UserGetPayload<{ include: { drScheduleSettings: true } }> | ||
): UserWithScheduleSettings => { | ||
return { | ||
userId: user.userId, | ||
firstName: user.firstName, | ||
lastName: user.lastName, | ||
email: user.email, | ||
emailId: user.emailId, | ||
role: user.role, | ||
scheduleSettings: user.drScheduleSettings ? userScheduleSettingsTransformer(user.drScheduleSettings) : undefined | ||
}; | ||
}; | ||
|
||
export default userWithScheduleSettingsTransformer; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,18 @@ export const prismaDesignReview1: Prisma.Design_ReviewGetPayload<typeof designRe | |
wbsElementId: 1, | ||
requiredMembers: [batman], | ||
optionalMembers: [], | ||
confirmedMembers: [batman], | ||
confirmedMembers: [ | ||
{ | ||
...batman, | ||
drScheduleSettings: { | ||
drScheduleSettingsId: '123', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/123456789', | ||
availability: [1, 2, 3], | ||
userId: 1 | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [batman], | ||
userDeleted: null, | ||
|
@@ -90,7 +101,18 @@ export const prismaDesignReview2: Prisma.Design_ReviewGetPayload<typeof designRe | |
userCreated: wonderwoman, | ||
requiredMembers: [wonderwoman], | ||
optionalMembers: [], | ||
confirmedMembers: [wonderwoman], | ||
confirmedMembers: [ | ||
{ | ||
...wonderwoman, | ||
drScheduleSettings: { | ||
drScheduleSettingsId: '123', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/123456789', | ||
availability: [1, 2, 3], | ||
userId: 1 | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [wonderwoman], | ||
userDeleted: null, | ||
|
@@ -117,7 +139,18 @@ export const prismaDesignReview3: Prisma.Design_ReviewGetPayload<typeof designRe | |
userCreated: batman, | ||
requiredMembers: [batman], | ||
optionalMembers: [], | ||
confirmedMembers: [batman], | ||
confirmedMembers: [ | ||
{ | ||
...batman, | ||
drScheduleSettings: { | ||
drScheduleSettingsId: '123', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/123456789', | ||
availability: [1, 2, 3], | ||
userId: 1 | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [batman], | ||
userDeleted: null, | ||
|
@@ -145,7 +178,18 @@ export const prismaDesignReview5: Prisma.Design_ReviewGetPayload<typeof designRe | |
wbsElementId: 1, | ||
requiredMembers: [batman], | ||
optionalMembers: [wonderwomanWithScheduleSettings], | ||
confirmedMembers: [batman], | ||
confirmedMembers: [ | ||
{ | ||
...batman, | ||
drScheduleSettings: { | ||
drScheduleSettingsId: 'bmschedule', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/gotham', | ||
availability: [], | ||
userId: 69 | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [wonderwoman], | ||
userDeleted: null, | ||
|
@@ -169,7 +213,17 @@ export const designReview3: DesignReview = { | |
wbsNum: { carNumber: 1, projectNumber: 2, workPackageNumber: 0 }, | ||
requiredMembers: [sharedBatman], | ||
optionalMembers: [], | ||
confirmedMembers: [sharedBatman], | ||
confirmedMembers: [ | ||
{ | ||
...sharedBatman, | ||
scheduleSettings: { | ||
drScheduleSettingsId: '123', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/123456789', | ||
availability: [1, 2, 3] | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [sharedBatman], | ||
userDeleted: undefined, | ||
|
@@ -187,7 +241,17 @@ export const sharedDesignReview1: SharedDesignReview = { | |
isInPerson: false, | ||
requiredMembers: [sharedBatman], | ||
optionalMembers: [], | ||
confirmedMembers: [sharedBatman], | ||
confirmedMembers: [ | ||
{ | ||
...sharedBatman, | ||
scheduleSettings: { | ||
drScheduleSettingsId: '123', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/123456789', | ||
availability: [1, 2, 3] | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [sharedBatman], | ||
teamType: teamType1, | ||
|
@@ -207,7 +271,17 @@ export const designReview5: DesignReview = { | |
isInPerson: false, | ||
requiredMembers: [], | ||
optionalMembers: [wonderwomanMarkedWithScheduleSettings], | ||
confirmedMembers: [sharedBatman], | ||
confirmedMembers: [ | ||
{ | ||
...sharedBatman, | ||
scheduleSettings: { | ||
drScheduleSettingsId: 'bmschedule', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/gotham', | ||
availability: [] | ||
} | ||
} | ||
], | ||
deniedMembers: [], | ||
attendees: [wonderwoman], | ||
wbsName: 'car', | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.