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): fixes EFS 7.06 #15145

Merged
merged 5 commits into from
Jun 7, 2024
Merged

fix(inheritance-report): fixes EFS 7.06 #15145

merged 5 commits into from
Jun 7, 2024

Conversation

albinagu
Copy link
Member

@albinagu albinagu commented Jun 7, 2024

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

    • Added descriptions for file upload sections related to private transfers and other documents.
  • Bug Fixes

    • Adjusted rendering logic for various fields in the HeirsOverview component.
    • Updated labels and translations for better clarity in the debts and funeral costs section.
  • Chores

    • Removed duplicate and unused debt type entries.
    • Commented out unused code related to exchange rates and interest fields.
    • Updated enum values to use Icelandic translations instead of English.

@albinagu albinagu requested a review from a team as a code owner June 7, 2024 11:02
Copy link
Contributor

coderabbitai bot commented Jun 7, 2024

Walkthrough

The recent updates to the inheritance report application primarily involve adjustments to the rendering logic, translation updates, and code refactoring. Key changes include improved handling of heir data, refinements to debt and file upload sections, and updates to translation labels. These modifications enhance clarity, usability, and maintainability without altering the core functionality or public API of the application.

Changes

File Path Change Summary
libs/.../AdditionalHeir.tsx Modified condition for rendering component based on customField.id and values.applicationFor.
libs/.../HeirsOverview/index.tsx Added import for date-fns/format, logged heir in map function, adjusted rendering logic for nationalId and dateOfBirth.
libs/.../ReportFieldsRepeater/index.tsx Commented out code related to exchangeRateOrInterest field.
libs/.../debtsAndFuneralCost.ts Removed translation labels, used DebtTypes enum values as labels, removed duplicate DebtTypes.PropertyFees entry.
libs/.../heirs.ts Added descriptions for file upload sections, removed field related to net property.
libs/.../prepaidInheritance/heirs.ts Updated uploadDescription property in buildFileUploadField.
libs/.../prepaidInheritance/inheritance.ts Changed label from m.realEstate to m.realEstateRepeaterHeader in options array.
libs/.../prepaidInheritance/overview.ts Modified label from m.netProperty to m.netPropertyForExchange in prepaidOverview function.
libs/.../messages.ts Added and removed several messages, including new file upload messages and dateOfBirth.
libs/.../types.ts Updated DebtTypes enum values to use Icelandic translations, added OtherDebts.

Sequence Diagram(s) (Beta)

The changes are too varied and do not introduce a single new feature or control flow modification that warrants a sequence diagram.


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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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 Jun 7, 2024

Datadog Report

All test runs f84b9be 🔗

13 Total Test Services: 0 Failed, 13 Passed
🔻 Test Sessions change in coverage: 1 decreased (-0.02%), 23 no change

Test Services
This report shows up to 10 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.13s 1 no change Link
application-system-api 0 0 0 111 2 3m 55.7s 1 no change Link
application-template-api-modules 0 0 0 109 0 2m 35.16s 1 no change Link
application-templates-financial-aid 0 0 0 11 0 42.64s 1 no change Link
application-ui-shell 0 0 0 74 0 1m 16.63s 1 no change Link
financial-aid-backend 0 0 0 219 0 1m 32.68s 1 no change Link
financial-aid-shared 0 0 0 31 0 16.49s 1 no change Link
judicial-system-api 0 0 0 54 0 10s 1 no change Link
judicial-system-audit-trail 0 0 0 7 0 17.32s 1 no change Link
judicial-system-backend 0 0 0 19337 0 19m 11.33s 1 no change Link

🔻 Code Coverage Decreases vs Default Branch (1)

  • services-auth-personal-representative - jest 51.09% (-0.02%) - Details

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

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

