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

✨(dashboard) add signals on delivery point creation #307

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

ssorin
Copy link
Collaborator

@ssorin ssorin commented Dec 19, 2024

Purpose

When a new delivery point is created, the associated consent must be automatically created as awaiting consent.

Proposal

  • Implemented a signal to automatically create a Consent object when a new DeliveryPoint is saved.
  • Added and updated corresponding tests to ensure functionality.
  • Centralized consent end date logic in a new app settings file (CONSENT_END_DATE) and updated all related signals, factories, and tests to use it.
  • Updated documentation and code comments to reflect these changes.

@ssorin ssorin added feature needs review dashboard Item related to the Dashboard service labels Dec 19, 2024
@ssorin ssorin requested a review from jmaupetit December 19, 2024 13:21
@ssorin ssorin self-assigned this Dec 19, 2024
@ssorin ssorin force-pushed the feature/dashboard/add-consent-signals branch from cd543e6 to bc33710 Compare December 19, 2024 13:35
@ssorin ssorin marked this pull request as ready for review December 19, 2024 13:36
Copy link
Member

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know that signals management evolved since I used them!

src/dashboard/apps/consent/app_settings.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/app_settings.py Outdated Show resolved Hide resolved
src/dashboard/apps/core/tests/test_models.py Outdated Show resolved Hide resolved
src/dashboard/readme.md Outdated Show resolved Hide resolved
@ssorin ssorin force-pushed the feature/dashboard/add-consent-signals branch 5 times, most recently from f028777 to 0df1e8b Compare December 20, 2024 11:40
src/dashboard/apps/consent/utils.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/utils.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/utils.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/tests/test_utils.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/models.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/models.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/utils.py Outdated Show resolved Hide resolved
@ssorin ssorin force-pushed the feature/dashboard/add-consent-signals branch from 0df1e8b to e18d9df Compare December 20, 2024 14:29
Copy link
Member

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have minor remarks to refine tests! Keep it up! 💪

src/dashboard/apps/consent/tests/test_models.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/tests/test_signals.py Outdated Show resolved Hide resolved
@ssorin ssorin force-pushed the feature/dashboard/add-consent-signals branch 2 times, most recently from 92936b5 to 9fd7a85 Compare January 8, 2025 09:37
src/dashboard/dashboard/settings.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/tests/test_signals.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/tests/test_models.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/tests/test_models.py Outdated Show resolved Hide resolved
@ssorin ssorin force-pushed the feature/dashboard/add-consent-signals branch from 9fd7a85 to fd5c01c Compare January 8, 2025 15:56
Copy link
Member

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented a signal to automatically create a Consent object when a new DeliveryPoint is saved.
Added corresponding tests to ensure functionality and updated related Pipfile dependencies.
Centralized consent end date logic in a new app settings file (CONSENT_END_DATE) and updated all related signals, factories, and tests to use it.
Updated documentation and code comments to reflect these changes.
@ssorin ssorin force-pushed the feature/dashboard/add-consent-signals branch from fd5c01c to 2149df1 Compare January 8, 2025 16:19
@ssorin ssorin merged commit cd73773 into main Jan 8, 2025
10 checks passed
@ssorin ssorin deleted the feature/dashboard/add-consent-signals branch January 8, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Item related to the Dashboard service feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants