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

fix(inheritance-report): EFS finalizing changes #14867

Merged
merged 19 commits into from
May 23, 2024
Merged

Conversation

albinagu
Copy link
Member

@albinagu albinagu commented May 21, 2024

Feature branch: https://efsdebtsandfuneralcost-beta.dev01.devland.is/umsoknir/erfdafjarskyrsla

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Restructured rendering logic in the CalculateShare component for more streamlined display.
    • Added a new funeralCost calculation to the CalculateTotalDebts component.
    • Enhanced form sections related to debts and funeral costs with new fields and components.
    • Introduced file upload functionality for heirs' additional information.
  • Bug Fixes

    • Improved error handling in the HeirsAndPartitionRepeater component.
  • Enhancements

    • Updated message IDs, default messages, and descriptions for better clarity in the UI.
    • Renamed and reorganized form sections for a more intuitive user experience.
  • Refactor

    • Renamed key interfaces and properties for consistency and clarity.

@albinagu albinagu added the deploy-feature Deploys features to dev label May 21, 2024
Copy link
Contributor

coderabbitai bot commented May 21, 2024

Walkthrough

The changes across various components and files aim to enhance the inheritance report application by integrating funeral costs into total debts calculation, improving error handling, and refining the form structure and user experience. These updates include adding new fields and components, reorganizing sections, and updating messages and types to support the application's enhancements.

Changes

Files Change Summary
libs/application/templates/inheritance-report/src/fields/CalculateShare/index.tsx Restructured rendering logic in CalculateShare component for conditional display of share total.
libs/application/templates/inheritance-report/src/fields/CalculationsOfTotal/CalculateTotalDebts/index.tsx Added funeralCost calculation to CalculateTotalDebts component.
libs/application/templates/inheritance-report/src/fields/HeirsAndPartitionRepeater/index.tsx Updated error handling logic in HeirsAndPartitionRepeater component.
libs/application/templates/inheritance-report/src/forms/form.ts Replaced debts with debtsAndFuneralCost, updated form object.
libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts Renamed funeralCost section, added new fields and components, updated data handling functions.
libs/application/templates/inheritance-report/src/forms/sections/heirs.ts Added buildFileUploadField for file uploads related to heirs.
libs/application/templates/inheritance-report/src/forms/sections/preSelection.ts Modified title property of a select field.
libs/application/templates/inheritance-report/src/lib/messages.ts Updated message IDs, default messages, and descriptions for various keys.
libs/application/templates/inheritance-report/src/types.ts Renamed interface, adjusted properties, and updated interfaces for debts.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@datadog-island-is
Copy link

datadog-island-is bot commented May 21, 2024

Datadog Report

All test runs 10e8680 🔗

4 Total Test Services: 0 Failed, 4 Passed
🔻 Test Sessions change in coverage: 1 decreased (-0.01%), 6 no change

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
api 0 0 0 4 0 3.35s 1 no change Link
application-system-api 0 0 0 122 2 3m 23.14s 1 no change Link
application-template-api-modules 0 0 0 109 0 2m 19.15s 1 decreased (-0.01%) Link
application-ui-shell 0 0 0 74 0 1m 6.36s 1 no change Link

🔻 Code Coverage Decreases vs Default Branch (1)

  • application-template-api-modules - jest 26.24% (-0.01%) - Details

Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 35 lines in your changes are missing coverage. Please review.

Project coverage is 36.96%. Comparing base (aeb167f) to head (b68fb55).

Current head b68fb55 differs from pull request most recent head 0795d12

Please upload reports for the commit 0795d12 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #14867      +/-   ##
==========================================
- Coverage   37.07%   36.96%   -0.12%     
==========================================
  Files        6351     6330      -21     
  Lines      129276   129104     -172     
  Branches    36920    36845      -75     
==========================================
- Hits        47928    47722     -206     
- Misses      81348    81382      +34     
Flag Coverage Δ
api 3.48% <ø> (ø)
application-system-api 41.95% <ø> (+<0.01%) ⬆️
application-template-api-modules 24.39% <ø> (+0.02%) ⬆️
application-templates-inheritance-report 3.96% <0.00%> (+<0.01%) ⬆️
application-ui-shell 21.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...heritance-report/src/fields/OverviewAssets/rows.ts 0.00% <ø> (ø)
...eport/src/forms/OverviewSections/OverviewAssets.ts 0.00% <ø> (ø)
...ion/templates/inheritance-report/src/forms/form.ts 0.00% <ø> (ø)
...es/inheritance-report/src/forms/sections/assets.ts 0.00% <ø> (ø)
...tes/inheritance-report/src/forms/sections/heirs.ts 0.00% <ø> (ø)
...eritance-report/src/forms/sections/preSelection.ts 0.00% <ø> (ø)
...n/templates/inheritance-report/src/lib/messages.ts 0.00% <ø> (ø)
...ritance-report/src/fields/CalculateShare/index.tsx 0.00% <0.00%> (ø)
.../CalculationsOfTotal/CalculateTotalDebts/index.tsx 0.00% <0.00%> (ø)
...e-report/src/fields/ReportFieldsRepeater/index.tsx 0.00% <0.00%> (ø)
... and 3 more

... and 65 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aeb167f...0795d12. Read the comment docs.

Copy link
Contributor

Affected services are: api,application-system-api,application-system-form,

