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

GN-4509: only prefill address municipality if logged in user is part of a municipality/OCMW #576

Conversation

elpoelma
Copy link
Contributor

@elpoelma elpoelma commented Sep 11, 2023

Overview

This PR ensures that the municipality field of the edit-address card is only prefilled when the current user is part of a municipality or OCMW. The code in this PR checks if the currently logged in user has one of the two following classification codes:

connected issues and PRs:

GN-4509

How to test/reproduce

  • Log in as a municipality/OCMW (e.g. Aalst)

  • Notice that when trying to edit a newly inserted address, the municipality field is prefilled with the municipality name

  • Log in as as an administrative unit which is not linked to a municipality (e.g. Vlaams-Brabant)

  • Notice that when trying to edit a newly inserted address, the municipality field is empty

Checks PR readiness

  • UI: works on smaller screen sizes
  • UI: feedback for any loading/error states
  • Check cancel/go-back flows
  • Check database state correct when deleting/updating (especially regarding relationships)
  • changelog
  • npm lint
  • no new deprecations

@elpoelma elpoelma added the bug Something isn't working label Sep 11, 2023
@elpoelma elpoelma requested a review from abeforgit September 11, 2023 11:43
@elpoelma elpoelma self-assigned this Sep 11, 2023
Copy link
Contributor

@dkozickis dkozickis left a comment

Choose a reason for hiding this comment

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

Tested, works 🙏

…ty-should-only-be-prefilled-when-logged-in-user-is-a-municipality
@elpoelma elpoelma changed the title GN-4509: only prefill address municipality if logged in user is part of a muncipality/OCMW GN-4509: only prefill address municipality if logged in user is part of a municipality/OCMW Sep 15, 2023
@elpoelma elpoelma merged commit cb06b4f into master Sep 15, 2023
@elpoelma elpoelma deleted the GN-4509-address-variable-plugin-municipality-should-only-be-prefilled-when-logged-in-user-is-a-municipality branch September 15, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants