[x] The title includes the type of change [HOTFIX, FEATURE, etc]
[x] The PR title includes the ticket number in format of [NRPTI-###]
[x] Documentation is updated to reflect change
Description
In order to sure that records always display the most current act name without developer intervention, an intermediate value that is mapped to the most up-to-date value is attached to the records instead of the actual value.
This PR includes the following proposed change(s):
a migration that updates all records with the actName "Energy Resource Activities Act" to instead have their actName = "ACT_103"
updated the front end to check if a record has a code or the actual name. If a code, translate it to the actual value for displaying.
updated the front end so that search filters can can appropriately catch results with either the actual value or the appropriate code.
updated the 'add record' functionality so that all records added using it are written with the code instead of the actual value.
updated the data structure that the front end uses to access all legislation values from {actName: [regulations]} TO {actCode : { actName, [regulations] } } and refactored related functions to handle this new structure.
Context for PR review :
There are many files changed in this PR (44?!) , BUT most of them are identical changes.
All the add-edit components have been updated to write the intermediate code rather than the actual act name
All the record detail components have been updated to pass the service that can translate the intermediate code down to the utility that builds all the legislation details (including act name) that are displayed when viewing a record.
angular/projects/common/src/app/utils/utils.ts is where that service gets used to translate a code into a name
angular/projects/admin-nrpti/src/app/records/records-resolver.ts is where the actCode is added alongside the actName when building a search query. This makes it so searches for an act name return records with the intermediate code in place of the actual act name
the data-services are what need to be refactored to handle the restructured code-to-legislation data
Also, while the commit history seems daunting, it includes commits from the PR that this work is based on. As that PR has been merged in, the changes don't show up in files changed. Only the last 8-10 commits are for this ticket, starting from 2 weeks ago
Pull Request Standards
HOTFIX
,FEATURE
,etc
][NRPTI-###]
Description
In order to sure that records always display the most current act name without developer intervention, an intermediate value that is mapped to the most up-to-date value is attached to the records instead of the actual value.
This PR includes the following proposed change(s):
Context for PR review :
There are many files changed in this PR (44?!) , BUT most of them are identical changes.
Also, while the commit history seems daunting, it includes commits from the PR that this work is based on. As that PR has been merged in, the changes don't show up in files changed. Only the last 8-10 commits are for this ticket, starting from 2 weeks ago