-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat: add voyage project submission status to /me
endpoint
#158
Conversation
…ity and response fix(users): update user object with sprintCheckInIds and projectStatus The migration.sql file adds a new column "projectSubmitted" to the VoyageTeam table in the database. This column is set to a default value of false. The schema.prisma file is updated to include the new "projectSubmitted" field in the VoyageTeam model. The users.select.ts file is modified to include the "projectSubmitted" field in the select query for private user details. The team.entity.ts file is updated to include the "projectSubmitted" field in the VoyageTeamEntity class. The users.response.ts file is modified to include the "projectSubmitted" field in the VoyageTeam class. The users.service.ts file is updated to fetch the "projectSubmitted" field from the database and update the user object with the sprintCheckInIds and projectStatus. These changes are done to support the functionality of tracking whether a project has been submitted by a VoyageTeam. The "projectSubmitted" field allows for easy retrieval of this information and the updated user object provides the necessary data for displaying the project status to the user.
…point The `/me` endpoint now includes the voyage project submission status. This change was made to provide users with information about the status of their voyage project submission.
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.
we won't need projectSubmitted in the database as we can tell if the team has submitted the project if they have a record in the formResponseVoyageProject
table
another thing is voyageTeam and teamMemberId are in user.req
so we can save 2 two extra db calls
…Team entity and response" This reverts commit 8f68cb6.
…UserDetailSelect The FormResponseVoyageProject field is added to the privateUserDetailSelect object. This change allows the private user details to include the FormResponseVoyageProject field when selecting user data.
…ser object feat(users.service.ts): update user object with sprintCheckInIds and modify voyageTeamMembers based on project submission status The code now includes a check for the existence of the user before updating the user object. This prevents any potential errors when trying to update a non-existent user. The user object is then updated with the sprintCheckInIds. Additionally, the voyageTeamMembers are modified based on the project submission status. If the team member has a voyage team with a FormResponseVoyageProject, the projectSubmitted property is set to true. Otherwise, it is set to false.
Ok, I was able to check and modify the voyageTeam with the |
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.
thanks, this is perfect
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.
Everything looks great ! The Swagger responses are functioning as expected.
The console.log statement was removed as it was not providing any useful information and was cluttering the code.
Description
Features and Fixes
feat(users): Added support for the
projectSubmitted
field in the VoyageTeam entity and response.fix(users): Updated the user object with sprintCheckInIds and projectStatus.
Summary of Changes
Database Changes:
Added a new column
projectSubmitted
to theVoyageTeam
table with a default value of false.Updated
schema.prisma
to include the newprojectSubmitted
field in theVoyageTeam
model.Backend Modifications:
Updated
users.select.ts
to include theprojectSubmitted
field in the select query for private user details.Updated
team.entity.ts
to include theprojectSubmitted
field in theVoyageTeamEntity
class.Modified
users.response.ts
to include theprojectSubmitted
field in theVoyageTeam
class.Updated
users.service.ts
to fetch theprojectSubmitted
field from the database and update the user object with the sprintCheckInIds and projectStatus.Issue link
closes Add voyage project submission status in
/me
endpointType of change
How Has This Been Tested?
Testing can be done by inspecting the response for the
/me
endpoint in swagger for the field.It would be either "True" or "False".Checklist: