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(service-portal): Add locale to organ donation updates #16089

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

disaerna
Copy link
Member

@disaerna disaerna commented Sep 19, 2024

Service Portal - Health

What

Add locale parameter to organ donation update mutation

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 support for locale-specific updates in donor status through the updateDonorStatus method.
    • Introduced a new optional locale parameter in the organ donation API configuration for better internationalization.
    • Enhanced the updateOrganDonation method to accept a locale for localized responses.
    • Updated the GraphQL mutation to handle locale-specific updates when modifying donor information.
  • Improvements

    • Refactored the logic for determining the heading in the ActionCard component for better readability.
    • Updated the RegistrationForm to support localization based on user language preferences.

@disaerna disaerna requested review from a team as code owners September 19, 2024 14:27
@disaerna disaerna added the deprecated:automerge (Disabled) Merge this PR as soon as all checks pass label Sep 19, 2024
Copy link
Contributor

coderabbitai bot commented Sep 19, 2024

Walkthrough

The changes involve modifications to the updateDonorStatus method across multiple classes and files, introducing a new locale parameter to enhance localization support. This parameter allows for locale-specific updates in the organ donation process, improving the method's adaptability to different user regions. Additionally, adjustments were made to API configurations and GraphQL mutations to incorporate this new parameter, ensuring consistent handling of localization throughout the application.

Changes

Files Change Summary
libs/api/domains/health-directorate/src/lib/health-directorate.service.ts
libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts
Added a locale parameter to the updateDonorStatus method in both the service and resolver classes.
libs/clients/health-directorate/src/lib/clients/organ-donation/clientConfig.json Introduced a new optional locale query parameter in the API configuration for the organ donation client.
libs/clients/health-directorate/src/lib/clients/organ-donation/organDonation.service.ts Added a locale parameter to the updateOrganDonation method, allowing for locale-specific updates.
libs/service-portal/health/src/screens/OrganDonation/OrganDonation.graphql Modified the updateOrganDonationInfo mutation to include a $locale parameter for locale-specific updates.
libs/service-portal/health/src/screens/OrganDonation.tsx Refactored the logic for determining the heading in the ActionCard component for improved readability.
libs/service-portal/health/src/screens/OrganDonationRegistration/RegistrationForm.tsx Added a locale property to the object passed in the Form2 component, enabling localization support in the form.

Possibly related PRs

  • fix(chore): missing env for application system #15926: This PR adds new entities related to health directorate functionalities, which may be relevant to the overall context of the main PR's updates to the health directorate service.
  • fix(service-portal): Health Spacing #16020: This PR modifies the OrganDonation.tsx file, which is part of the same domain as the main PR, focusing on user interface adjustments that could relate to the overall user experience improvements in the health directorate context.

Suggested labels

high priority

Suggested reviewers

  • thordurhhh
  • jonnigs

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.52%. Comparing base (ef69855) to head (1fae948).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ib/clients/organ-donation/organDonation.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16089      +/-   ##
==========================================
- Coverage   36.69%   36.52%   -0.17%     
==========================================
  Files        6776     6748      -28     
  Lines      139578   139343     -235     
  Branches    39678    39686       +8     
==========================================
- Hits        51222    50899     -323     
- Misses      88356    88444      +88     
Flag Coverage Δ
api 3.39% <ø> (ø)
application-system-api 41.64% <0.00%> (ø)
application-template-api-modules 23.70% <ø> (+<0.01%) ⬆️
application-ui-shell 21.29% <ø> (ø)
web 1.83% <ø> (ø)

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

Files with missing lines Coverage Δ
...ib/clients/organ-donation/organDonation.service.ts 34.61% <0.00%> (ø)

... and 161 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 ef69855...1fae948. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Sep 19, 2024

Datadog Report

All test runs 61721ab 🔗

6 Total Test Services: 0 Failed, 5 Passed
➡️ Test Sessions change in coverage: 17 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 2.66s 1 no change Link
application-system-api 0 0 0 111 2 3m 8.89s 1 no change Link
application-template-api-modules 0 0 0 109 0 1m 45.26s 1 no change Link
application-ui-shell 0 0 0 74 0 32.86s 1 no change Link
service-portal-health 0 0 0 0 0 505.08ms 1 no change Link
web 0 0 0 84 0 32.68s 1 no change Link

Copy link
Member

@thorkellmani thorkellmani left a comment

Choose a reason for hiding this comment

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

LGTM 🇧🇸

@kodiakhq kodiakhq bot merged commit 7e1f9d9 into main Sep 26, 2024
50 checks passed
@kodiakhq kodiakhq bot deleted the service-portal/organ-don-update branch September 26, 2024 12:18
thoreyjona pushed a commit that referenced this pull request Oct 2, 2024
* refactor: add locale to update organ donations regs

* cleanup

* cleanup

---------

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
deprecated:automerge (Disabled) Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants