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

feat(service-portal): Health - Organ donation #15227

Merged
merged 29 commits into from
Aug 19, 2024

Conversation

disaerna
Copy link
Member

@disaerna disaerna commented Jun 13, 2024

Health - Organ donation UI 🫁

What

UI for organ donation

Why

First phase of moving all "Heilsuvera" related data to "Mínar síður"

Screenshots / Gifs

Screenshot 2024-06-13 at 13 01 44 Screenshot 2024-06-13 at 12 56 41

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 organ donation services in the health portal, enhancing user interactions with localized messages and navigation.
    • Introduced new components for organ donation management, including a registration form and limitations handling.
    • Expanded localization capabilities with new message entries to improve user experience related to organ donation.
    • Integrated new API scopes for enhanced functionality in health services.
  • Bug Fixes

    • Improved error handling and data fetching for organ donation components to ensure a smoother user experience.
  • Documentation

    • Updated documentation to reflect new API scopes related to health and organ donation.

Copy link
Contributor

coderabbitai bot commented Jun 13, 2024

Walkthrough

The recent changes significantly enhance the health service portal's functionalities concerning organ donation. Key updates include the addition of a new API scope for organ donation, localized messages to support user interactions, and the creation of components and navigation items for managing organ donation information and registrations. These enhancements collectively improve the user experience by providing a comprehensive and user-friendly interface for organ donation processes.

Changes

Files Change Summary
libs/auth/scopes/src/lib/api.scope.ts, apps/service-portal/src/auth.ts Added healthOrganDonation to ApiScope enum and SERVICE_PORTAL_SCOPES for organ donation permissions.
libs/service-portal/health/src/lib/messages.ts Introduced new messages for localization, including organ donation-related prompts and strings.
libs/service-portal/health/src/lib/navigation.ts, libs/service-portal/health/src/lib/paths.ts Updated navigation and paths to include organ donation options.
libs/service-portal/health/src/module.tsx Enhanced healthModule with new routes for organ donation and registration functionalities.
libs/service-portal/health/src/screens/OrganDonation/OrganDonation.tsx, libs/service-portal/health/src/screens/OrganDonationRegistration/RegistrationForm.tsx Created and updated components for managing organ donation information and registration, with localization support.
libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts Renamed GraphQL queries and mutations for clarity, enhancing API usability.
libs/api/domains/health-directorate/src/lib/models/vaccinations.model.ts Changed generalComment type from object to string for improved type safety.
libs/api/domains/health-directorate/tsconfig.json, libs/api/domains/health-directorate/tsconfig.lib.json Added strict type-checking options in TypeScript configurations to enhance code quality.

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 Configuration 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.

@disaerna disaerna added the deploy-feature Deploys features to dev label Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jun 13, 2024

Affected services are: air-discount-scheme-api,air-discount-scheme-backend,api,application-system-api,download-service,financial-aid-api,financial-aid-backend,financial-aid-open-api,icelandic-names-registry-backend,license-api,regulations-admin-backend,services-auth-admin-api,services-auth-ids-api,services-auth-delegation-api,services-auth-personal-representative,services-auth-personal-representative-public,services-auth-public-api,services-documents,services-endorsements-api,services-sessions,services-university-gateway,services-user-notification,services-user-profile,air-discount-scheme-web,financial-aid-web-osk,financial-aid-web-veita,skilavottord-web,web,application-system-form,island-ui-storybook,portals-admin,service-portal,system-e2e,

@datadog-island-is
Copy link

datadog-island-is bot commented Jun 13, 2024

Datadog Report

All test runs d65e977 🔗