Project coverage is 37.02%. Comparing base (e0f4b99) to head (d0332d2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #15145      +/-   ##
==========================================
- Coverage   37.02%   37.02%   -0.01%     
==========================================
  Files        6422     6422              
  Lines      131073   131075       +2     
  Branches    37485    37495      +10     
==========================================
- Hits        48535    48534       -1     
- Misses      82538    82541       +3     
Flag Coverage Δ
api 3.44% <ø> (ø)
application-system-api 41.99% <ø> (ø)
application-template-api-modules 24.25% <ø> (+0.01%) ⬆️
application-templates-financial-aid 12.13% <ø> (ø)
application-ui-shell 21.78% <ø> (ø)
financial-aid-backend 56.34% <ø> (ø)
judicial-system-api 17.95% <ø> (ø)
judicial-system-audit-trail 67.31% <ø> (ø)
judicial-system-backend 55.92% <ø> (ø)
services-auth-personal-representative 48.44% <ø> (-0.05%) ⬇️
web 1.93% <ø> (ø)

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

Files Coverage Δ
...e-report/src/fields/ReportFieldsRepeater/index.tsx 0.00% <ø> (ø)
...e-report/src/forms/sections/debtsAndFuneralCost.ts 0.00% <ø> (ø)
...tes/inheritance-report/src/forms/sections/heirs.ts 0.00% <ø> (ø)
...ort/src/forms/sections/prepaidInheritance/heirs.ts 0.00% <ø> (ø)
...c/forms/sections/prepaidInheritance/inheritance.ts 0.00% <ø> (ø)
.../src/forms/sections/prepaidInheritance/overview.ts 0.00% <ø> (ø)
...n/templates/inheritance-report/src/lib/messages.ts 100.00% <ø> (ø)
...ields/HeirsAndPartitionRepeater/AdditionalHeir.tsx 0.00% <0.00%> (ø)
...eritance-report/src/fields/HeirsOverview/index.tsx 0.00% <0.00%> (ø)

... and 2 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 e0f4b99...d0332d2. Read the comment docs.

@albinagu albinagu added the automerge Merge this PR as soon as all checks pass label Jun 7, 2024
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: 3

Outside diff range and nitpick comments (8)
libs/application/templates/inheritance-report/src/fields/HeirsOverview/index.tsx (1)

26-26: Logging of heir object.

Consider removing or commenting out this console log before merging to production to avoid leaking potentially sensitive information.

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

Line range hint 104-104: Correct the dependencies in the useEffect hook.

- useEffect(() => {
+ useEffect(() => {
+   // Added missing dependencies
+ }, [foreignCitizenship, requiresAdvocate, advocateEmailField, advocatePhoneField, getValues, unregister, setValue, relationField, fieldIndex, nameField, dateOfBirthField, advocateField, clearErrors])

The useEffect hook is missing several dependencies. Ensure all used variables are included to avoid bugs related to stale closures.

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

Line range hint 91-91: Ensure all dependencies are specified in the useEffect hook.

-  }, [getValues, id, props.sumField])
+  }, [getValues, id, props.sumField, props.sumField2, props.calcWithShareValue, setValue])

This change addresses the missing dependencies in the useEffect hook for calculating totals, ensuring that the component re-renders correctly when any of these dependencies change.


Line range hint 124-124: Remove unnecessary dependency from useEffect hook.

-  }, [fields, calculateTotal])
+  }, [calculateTotal])

The fields dependency is not necessary for this useEffect hook as it does not directly use fields within the effect. Removing it can prevent unnecessary re-renders.


Line range hint 191-191: Add missing dependencies to useEffect hooks.

-  }, [])
+  }, [answers.applicationFor, application?.answers, replace, props?.fromExternalData, setValue, fields.length, getValues, props.fromExternalData, application, id, updateValue])

This change ensures that all relevant dependencies are included in the useEffect hooks, which is crucial for correct behavior when any of these values change.

Also applies to: 201-201, 225-225, 244-244


Line range hint 91-91: Consider using useCallback for calculateTotal.

The calculateTotal function is used in multiple places and depends on several external values. Wrapping it with useCallback might help in optimizing performance by memoizing the function, preventing unnecessary recalculations.


Line range hint 1-300: Ensure reusability and effective tree-shaking practices.

Consider modularizing the component or using more granular components to enhance reusability and ensure that tree-shaking can be more effective. This can help in reducing the final bundle size and improving load times.


