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

✨ [#246] Add is_standaard_adres for DigitaalAdres #269

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

stevenbal
Copy link
Collaborator

@stevenbal stevenbal commented Oct 17, 2024

Fixes #246

Changes

  • Add is_standaard_adres for DigitaalAdres

@stevenbal stevenbal marked this pull request as draft October 17, 2024 15:04
@stevenbal stevenbal force-pushed the feature/246-default-address branch from e9eabe8 to b139ff3 Compare October 18, 2024 07:51
@stevenbal stevenbal marked this pull request as ready for review October 18, 2024 08:11
@stevenbal stevenbal force-pushed the feature/246-default-address branch from b139ff3 to c93f378 Compare October 24, 2024 09:14
Copy link
Contributor

@bart-maykin bart-maykin left a comment

Choose a reason for hiding this comment

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

You should also change the validation for the voorkeur digitaal adress to only allow these default addresses. Because I don't see a scenario where this would be wanted behavior.

@stevenbal
Copy link
Collaborator Author

@bart-maykin @joeribekker hmm you're right, though upon looking at this again, I don't know if what I implemented here makes sense to begin with actually, because with the current logic there can only be three default addresses in total (one for each type). Should I add the betrokkene and partij to the condition in the unique constraint as well?

@joeribekker
Copy link
Member

refinement: So, Partij should be included in the unique check.

We should allow something like this, where preference is not necessarily a default option (this should be enforced by the client app if needed).

default = per type, per party
preference = overall preferred option, for a party

a. email: [email protected] (default, preference)
b. email: [email protected]
c. phone: 01234567890 (default)
d. phone: 09876544321

@stevenbal stevenbal force-pushed the feature/246-default-address branch from c93f378 to c47e98a Compare October 31, 2024 08:40
@stevenbal
Copy link
Collaborator Author

You should also change the validation for the voorkeur digitaal adress to only allow these default addresses. Because I don't see a scenario where this would be wanted behavior.

this was discussed on monday and as Joeri mentioned, we will not enforce this but leave it to client applications to enforce this if needed

@stevenbal stevenbal marked this pull request as ready for review October 31, 2024 08:42
@stevenbal stevenbal marked this pull request as draft November 1, 2024 14:17
@stevenbal stevenbal force-pushed the feature/246-default-address branch from c47e98a to 33ccbd7 Compare November 8, 2024 14:04
@stevenbal stevenbal marked this pull request as ready for review November 8, 2024 14:04
@stevenbal
Copy link
Collaborator Author

@annashamray this PR is ready for review.

I was working on splitting DigitaalAdres (#277) into two separate resources (one linked to Partij and one to Betrokkene), but as we talked about on slack we should probably discuss this next week, since it would be a breaking change

@stevenbal stevenbal force-pushed the feature/246-default-address branch from 33ccbd7 to 1eb0343 Compare November 8, 2024 14:07
@stevenbal stevenbal force-pushed the feature/246-default-address branch from 1eb0343 to 8076b6a Compare November 21, 2024 15:22
@stevenbal stevenbal merged commit f37d5a2 into master Nov 22, 2024
25 checks passed
@stevenbal stevenbal deleted the feature/246-default-address branch November 22, 2024 09:00
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.

Store default address per 'soort digitaal adres'
4 participants