Skip to content
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

#135 [FEAT]: Endpoints for protocol grouped answers #136

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

IosBonaldi
Copy link
Contributor

This pull request includes significant changes to the prisma/schema.prisma file and several controllers in the src/controllers directory to introduce new features and improve the handling of application answers. The most important changes include adding new enums and fields, modifying existing models, and updating controller logic to handle the new fields and enums.

Schema Updates:

  • Added new enums GUEST to UserRole and AUTHENTICATED to VisibilityMode in prisma/schema.prisma. [1] [2]
  • Added approved field to ApplicationAnswer model and replaced addressId with coordinateId to link to a new Coordinate model.
  • Added keepLocation field to Application model.
  • Introduced a new Coordinate model to store latitude and longitude data.

Controller Updates:

  • Updated applicationAnswerController.ts to handle the new approved field and coordinate model, including logic for creating and updating application answers with coordinates. [1] [2] [3] [4] [5] [6]
  • Added approveApplicationAnswer function to applicationAnswerController.ts to allow specific users to approve application answers.
  • Updated applicationController.ts to include the keepLocation field in application creation and update processes, and to filter answers based on approval status and user permissions. [1] [2] [3] [4] [5] [6] [7] [8] [9]

These changes enhance the application's ability to handle more complex data relationships and improve the user experience by introducing new features and refining existing functionalities.

@IosBonaldi IosBonaldi self-assigned this Jan 20, 2025
@IosBonaldi IosBonaldi linked an issue Jan 20, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Endpoints for protocol grouped answers
1 participant