-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix(aod): UI updates in announcement-of-death application #15827
Conversation
WalkthroughThe changes involve modifications to form structures and data handling within the application. Key alterations include the removal of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15827 +/- ##
=======================================
Coverage 36.97% 36.97%
=======================================
Files 6658 6658
Lines 135986 135986
Branches 38629 38631 +2
=======================================
+ Hits 50277 50279 +2
+ Misses 85709 85707 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (8)
- libs/application/templates/announcement-of-death/src/forms/done.ts (2 hunks)
- libs/application/templates/announcement-of-death/src/forms/draft/draft.ts (1 hunks)
- libs/application/templates/announcement-of-death/src/forms/draft/sectionOverview.ts (2 hunks)
- libs/application/templates/announcement-of-death/src/forms/draft/subSectionInfo.ts (2 hunks)
- libs/application/templates/announcement-of-death/src/forms/draft/subSectionInheritance.ts (2 hunks)
- libs/application/templates/announcement-of-death/src/forms/overviewSections.ts (11 hunks)
- libs/application/templates/announcement-of-death/src/lib/dataSchema.ts (2 hunks)
- libs/application/templates/announcement-of-death/src/lib/messages.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- libs/application/templates/announcement-of-death/src/forms/draft/draft.ts
Additional context used
Path-based instructions (7)
libs/application/templates/announcement-of-death/src/forms/draft/sectionOverview.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/forms/draft/subSectionInheritance.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/forms/done.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/forms/draft/subSectionInfo.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/lib/dataSchema.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/forms/overviewSections.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/lib/messages.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (11)
libs/application/templates/announcement-of-death/src/forms/draft/sectionOverview.ts (1)
Line range hint
10-34
: Review of property order and removal insectionOverview
.The reordering of properties (
properties
andfirearmApplicant
) seems logical and should enhance the clarity of the form's structure. However, the removal ofextraInfo
needs careful consideration to ensure that no essential information is lost.The reordering is approved.
Please verify that the removal of
extraInfo
does not omit necessary data that affects the form's functionality or user experience.libs/application/templates/announcement-of-death/src/forms/draft/subSectionInheritance.ts (1)
33-45
: Enhancements to inheritance confirmation insubSectionInheritance
.The addition of a description field and a checkbox for inheritance confirmation is a positive change, enhancing user interaction and clarity. Ensure that these fields integrate well with the rest of the form and that their data handling is consistent and complete.
The addition of new fields is approved.
Please verify the integration and data handling of these new fields to ensure they function as expected without issues.
libs/application/templates/announcement-of-death/src/forms/done.ts (1)
Line range hint
10-34
: Review ofextraInfo
removal indone
form.The removal of
extraInfo
from the form could simplify the interface but may also omit important information. It is crucial to ensure that this change does not negatively impact the form's functionality or user experience.Please verify that the removal of
extraInfo
does not omit necessary data that affects the form's functionality or user experience.libs/application/templates/announcement-of-death/src/forms/draft/subSectionInfo.ts (1)
9-9
: Import statement forremoveCountryCode
is correct.The import path and usage are appropriate for the
removeCountryCode
function.libs/application/templates/announcement-of-death/src/lib/dataSchema.ts (2)
8-8
: Import statement forYES
is correct.The import path and usage are appropriate for the
YES
constant.
123-123
: Enhanced validation logic forconfirmation
property is appropriate.The addition of the
confirmation
property with theYES
enum and a length constraint of 1 is a good practice for ensuring that the field contains the correct value.The changes to the
dataSchema
are approved as they enhance data validation and integrity.libs/application/templates/announcement-of-death/src/forms/overviewSections.ts (3)
7-7
: Import statement forYES
is correct.The import path and usage are appropriate for the
YES
constant.
249-300
: New fields in theproperties
section are correctly implemented.The addition of new fields for accounts, own business, residence, and assets abroad is well-implemented. The use of
buildKeyValueField
and conditional logic based on user answers ensures that the form dynamically adapts to user input.The changes to the
properties
section enhance the form's usability and are approved.
366-404
: Conditional logic for thefirearmApplicant
section is correctly implemented.The addition of a condition based on the
answers.hadFirearms
variable to display thefirearmApplicant
section is a good practice. It ensures that the form is tailored to the user's specific circumstances.The changes to the
firearmApplicant
section are approved as they enhance the form's adaptability and user experience.libs/application/templates/announcement-of-death/src/lib/messages.ts (2)
326-331
: Clear and informative message for inheritance confirmation.The message entry
inheritanceConfirmationDescription
provides detailed and clear instructions for the user, which is crucial for understanding the inheritance process.The code changes are approved.
332-337
: Effective confirmation message for user actions.The message entry
inheritanceConfirmation
effectively confirms that the user has entered all necessary information about heirs, enhancing user experience by providing clear feedback.The code changes are approved.
libs/application/templates/announcement-of-death/src/forms/draft/subSectionInfo.ts
Show resolved
Hide resolved
libs/application/templates/announcement-of-death/src/lib/messages.ts
Outdated
Show resolved
Hide resolved
Datadog ReportAll test runs ✅ 4 Total Test Services: 0 Failed, 4 Passed Test Services
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (7)
libs/application/templates/announcement-of-death/src/forms/draft/subSectionProperties.ts (1)
9-9
: Incomplete transition fromOtherPropertiesEnum
toPropertiesEnum
.The
OtherPropertiesEnum
is still present and used inlibs/application/templates/inheritance-report/src/types.ts
. Please review its usage to ensure that the transition toPropertiesEnum
is complete and consistent across the project, or clarify if both enums are intended to coexist.
libs/application/templates/inheritance-report/src/types.ts
: Definition and usage ofOtherPropertiesEnum
.Analysis chain
Correct import of
PropertiesEnum
.The import change from
OtherPropertiesEnum
toPropertiesEnum
is correctly implemented. Ensure that all references to the old enum are updated across the project.The code changes are approved.
Run the following script to verify the complete replacement of the old enum:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `OtherPropertiesEnum` is no longer used anywhere in the project. # Test: Search for the old enum usage. Expect: No occurrences. rg --type typescript 'OtherPropertiesEnum'Length of output: 77
Script:
#!/bin/bash # Description: Verify that `OtherPropertiesEnum` is no longer used anywhere in the project. # Test: Search for the old enum usage. Expect: No occurrences. rg --type ts 'OtherPropertiesEnum'Length of output: 225
libs/application/template-api-modules/src/lib/modules/templates/announcement-of-death/announcement-of-death.service.ts (4)
Line range hint
40-55
: Refine error handling indeathNotice
.The method correctly checks for the presence of a case number. Consider refining the error message to be more specific to the announcement of death context, rather than using a generic driving license error message.
- summary: coreErrorMessages.drivingLicenseNoTeachingRightsSummary, + summary: 'Specific error message related to announcement of death',
Line range hint
87-111
: Enhance logging inassignElectedPerson
.Consider adding more detailed logging to aid in debugging and monitoring, especially around the success or failure of the estate registrant change.
+ this.logger.debug('Attempting to change estate registrant', changeEstateParams); try { await this.syslumennService.changeEstateRegistrant( changeEstateParams.from, changeEstateParams.to, changeEstateParams.caseNumber, ); + } catch (e) { + this.logger.error('Failed to change estate registrant', e); return { success: false }; }
Line range hint
113-248
: RefactorsubmitApplication
for better maintainability.The method is complex and handles multiple scenarios. Consider refactoring to split the method into smaller, more focused methods to improve readability and maintainability.
Consider breaking down the method into smaller parts, such as handling different roles in separate methods or extracting the data preparation steps into a separate method.
15-15
: UpdateOtherPropertiesEnum
toPropertiesEnum
ininheritance-report
module.The
OtherPropertiesEnum
is still present in theinheritance-report
module. Ensure that this enum is updated toPropertiesEnum
to maintain consistency across the project.
- File:
libs/application/templates/inheritance-report/src/types.ts
- Occurrences:
- Enum declaration:
export enum OtherPropertiesEnum
- Usage:
otherProperties: OtherPropertiesEnum
Please update these references to use
PropertiesEnum
.Analysis chain
Update to
PropertiesEnum
noted.The change from
OtherPropertiesEnum
toPropertiesEnum
is noted. Ensure that all references to the old enum are updated across the project to maintain consistency.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `OtherPropertiesEnum` are updated to `PropertiesEnum`. # Test: Search for the old enum usage. Expect: No occurrences of the old enum. rg --type typescript $'OtherPropertiesEnum'Length of output: 77
Script:
#!/bin/bash # Description: Verify all references to `OtherPropertiesEnum` are updated to `PropertiesEnum`. # Test: Search for the old enum usage. Expect: No occurrences of the old enum. rg --type ts $'OtherPropertiesEnum'Length of output: 225
libs/application/templates/estate/src/types.ts (1)
15-17
: Incomplete Renaming of Enum DetectedThe enum
OtherPropertiesEnum
still exists in the codebase, specifically inlibs/application/templates/inheritance-report/src/types.ts
. Please ensure that all instances ofOtherPropertiesEnum
are updated toPropertiesEnum
to maintain consistency across the codebase.
- File:
libs/application/templates/inheritance-report/src/types.ts
- Action Required: Update
OtherPropertiesEnum
toPropertiesEnum
.Analysis chain
Enum Renaming and Expansion Approved
The renaming of
OtherPropertiesEnum
toPropertiesEnum
and the addition ofREAL_ESTATE
andVEHICLES
are correctly implemented. Ensure that all references to the old enum name are updated across the codebase.The changes to the enum are approved.
Run the following script to verify the enum usage:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `PropertiesEnum` and ensure no old references to `OtherPropertiesEnum` exist. # Test: Search for the old enum name. Expect: No occurrences. rg --type typescript $'OtherPropertiesEnum'Length of output: 77
Script:
#!/bin/bash # Description: Verify all references to `PropertiesEnum` and ensure no old references to `OtherPropertiesEnum` exist. # Search for the old enum name. Expect: No occurrences. rg 'OtherPropertiesEnum' # Search for the new enum name to ensure it's being used. rg 'PropertiesEnum'Length of output: 3766
libs/application/templates/announcement-of-death/src/types.ts (1)
15-17
: Incomplete Renaming of Enum DetectedThe enum
OtherPropertiesEnum
still exists inlibs/application/templates/inheritance-report/src/types.ts
, indicating that the renaming toPropertiesEnum
was not fully applied across the codebase. Please verify whether this is intentional or if further updates are needed to ensure consistency.
- File with Old Enum:
libs/application/templates/inheritance-report/src/types.ts
Please review and update the references as necessary.
Analysis chain
Enum Renaming and Expansion Approved
The renaming of
OtherPropertiesEnum
toPropertiesEnum
and the addition ofREAL_ESTATE
andVEHICLES
are correctly implemented. Ensure that all references to the old enum name are updated across the codebase.The changes to the enum are approved.
Run the following script to verify the enum usage:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `PropertiesEnum` and ensure no old references to `OtherPropertiesEnum` exist. # Test: Search for the old enum name. Expect: No occurrences. rg --type typescript $'OtherPropertiesEnum'Length of output: 77
Script:
#!/bin/bash # Corrected script to verify all references to `PropertiesEnum` and ensure no old references to `OtherPropertiesEnum` exist. # Search for the old enum name. Expect: No occurrences. rg 'OtherPropertiesEnum' # Search for the new enum name to verify its usage. rg 'PropertiesEnum'Length of output: 3766
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (6)
- libs/application/template-api-modules/src/lib/modules/templates/announcement-of-death/announcement-of-death.service.ts (3 hunks)
- libs/application/templates/announcement-of-death/src/forms/draft/subSectionProperties.ts (3 hunks)
- libs/application/templates/announcement-of-death/src/forms/overviewSections.ts (9 hunks)
- libs/application/templates/announcement-of-death/src/lib/messages.ts (2 hunks)
- libs/application/templates/announcement-of-death/src/types.ts (2 hunks)
- libs/application/templates/estate/src/types.ts (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- libs/application/templates/announcement-of-death/src/forms/overviewSections.ts
- libs/application/templates/announcement-of-death/src/lib/messages.ts
Additional context used
Path-based instructions (4)
libs/application/templates/announcement-of-death/src/forms/draft/subSectionProperties.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/estate/src/types.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/announcement-of-death/src/types.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/templates/announcement-of-death/announcement-of-death.service.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (4)
libs/application/templates/announcement-of-death/src/forms/draft/subSectionProperties.ts (1)
29-51
: Simplified property selection UI.The changes to the checkbox field options, aligning them with
PropertiesEnum
, simplify the UI and focus on essential property types. Verify that all necessary property types are included and correctly labeled.The code changes are approved.
Run the following script to verify the completeness and correctness of the property options:
libs/application/template-api-modules/src/lib/modules/templates/announcement-of-death/announcement-of-death.service.ts (1)
Line range hint
57-85
: Temporary use of dummy data noted.The method uses dummy data as a temporary solution. Ensure that this is addressed in future iterations as noted in the TODO comments.
The current implementation is approved, but future updates should remove the use of dummy data.
libs/application/templates/estate/src/types.ts (1)
55-55
: Type Update ApprovedThe update of the
Answers
type to usePropertiesEnum
is correctly implemented. Verify that this change aligns with the intended application logic, especially in forms and data processing areas.The changes to the
Answers
type are approved.Run the following script to verify the impact on the application logic:
Verification successful
Type Update Approved
The update of the
Answers
type to usePropertiesEnum
is consistent with its usage across the codebase, particularly in forms and services. This alignment suggests that the change is in line with the intended application logic.
- Files with
PropertiesEnum
usage:
libs/application/templates/estate/src/types.ts
libs/application/templates/announcement-of-death/src/forms/overviewSections.ts
libs/application/templates/announcement-of-death/src/forms/draft/subSectionProperties.ts
libs/application/template-api-modules/src/lib/modules/templates/announcement-of-death/announcement-of-death.service.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `PropertiesEnum` in the `Answers` type and its impact on application logic. # Test: Search for the usage of `PropertiesEnum` in the application logic. Expect: Correct alignment with new enum values. rg --type typescript $'PropertiesEnum'Length of output: 72
Script:
#!/bin/bash # Description: Verify the usage of `PropertiesEnum` in the `Answers` type and its impact on application logic. # Test: Search for the usage of `PropertiesEnum` in TypeScript files. Expect: Correct alignment with new enum values. rg --type ts 'PropertiesEnum'Length of output: 3560
libs/application/templates/announcement-of-death/src/types.ts (1)
55-55
: Type Update ApprovedThe update of the
Answers
type to usePropertiesEnum
is correctly implemented. Verify that this change aligns with the intended application logic, especially in forms and data processing areas.The changes to the
Answers
type are approved.Run the following script to verify the impact on the application logic:
Verification successful
Integration of
PropertiesEnum
VerifiedThe
PropertiesEnum
is consistently used across theannouncement-of-death
module, including in service logic and form sections. This indicates that the change fromOtherPropertiesEnum
toPropertiesEnum
is well-integrated into the application logic. Ensure that all related functionalities are tested to confirm alignment with the intended logic.
- Files Involved:
announcement-of-death.service.ts
overviewSections.ts
subSectionProperties.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `PropertiesEnum` in the `Answers` type and its impact on application logic. # Test: Search for the usage of `PropertiesEnum` in the application logic. Expect: Correct alignment with new enum values. rg --type typescript $'PropertiesEnum'Length of output: 72
Script:
#!/bin/bash # Corrected script to search for the usage of `PropertiesEnum` in TypeScript files. # Search for the usage of `PropertiesEnum` in the codebase. rg 'PropertiesEnum' --glob '*.ts' -A 3Length of output: 12758
…ges.ts Co-authored-by: kksteini <77672665+kksteini@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- libs/application/templates/announcement-of-death/src/lib/messages.ts (2 hunks)
Additional context used
Path-based instructions (1)
libs/application/templates/announcement-of-death/src/lib/messages.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (2)
libs/application/templates/announcement-of-death/src/lib/messages.ts (2)
326-331
: Approve the new message entryinheritanceConfirmationDescription
.The message entry provides detailed instructions for filling out information about all heirs, which enhances user guidance. Ensure that the markdown rendering is verified in the UI to maintain the intended formatting.
Please verify the markdown rendering in the UI to ensure it appears as intended.
332-337
: Approve the new message entryinheritanceConfirmation
.The message entry serves as a confirmation that the user has entered information about all heirs, which is crucial for the inheritance process. The message is clear and concise.
* fix(aod): minor updates in application flow * overview updates * change in properties setup * Update libs/application/templates/announcement-of-death/src/lib/messages.ts Co-authored-by: kksteini <77672665+kksteini@users.noreply.github.com> --------- Co-authored-by: kksteini <77672665+kksteini@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Checklist:
Summary by CodeRabbit
New Features
Improvements
extraInfo
section.Bug Fixes