-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…gn-review-calendar-get-user-schedule-settings-endpoint #2009 added get user schedule settings endpoint
- Loading branch information
Showing
7 changed files
with
115 additions
and
5 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
13 changes: 13 additions & 0 deletions
13
src/backend/src/transformers/user-schedule-settings.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,13 @@ | ||
import { Prisma } from '@prisma/client'; | ||
import { UserScheduleSettings } from 'shared'; | ||
|
||
const userScheduleSettingsTransformer = (settings: Prisma.Schedule_SettingsGetPayload<null>): UserScheduleSettings => { | ||
return { | ||
drScheduleSettingsId: settings.drScheduleSettingsId, | ||
personalGmail: settings.personalGmail, | ||
personalZoomLink: settings.personalZoomLink, | ||
availability: settings.availability | ||
}; | ||
}; | ||
|
||
export default userScheduleSettingsTransformer; |
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import { Role as PrismaRole, Theme, User as PrismaUser, User_Settings, User_Secure_Settings, Team } from '@prisma/client'; | ||
import { User as SharedUser } from 'shared'; | ||
import { | ||
Role as PrismaRole, | ||
Theme, | ||
User as PrismaUser, | ||
User_Settings, | ||
User_Secure_Settings, | ||
Team, | ||
Schedule_Settings | ||
} from '@prisma/client'; | ||
import { User as SharedUser, UserScheduleSettings } from 'shared'; | ||
|
||
export const batman: PrismaUser = { | ||
userId: 1, | ||
|
@@ -132,3 +140,25 @@ export const supermanWithUserSettings: PrismaUser & { userSettings: User_Setting | |
...supermanSettings | ||
} | ||
}; | ||
|
||
export const batmanScheduleSettings: Schedule_Settings = { | ||
drScheduleSettingsId: 'bmschedule', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/gotham', | ||
availability: [], | ||
userId: 69 | ||
}; | ||
|
||
export const batmanWithScheduleSettings: PrismaUser & { scheduleSettings: Schedule_Settings } = { | ||
...batman, | ||
scheduleSettings: { | ||
...batmanScheduleSettings | ||
} | ||
}; | ||
|
||
export const batmanUserScheduleSettings: UserScheduleSettings = { | ||
drScheduleSettingsId: 'bmschedule', | ||
personalGmail: '[email protected]', | ||
personalZoomLink: 'https://zoom.us/j/gotham', | ||
availability: [] | ||
}; |
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