Skip to content

Conversation

Parth097
Copy link

This pull request introduces functionality to handle updated privacy policy acceptance, modifies modal behavior, and includes related updates to types, constants, and tests. The key changes are grouped below:

Privacy Policy Update Handling:

  • Added a new PolicyUpdateModal component to prompt users to accept the updated privacy policy. The modal is non-closeable and includes a button to record acceptance (src/app/components/elements/modals/PolicyUpdateModal.tsx).
  • Introduced a middleware check to display the PolicyUpdateModal when the user has not accepted the updated privacy policy or their acceptance time is outdated (src/app/state/middleware/notificationManager.ts).
  • Added a new API endpoint updatePrivacyPolicyAcceptedTime to record the timestamp when the user accepts the privacy policy (src/app/services/api.ts).

Type and Constant Updates:

  • Updated RegisteredUserDTO and UserSummaryDTO to include the privacyPolicyAcceptedTime field (src/IsaacApiTypesAutoGenerated.tsx). [1] [2]
  • Added USER_PRIVACY_POLICY_UPDATE_* action types and corresponding actions to handle privacy policy updates (src/app/services/constants.ts, src/app/state/actions/index.tsx). [1] [2]
  • Defined a constant POLICY_UPDATE_TIME to track the last privacy policy update date (src/app/components/elements/modals/inequality/constants.ts).

Modal Behavior Enhancements:

  • Updated the ActiveModal component to respect the isCloseable property, preventing modals from being closed if set to false (src/app/components/elements/modals/ActiveModal.tsx). [1] [2]
  • Extended the ActiveModal type to include the isCloseable property (src/IsaacAppTypes.tsx).

Test Adjustments:

  • Modified tests for the NotificationModal to account for the removal of the close button in non-closeable modals (src/test/components/elements/modals/NotificationModal.test.tsx). [1] [2] [3] [4]

These changes ensure that users are prompted to accept updated privacy policies in a seamless and enforceable manner, while also improving modal behavior and maintaining test coverage.

Parth097 added 2 commits July 28, 2025 14:03
…roken test. Connected the button to an api end point to recieve the data
Copy link

github-actions bot commented Jul 28, 2025

Lines Statements Branches Functions
Coverage: 51%
51.28% (8945/17441) 34.32% (4313/12566) 40.37% (1495/3703)

@Parth097 Parth097 marked this pull request as ready for review July 28, 2025 13:27
Copy link

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.

4 participants