[!TIP]
Codebase Verification

The file libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx contains multiple instances of the any type. This usage should be reviewed and replaced with more specific types to ensure better type safety and maintainability.

  • Line 2: /* eslint-disable @typescript-eslint/no-explicit-any */
  • Line 8: useFieldArray<any>
  • Line 12: values.reduce((acc: number, current: any, index: number)
  • Line 16: !(application?.answers as any)?.modifiers?.[props?.fromExternalData ?? '']
  • Line 20: {fields.map((repeaterField: any, mainIndex)
  • Line 24: {props.fields.map((field: any, index)

Please review these instances and replace any with more specific types where possible.

Analysis chain

Line range hint 1-300: Review TypeScript usage and ensure proper types are used.

Ensure that TypeScript is used effectively throughout the file, particularly with the use of any types which could be more specific.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify proper TypeScript usage in the file.

# Test: Search for any type issues in the file. Expect: No type issues.
rg --type typescript $'any' libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx

Length of output: 149



Script:

#!/bin/bash
# Description: Verify proper TypeScript usage in the file.

# Test: Search for any type issues in the file. Expect: No type issues.
ast-grep --lang typescript --pattern 'any' libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx

Length of output: 130



Script:

#!/bin/bash
# Description: Verify proper TypeScript usage in the file.

# Test: Search for any type issues in the file. Expect: No type issues.
rg 'any' libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx

Length of output: 492

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fbf8efc and b8ee629.

Files selected for processing (10)
  • libs/application/templates/inheritance-report/src/fields/HeirsAndPartitionRepeater/AdditionalHeir.tsx (1 hunks)
  • libs/application/templates/inheritance-report/src/fields/HeirsOverview/index.tsx (3 hunks)
  • libs/application/templates/inheritance-report/src/fields/ReportFieldsRepeater/index.tsx (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/heirs.ts (3 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/prepaidInheritance/heirs.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/prepaidInheritance/inheritance.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/prepaidInheritance/overview.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/lib/messages.ts (3 hunks)
  • libs/application/templates/inheritance-report/src/types.ts (1 hunks)
Additional context used
Path-based instructions (10)
libs/application/templates/inheritance-report/src/forms/sections/prepaidInheritance/inheritance.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/prepaidInheritance/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/prepaidInheritance/overview.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/HeirsOverview/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/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/fields/HeirsAndPartitionRepeater/AdditionalHeir.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/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/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."
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."
Biome
libs/application/templates/inheritance-report/src/fields/HeirsAndPartitionRepeater/AdditionalHeir.tsx

[error] 104-104: This hook does not specify all of its dependencies: advocateEmailField (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: advocatePhoneField (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: getValues (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook specifies more dependencies than necessary: foreignCitizenship (lint/correctness/useExhaustiveDependencies)

This dependency can be removed from the list.


[error] 104-104: This hook does not specify all of its dependencies: unregister (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: setValue (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: relationField (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: fieldIndex (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: nameField (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: dateOfBirthField (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: advocateField (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.


[error] 104-104: This hook does not specify all of its dependencies: clearErrors (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

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

[error] 91-91: This hook does not specify all of its dependencies: props?.calcWithShareValue (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 91-91: This hook does not specify all of its dependencies: props?.sumField2 (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 91-91: This hook does not specify all of its dependencies: setValue (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.


[error] 124-124: This hook specifies more dependencies than necessary: fields (lint/correctness/useExhaustiveDependencies)

This dependency can be removed from the list.


[error] 191-191: This hook does not specify all of its dependencies: calculateTotal (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.


[error] 201-201: This hook does not specify all of its dependencies: answers.applicationFor (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: application?.answers (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: replace (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: props?.fromExternalData (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

Either include them or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: setValue (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: props.fromExternalData (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

This dependency is not specified in the hook dependency list.

Either include them or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: application (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 201-201: This hook does not specify all of its dependencies: fields.length (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 225-225: This hook does not specify all of its dependencies: answers (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 225-225: This hook does not specify all of its dependencies: fields.reduce (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 225-225: This hook does not specify all of its dependencies: id (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 244-244: This hook does not specify all of its dependencies: getValues (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 244-244: This hook does not specify all of its dependencies: props?.fromExternalData (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 244-244: This hook does not specify all of its dependencies: id (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array


[error] 244-244: This hook does not specify all of its dependencies: updateValue (lint/correctness/useExhaustiveDependencies)

This dependency is not specified in the hook dependency list.

Either include it or remove the dependency array

Additional comments not posted (11)
libs/application/templates/inheritance-report/src/forms/sections/prepaidInheritance/heirs.ts (1)

114-114: Enhanced upload description improves user understanding.

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

72-85: Direct use of enum values as labels simplifies the code and enhances maintainability.

Verification successful

The enum values for DebtTypes are consistently and correctly used across the application.

  • Verified locations:
    • libs/clients/syslumenn/src/lib/syslumennClient.types.ts
    • libs/clients/syslumenn/src/lib/syslumennClient.utils.ts
    • libs/application/templates/inheritance-report/src/types.ts
    • libs/application/templates/inheritance-report/src/lib/dataSchema.ts
    • libs/application/templates/inheritance-report/src/forms/sections/debtsAndFuneralCost.ts
    • libs/application/template-api-modules/src/lib/modules/templates/inheritance-report/utils/fakeData.ts
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the enum values are correctly implemented across the application.

# Test: Search for the enum usage. Expect: Consistent and correct usage across related components.
rg --type typescript $'DebtTypes'

Length of output: 67



Script:

#!/bin/bash
# Description: Verify that the enum values are correctly implemented across the application.

# Test: Search for the enum usage. Expect: Consistent and correct usage across related components.
rg --type ts $'DebtTypes'

Length of output: 3230

libs/application/templates/inheritance-report/src/fields/HeirsOverview/index.tsx (2)

14-14: Added import for format from date-fns.

This import is necessary for formatting dates, which is used later in the code. Good addition for better date handling.


36-51: Adjustment in rendering logic based on foreignCitizenship.

The conditional rendering based on foreignCitizenship is a good practice to ensure the UI adapts to different user data. This change enhances the flexibility of the component.

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

298-303: Updated DebtTypes enum with Icelandic translations.

Localizing the DebtTypes enum improves the user experience for Icelandic users. This change aligns with the overall goal of enhancing localization.

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

288-289: Conditional rendering logic for taxFreeInheritance field.

The logic to conditionally render the taxFreeInheritance field based on PREPAID_INHERITANCE and the relation not being RelationSpouse is clear and correctly implemented.

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

166-166: Added user guidelines for file uploads.

Adding detailed user guidelines for file uploads is a great improvement for user clarity and helps in setting the right expectations.

Also applies to: 182-182

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

220-224: Added new message definition for dateOfBirth.

This addition aligns with the PR's goal to enhance localization and clarity. It's important to ensure that this new message is utilized wherever the date of birth is displayed or required.


1532-1543: Updated file upload descriptions and guidelines for pre-paid documents.

The updates provide clearer instructions and acceptable file types, which should improve user experience and reduce confusion during the file upload process.


1550-1555: Updated private transfer upload guidelines.

The new guidelines are more specific about the number of files that can be uploaded, which helps set clear expectations for the users.


1562-1567: Updated other documents upload guidelines.

The modifications to the upload guidelines for other documents are consistent with the changes made in other sections, ensuring uniformity and clarity across the application.

@kodiakhq kodiakhq bot merged commit bdc72a9 into main Jun 7, 2024
54 checks passed
@kodiakhq kodiakhq bot deleted the efs_fixes_7_06 branch June 7, 2024 14:58
sigruntg pushed a commit that referenced this pull request Jun 12, 2024
* fix(inheritance-report): fixes EFS 7.06

* tweaks

* dateofbirth in overview

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
lodmfjord pushed a commit that referenced this pull request Jun 14, 2024
* fix(inheritance-report): fixes EFS 7.06

* tweaks

* dateofbirth in overview

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
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