101 Total Test Services: 0 Failed, 99 Passed
⬆️ Test Sessions change in coverage: 4 increased, 190 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
air-discount-scheme-backend 0 0 0 81 0 38.53s N/A Link
air-discount-scheme-web 0 0 0 2 0 10.76s N/A Link
api 0 0 0 4 0 4.33s N/A Link
api-catalogue-services 0 0 0 23 0 17.14s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 37.34s N/A Link
api-domains-assets 0 0 0 3 0 24.18s N/A Link
api-domains-auth-admin 0 0 0 18 0 13.93s N/A Link
api-domains-communications 0 0 0 5 0 48.72s N/A Link
api-domains-criminal-record 0 0 0 5 0 19.34s N/A Link
api-domains-driving-license 0 0 0 23 0 1m 2.6s N/A Link

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.91%. Comparing base (6b1c6ee) to head (a6bdd24).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #15227      +/-   ##
==========================================
- Coverage   36.91%   36.91%   -0.01%     
==========================================
  Files        6608     6608              
  Lines      135495   135496       +1     
  Branches    38603    38603              
==========================================
  Hits        50014    50014              
- Misses      85481    85482       +1     
Flag Coverage Δ
air-discount-scheme-backend 54.12% <100.00%> (+0.01%) ⬆️
air-discount-scheme-web 0.00% <ø> (ø)
api 3.42% <ø> (ø)
api-domains-air-discount-scheme 36.97% <100.00%> (+0.03%) ⬆️
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 53.90% <ø> (ø)
api-domains-driving-license 44.48% <100.00%> (+0.01%) ⬆️
api-domains-education 33.84% <ø> (ø)
api-domains-health-insurance 35.07% <ø> (ø)
api-domains-mortgage-certificate 36.04% <ø> (ø)
api-domains-payment-schedule 41.26% <100.00%> (+0.02%) ⬆️
application-api-files 57.17% <ø> (ø)
application-core 71.52% <ø> (+0.42%) ⬆️
application-system-api 41.88% <100.00%> (+<0.01%) ⬆️
application-template-api-modules 40.55% <100.00%> (+16.83%) ⬆️
application-templates-accident-notification 19.88% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 22.23% <ø> (ø)
application-templates-driving-license 16.03% <ø> (ø)
application-templates-estate 11.90% <ø> (ø)
application-templates-example-payment 20.90% <ø> (ø)
application-templates-financial-aid 12.12% <ø> (ø)
application-templates-general-petition 18.96% <ø> (ø)
application-templates-health-insurance 23.36% <ø> (ø)
application-templates-inheritance-report 4.64% <ø> (ø)
application-templates-marriage-conditions 10.52% <ø> (ø)
application-templates-mortgage-certificate 43.69% <ø> (ø)
application-templates-parental-leave 28.40% <ø> (ø)
application-types 7.19% <ø> (ø)
application-ui-components 1.43% <ø> (ø)
application-ui-shell 21.31% <ø> (ø)
auth-api-lib 14.68% <ø> (+0.05%) ⬆️
clients-charge-fjs-v2 27.54% <ø> (ø)
clients-license-client 1.83% <ø> (ø)
download-service 44.58% <100.00%> (+0.01%) ⬆️
financial-aid-backend 56.43% <100.00%> (+16.72%) ⬆️
financial-aid-shared 19.03% <ø> (ø)
icelandic-names-registry-backend 54.21% <100.00%> (+0.07%) ⬆️
license-api 42.87% <100.00%> (∅)
portals-admin-regulations-admin 2.03% <ø> (ø)
services-auth-admin-api 51.01% <100.00%> (+<0.01%) ⬆️
services-auth-delegation-api 61.48% <100.00%> (-0.08%) ⬇️
services-auth-ids-api 53.88% <100.00%> (+<0.01%) ⬆️
services-auth-personal-representative 48.08% <100.00%> (-0.03%) ⬇️
services-auth-personal-representative-public 44.01% <100.00%> (+0.05%) ⬆️
services-auth-public-api 51.99% <100.00%> (+<0.01%) ⬆️
services-documents 60.99% <100.00%> (+0.02%) ⬆️
services-endorsements-api 55.71% <100.00%> (+0.01%) ⬆️
services-sessions 65.56% <100.00%> (+0.06%) ⬆️
services-university-gateway 48.55% <ø> (+0.11%) ⬆️
services-user-notification 47.97% <100.00%> (+0.04%) ⬆️
services-user-profile 62.30% <100.00%> (+0.08%) ⬆️
web 1.88% <ø> (ø)

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