@albinagu albinagu changed the title fix(inheritance-report): Debts and funeral cost fix(inheritance-report): EFS finalizing changes May 22, 2024
@albinagu albinagu marked this pull request as ready for review May 22, 2024 14:26
@albinagu albinagu requested a review from a team as a code owner May 22, 2024 14:26
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between d97292b and 8f473b1.
Files selected for processing (8)
  • libs/application/templates/inheritance-report/src/fields/CalculationsOfTotal/CalculateTotalDebts/index.tsx (1 hunks)
  • libs/application/templates/inheritance-report/src/fields/HeirsAndPartitionRepeater/index.tsx (2 hunks)
  • libs/application/templates/inheritance-report/src/forms/form.ts (2 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts (3 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/heirs.ts (2 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/preSelection.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/lib/messages.ts (6 hunks)
  • libs/application/templates/inheritance-report/src/types.ts (2 hunks)
Files skipped from review due to trivial changes (1)
  • libs/application/templates/inheritance-report/src/forms/sections/preSelection.ts
Additional Context Used
GitHub Check Runs (1)
linting (application-system-form,application-template-api-modules,application-template-loader,app... success (20)

libs/application/templates/inheritance-report/src/types.ts: [warning] 225-225:
'DomesticAndForeignDebtsData' is defined but never used. Allowed unused vars must match /^_[a-zA-Z0-9]*$/u

Path-based Instructions (7)
libs/application/templates/inheritance-report/src/fields/CalculationsOfTotal/CalculateTotalDebts/index.tsx (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/inheritance-report/src/forms/form.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/inheritance-report/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/inheritance-report/src/forms/sections/heirs.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/inheritance-report/src/forms/sections/debtsAndFuneralCost.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/inheritance-report/src/fields/HeirsAndPartitionRepeater/index.tsx (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/inheritance-report/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 (9)
libs/application/templates/inheritance-report/src/forms/form.ts (2)

11-11: Correctly updated import to reflect the new structure of debt and funeral cost handling.


33-33: Proper integration of debtsAndFuneralCost into the form structure.

libs/application/templates/inheritance-report/src/types.ts (1)

213-217: Updated Debt interface correctly reflects the new fields required for the application.

libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts (1)

Line range hint 20-400: The restructuring of the debts and funeral cost sections is comprehensive and aligns with the PR objectives. Ensure that all new fields and components are properly tested to verify their functionality.

libs/application/templates/inheritance-report/src/fields/HeirsAndPartitionRepeater/index.tsx (1)

123-125: The updated error handling logic in the HeirsAndPartitionRepeater component is correctly implemented. Consider adding more detailed logging for debugging purposes.

+ console.log('Error details:', error)

Likely invalid or redundant comment.

libs/application/templates/inheritance-report/src/lib/messages.ts (4)

30-35: Ensure consistency in message IDs and descriptions for better maintainability.

The addition of a new message key preDataCollectionChooseEstateSelectTitleDropdown with a specific description for a dropdown enhances clarity and user experience.


429-429: Verify the usage of the new propertyNumber message key across the application.


942-958: Review the integration of new total amount message keys to ensure they are displayed correctly in the UI.


1510-1510: Validate the new validation message for errorPropertyNumber to ensure it covers all specified formats.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 8f473b1 and d2e722a.
Files selected for processing (3)
  • libs/application/templates/inheritance-report/src/fields/CalculateShare/index.tsx (3 hunks)
  • libs/application/templates/inheritance-report/src/forms/form.ts (2 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/deceased.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • libs/application/templates/inheritance-report/src/forms/form.ts
Additional Context Used
Path-based Instructions (2)
libs/application/templates/inheritance-report/src/forms/sections/deceased.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/inheritance-report/src/fields/CalculateShare/index.tsx (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 (1)
libs/application/templates/inheritance-report/src/fields/CalculateShare/index.tsx (1)

498-500: Ensure conditional rendering logic aligns with user expectations.

The addition of the conditional rendering based on deceasedHadAssets and shareTotal is logical and enhances the UI by preventing the display of irrelevant information. Verify with stakeholders that this behavior matches user expectations.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between d2e722a and b68fb55.
Files selected for processing (7)
  • libs/application/templates/inheritance-report/src/fields/OverviewAssets/rows.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/OverviewSections/OverviewAssets.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/assets.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts (3 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/heirs.ts (2 hunks)
  • libs/application/templates/inheritance-report/src/lib/messages.ts (7 hunks)
Files skipped from review due to trivial changes (2)
  • libs/application/templates/inheritance-report/src/forms/OverviewSections/OverviewAssets.ts
  • libs/application/templates/inheritance-report/src/forms/sections/assets.ts
Files skipped from review as they are similar to previous changes (2)
  • libs/application/templates/inheritance-report/src/forms/sections/heirs.ts
  • libs/application/templates/inheritance-report/src/lib/messages.ts
Additional Context Used
Path-based Instructions (3)
libs/application/templates/inheritance-report/src/fields/OverviewAssets/rows.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/inheritance-report/src/forms/sections/debtsAndFuneralCost.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/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx (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/inheritance-report/src/fields/OverviewAssets/rows.ts (1)

92-92: Updated title for gun serial number to use localized message. This is a good practice for supporting multiple languages.

libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts (2)

20-105: Structured addition of new fields and components in the debtsAndFuneralCost section enhances form functionality and user experience. Good use of modular components.


Line range hint 175-413: Addition of the debtsAndFuneralCostOverview section effectively presents calculated totals using custom fields and key-value pairs. Well-implemented data presentation.

libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx (1)

355-359: Improved handling of assetNumber field for bank accounts with specific formatting and placeholder text enhances user input accuracy and experience.

@albinagu albinagu added automerge Merge this PR as soon as all checks pass and removed deploy-feature Deploys features to dev labels May 23, 2024
@kodiakhq kodiakhq bot merged commit 44fd39f into main May 23, 2024
29 checks passed
@kodiakhq kodiakhq bot deleted the efs_debts_and_funeralcost branch May 23, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants