-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/foreldreansvar symmetrisk (#3572)
* Add 'ansvarssubjekt' field to foreldreansvar in GraphQL query #deploy-person-service This update introduces the 'ansvarssubjekt' field to the 'foreldreansvar' section of the GraphQL query. It ensures that additional responsibility data can be queried, enhancing the comprehensiveness of parental responsibility information available. * Refactor ForeldreansvarService to improve relationship handling #deploy-test-pdl-forvalter Added methods to delete parent-child relations when necessary and updated method signatures to include hovedperson's ID. Enhanced ForeldreansvarDTO with utility methods to filter non-applicable relations, ensuring correct deployment and more robust relation management. * Refactor ForeldreansvarService to streamline logic #deploy-test-pdl-forvalter Simplified relationship handling by refining loops and conditions for parent-child associations. Added helper methods to manage related responsibilities and ensured consistent updates across all foreldreansvar scenarios. * Refactor ForeldreansvarService to streamline logic #deploy-test-pdl-forvalter Simplified relationship handling by refining loops and conditions for parent-child associations. Added helper methods to manage related responsibilities and ensured consistent updates across all foreldreansvar scenarios. * Update unit tests for ForeldreansvarService #deploy-test-pdl-forvalter Updated test cases to use specific identifiers for PersonDTO instances. Ensured validation logic accounts for the required relationship checks in various scenarios. Simplified identifier handling for more predictable test outcomes. * Add 'Ansvarssubjekt' field to PdlForeldreansvar components Introduced the 'Ansvarssubjekt' field to both PdlForeldreansvar and Foreldreansvar components. This change ensures that the 'ansvarssubjekt' property is displayed in the frontend for clarity. Tested and verified that the new field displays the correct data. * Update relational deletion logic for existing persons #deploy-test-pdl-forvalter Enhance deletion utility to remove specific relationships for existing persons by filtering out related entities. Added tests to ensure correct removal of 'forelderBarnRelasjon' and 'foreldreansvar' relationships for existing entities. * Update relational deletion logic for existing persons #deploy-test-pdl-forvalter Enhanced the deletion utility to correctly handle specific relationships for existing persons by removing the redundant filtering process. Revised logic ensures proper removal of 'forelderBarnRelasjon' and 'foreldreansvar' relationships. * Refactor foreldreansvar handler functions #deploy-test-pdl-forvalter Simplified logic by merging `handle` and `handleBarn` methods in `ForeldreansvarService`. Updated relevant method calls and cleaned up redundant conditional checks. This reduces code duplication and increases maintainability. * Refactor relationship handling in person services #deploy-test-pdl-forvalter Simplified relationship handling by consolidating similar logic paths and removing redundant checks. Added `standalone` attribute to `PersonDTO` to streamline checks for isolated persons. This improves code maintainability and readability across the service classes. * Update validation rules and UI labels #deploy-test-frontend Enhanced validation in familierelasjoner.tsx with conditions based on 'personFoerLeggTil' context and added a rule for 'typeAnsvarlig'. Updated labels in multiple files to provide clearer context, especially for 'Ansvarssubjekt (barnet)'. Adjusted UI logic to remove redundant checks in VisningRedigerbar. * deploy #deploy-test-frontend * deploy #deploy-test-pdl-forvalter * Change visibility of validateBarn method #deploy-test-pdl-forvalter Changed the validateBarn method from public to private in ForeldreansvarService. This encapsulates the method, ensuring it can only be accessed within the class. * Replace isNull with isBlank for ansvarlig Updated ForeldreansvarService to use isBlank instead of isNull for checking the ansvarlig field. This change ensures that empty strings are properly handled alongside null values, preventing potential validation issues related to ansvarlig entries.
- Loading branch information
Showing
20 changed files
with
341 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.