Files Coverage Δ
libs/auth/scopes/src/lib/api.scope.ts 100.00% <100.00%> (ø)
libs/service-portal/core/src/lib/messages.ts 50.00% <ø> (ø)
libs/service-portal/health/src/lib/messages.ts 0.00% <ø> (ø)
libs/service-portal/health/src/lib/navigation.ts 0.00% <ø> (ø)
libs/service-portal/health/src/lib/paths.ts 0.00% <ø> (ø)
libs/service-portal/health/src/module.tsx 0.00% <ø> (ø)

... and 175 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 7cc7be0...a6bdd24. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Aug 6, 2024

Datadog Report

All test runs 5d1c94b 🔗

52 Total Test Services: 0 Failed, 50 Passed
🔻 Test Sessions change in coverage: 1 decreased (-0.27%), 13 increased, 186 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
air-discount-scheme-backend 0 0 0 81 0 31.1s 1 increased (+0.02%) Link
air-discount-scheme-web 0 0 0 2 0 8.02s 1 no change Link
api 0 0 0 4 0 2.87s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 23.8s N/A Link
api-domains-assets 0 0 0 3 0 14.97s N/A Link
api-domains-auth-admin 0 0 0 18 0 12.7s 1 no change Link
api-domains-driving-license 0 0 0 23 0 33.09s 1 no change Link
api-domains-education 0 0 0 8 0 24.08s 1 no change Link
api-domains-health-insurance 0 0 0 4 0 18.09s 1 no change Link
api-domains-license-service 0 0 0 0 0 507.39ms N/A Link

🔻 Code Coverage Decreases vs Default Branch (1)

  • services-auth-delegation-api - jest 60.07% (-0.27%) - Details

@disaerna disaerna marked this pull request as ready for review August 15, 2024 13:26
@disaerna disaerna requested review from a team as code owners August 15, 2024 13:26
Copy link
Member

@snaerseljan snaerseljan left a comment

Choose a reason for hiding this comment

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

LGTM!

@disaerna disaerna added automerge Merge this PR as soon as all checks pass and removed deploy-feature Deploys features to dev labels Aug 19, 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: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a5ceb06 and 6073c6e.

Files selected for processing (9)
  • apps/api/src/app/app.module.ts (2 hunks)
  • libs/api/domains/health-directorate/src/index.ts (1 hunks)
  • libs/api/domains/health-directorate/src/lib/health-directorate.module.ts (1 hunks)
  • libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts (1 hunks)
  • libs/api/domains/health-directorate/src/lib/health-directorate.service.ts (2 hunks)
  • libs/api/domains/health-directorate/src/lib/models/organ-donation.model.ts (2 hunks)
  • libs/api/domains/health-directorate/src/lib/models/vaccinations.model.ts (1 hunks)
  • libs/api/domains/health-directorate/tsconfig.json (1 hunks)
  • libs/api/domains/health-directorate/tsconfig.lib.json (1 hunks)
Additional context used
Path-based instructions (9)
libs/api/domains/health-directorate/src/index.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/api/domains/health-directorate/src/lib/health-directorate.module.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/api/domains/health-directorate/tsconfig.lib.json (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/api/domains/health-directorate/tsconfig.json (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/api/domains/health-directorate/src/lib/models/organ-donation.model.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/api/domains/health-directorate/src/lib/models/vaccinations.model.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/api/domains/health-directorate/src/lib/health-directorate.resolver.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/api/domains/health-directorate/src/lib/health-directorate.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."
apps/api/src/app/app.module.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
Additional comments not posted (10)
libs/api/domains/health-directorate/src/index.ts (1)

2-2: Export addition approved.

The addition of HealthDirectorateModule to the exports improves modularity and reusability.

libs/api/domains/health-directorate/src/lib/health-directorate.module.ts (1)

1-10: Module implementation approved.

The HealthDirectorateModule is well-structured, enhancing modularity and maintainability within the NestJS framework.

libs/api/domains/health-directorate/tsconfig.lib.json (1)

6-12: TypeScript configuration enhancements approved.

The stricter type-checking options enhance code quality. Verify the impact of removing the module option to ensure compatibility.

libs/api/domains/health-directorate/tsconfig.json (1)

5-10: TypeScript strictness options approved.

The added options enhance type safety and code consistency, contributing to better maintainability.

libs/api/domains/health-directorate/src/lib/models/organ-donation.model.ts (1)

18-18: GraphQL input type change approved.

Changing DonorStatusInput to use @InputType correctly aligns it with its intended use in GraphQL operations.

libs/api/domains/health-directorate/src/lib/models/vaccinations.model.ts (1)

29-30: Change approved: Ensure consistent usage of generalComment.

Changing the type of generalComment from object to string enhances type safety. Verify that this change is consistent with its usage throughout the application.

Verification successful

Consistent Usage of generalComment Verified

The search results indicate that generalComment is being used consistently as a string across the codebase. Notably, in health-directorate.service.ts, generalComment is explicitly converted to a string using .toString(), which aligns with its new type.

  • Location: libs/api/domains/health-directorate/src/lib/health-directorate.service.ts

This confirms that the change is consistent with its usage. No further action is required.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that `generalComment` is used consistently as a string across the codebase.

# Test: Search for `generalComment` usage. Expect: All occurrences should align with the new string type.
rg --type typescript -A 3 $'generalComment'

Length of output: 77


Script:

#!/bin/bash
# Description: Verify that `generalComment` is used consistently as a string across the codebase.

# Test: Search for `generalComment` usage in TypeScript files. Expect: All occurrences should align with the new string type.
rg --type ts -A 3 $'generalComment'

Length of output: 874

libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts (1)

47-47: Change approved: Verify client-side handling of nullable Boolean.

Explicitly setting the return type of updateDonorStatus to Boolean (nullable) improves clarity. Ensure that client-side code handles potential null values appropriately.

libs/api/domains/health-directorate/src/lib/health-directorate.service.ts (2)

99-99: Change approved: Consistent string conversion for generalComment.

Converting generalComment to a string ensures data consistency. Verify that this change aligns with the expected data format elsewhere in the application.


59-71: Change approved: Verify handling of updated return type.

The updateDonorStatus method now returns true or false, enhancing error handling. Ensure that this change is handled correctly in the resolver and any other dependent code.

apps/api/src/app/app.module.ts (1)

172-172: Change approved: Integration of HealthDirectorateModule.

Adding HealthDirectorateModule enhances the application's modular structure. Ensure that it is correctly configured and utilized within the application.

Also applies to: 329-329

@kodiakhq kodiakhq bot removed the automerge Merge this PR as soon as all checks pass label Aug 19, 2024
Copy link
Contributor

kodiakhq bot commented Aug 19, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

@disaerna disaerna added the automerge Merge this PR as soon as all checks pass label Aug 19, 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: 0

Outside diff range, codebase verification and nitpick comments (1)
libs/service-portal/health/src/screens/Vaccinations/Vaccinations.graphql (1)

2-2: Inconsistent Usage of Query Name Detected

The query name update to HealthDirectorateVaccinationsGetVaccinations has not been consistently applied across the codebase. The old query name getVaccinations is still present in several files. Please update the following instances to ensure consistency:

  • libs/service-portal/health/src/screens/Vaccinations/Vaccinations.graphql
  • libs/clients/health-directorate/src/lib/clients/vaccinations/vaccinations.service.ts
  • libs/api/domains/health-directorate/src/lib/health-directorate.service.ts
  • libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts
Analysis chain

LGTM! Verify consistent usage of the new query name.

The change to a more descriptive query name enhances clarity. Ensure that all instances of the query name have been updated across the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of the new query name across the codebase.

# Test: Search for the old and new query names. Expect: Only occurrences of the new query name.
rg --type graphql 'getVaccinations|HealthDirectorateVaccinationsGetVaccinations'

Length of output: 114


Script:

#!/bin/bash
# Description: Verify consistent usage of the new query name across the codebase.

# Test: Search for the old and new query names in all files. Expect: Only occurrences of the new query name.
rg 'getVaccinations|HealthDirectorateVaccinationsGetVaccinations'

Length of output: 1453

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6073c6e and fa619bd.

Files selected for processing (14)
  • apps/service-portal/src/auth.ts (1 hunks)
  • libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts (3 hunks)
  • libs/auth/scopes/src/lib/api.scope.ts (1 hunks)
  • libs/service-portal/health/src/lib/messages.ts (1 hunks)
  • libs/service-portal/health/src/lib/navigation.ts (1 hunks)
  • libs/service-portal/health/src/lib/paths.ts (1 hunks)
  • libs/service-portal/health/src/module.tsx (2 hunks)
  • libs/service-portal/health/src/screens/OrganDonation/OrganDonation.graphql (1 hunks)
  • libs/service-portal/health/src/screens/OrganDonation/OrganDonation.tsx (1 hunks)
  • libs/service-portal/health/src/screens/OrganDonationRegistration/RegistrationForm.tsx (1 hunks)
  • libs/service-portal/health/src/screens/Vaccinations/Vaccinations.graphql (1 hunks)
  • libs/service-portal/health/src/screens/Vaccinations/VaccinationsGeneral.tsx (1 hunks)
  • libs/service-portal/health/src/screens/Vaccinations/VaccinationsOther.tsx (1 hunks)
  • libs/service-portal/health/src/utils/types.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • libs/service-portal/health/src/lib/paths.ts
Files skipped from review as they are similar to previous changes (7)
  • apps/service-portal/src/auth.ts
  • libs/api/domains/health-directorate/src/lib/health-directorate.resolver.ts
  • libs/auth/scopes/src/lib/api.scope.ts
  • libs/service-portal/health/src/lib/navigation.ts
  • libs/service-portal/health/src/screens/OrganDonation/OrganDonation.tsx
  • libs/service-portal/health/src/screens/OrganDonationRegistration/RegistrationForm.tsx
  • libs/service-portal/health/src/utils/types.ts
Additional context used
Path-based instructions (6)
libs/service-portal/health/src/screens/Vaccinations/Vaccinations.graphql (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/service-portal/health/src/screens/OrganDonation/OrganDonation.graphql (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/service-portal/health/src/screens/Vaccinations/VaccinationsOther.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/service-portal/health/src/screens/Vaccinations/VaccinationsGeneral.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/service-portal/health/src/module.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/service-portal/health/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 (22)
libs/service-portal/health/src/screens/OrganDonation/OrganDonation.graphql (1)

1-23: New GraphQL queries and mutation look good!

The queries and mutation for organ donation are well-structured. Ensure that the locale parameter in getOrganDonationExceptions is handled correctly in the backend.

libs/service-portal/health/src/screens/Vaccinations/VaccinationsOther.tsx (1)

14-14: LGTM! Verify component logic with updated data structure.

The change aligns with the updated GraphQL query response. Ensure that the component logic correctly handles the new data structure.

libs/service-portal/health/src/screens/Vaccinations/VaccinationsGeneral.tsx (1)

16-16: LGTM! Verify component logic with updated data structure.

The change aligns with the updated GraphQL query response. Ensure that the component logic correctly handles the new data structure.

libs/service-portal/health/src/module.tsx (2)

57-63: New components for organ donation are well-integrated!

The addition of OrganDonation and OrganDonationRegistration components is seamless. Ensure that these components are properly tested.


208-221: New routes for organ donation are correctly defined!

The routes for organ donation and registration are well-defined and follow the existing pattern. Ensure that the API scope is correctly configured.

libs/service-portal/health/src/lib/messages.ts (17)

947-950: LGTM: Message entry organDonation.

The message entry is correctly defined and ready for localization.


951-955: LGTM: Message entry organDonationDescription.

The message entry is well-defined and provides clear information about organ donation registration.


956-959: LGTM: Message entry readAboutOrganDonation.

The message entry is well-defined and encourages users to learn more about organ donation.


960-963: LGTM: Message entry takeOnOrganDonation.

The message entry is well-defined and clearly communicates its purpose.


964-967: LGTM: Message entry changeTake.

The message entry is well-defined and provides clear instructions for changing one's stance on organ donation.


968-971: LGTM: Message entry organDonationLink.

The message entry is well-defined and includes a valid URL for more information on organ donation.


972-975: LGTM: Message entry organRegistrationOtherLabel.

The message entry is well-defined and provides a clear label for additional input.


976-979: LGTM: Message entry organRegistrationOtherText.

The message entry is well-defined and provides a clear prompt for users to specify which organs are to be registered.


980-984: LGTM: Message entry organLimitationsError.

The message entry is well-defined and provides a clear error message for empty text areas.


985-988: LGTM: Message entry other.

The message entry is well-defined and provides a clear label for 'other' options.


989-992: LGTM: Message entry registrationComplete.

The message entry is well-defined and provides a clear confirmation message for successful registration.


993-996: LGTM: Message entry registrationFailed.

The message entry is well-defined and provides a clear error message for failed registration attempts.


997-1000: LGTM: Message entry iAmOrganDonor.

The message entry is well-defined and clearly communicates the user's status as an organ donor.


1001-1004: LGTM: Message entry iAmNotOrganDonor.

The message entry is well-defined and clearly communicates the user's status as not being an organ donor.


1005-1008: LGTM: Message entry organDonationRegistrationOptIn.

The message entry is well-defined and provides a clear message for opting into organ donation.


1009-1013: LGTM: Message entry organDonationRegistrationException.

The message entry is well-defined and provides a clear message for specifying exceptions to organ donation.


1014-1017: LGTM: Message entry organDonationRegistrationOptOut.

The message entry is well-defined and provides a clear message for opting out of organ donation.

@kodiakhq kodiakhq bot merged commit a16b71e into main Aug 19, 2024
134 checks passed
@kodiakhq kodiakhq bot deleted the service-portal/organ-donors-ui branch August 19, 2024 17:24
oskarjs pushed a commit that referenced this pull request Aug 20, 2024
* feat: add organ donation overview

* feat: add organ donation registration

* fix: form logic

* fix: form logic

* fix: text

* fix: wrong naming

* feat: add checkboxes

* feat: simplify form

* feat: add organ donation to submenu

* feat: update list

* fix: mobile input

* fix: rewrite to fix order of checkboxes

* feat: add feature flag for routes

* feat: remove input & fix texts

* feat: add scopes

* fix: scope

* fix: domain build issues

* fix: nullable error

* feat: connect to graphql

* fix: naming

---------

Co-authored-by: lommi <jonorn@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
jonnigs pushed a commit that referenced this pull request Sep 2, 2024
* feat: add organ donation overview

* feat: add organ donation registration

* fix: form logic

* fix: form logic

* fix: text

* fix: wrong naming

* feat: add checkboxes

* feat: simplify form

* feat: add organ donation to submenu

* feat: update list

* fix: mobile input

* fix: rewrite to fix order of checkboxes

* feat: add feature flag for routes

* feat: remove input & fix texts

* feat: add scopes

* fix: scope

* fix: domain build issues

* fix: nullable error

* feat: connect to graphql

* fix: naming

---------

Co-authored-by: lommi <jonorn@gmail.com>
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.

4 participants