-
Notifications
You must be signed in to change notification settings - Fork 61
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(health-directorate): New application for Embætti Landlæknis (Work permit/license to pratice) #15146
feat(health-directorate): New application for Embætti Landlæknis (Work permit/license to pratice) #15146
Conversation
WalkthroughThis update introduces a comprehensive module for managing healthcare work permits within a NestJS application. A new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Application
participant HealthcareWorkPermitService
participant NationalRegistryService
participant EES
participant HealthDirectorateClient
participant UniversityCareersClient
User->>Application: Submit healthcare work permit application
Application->>HealthcareWorkPermitService: Start permit process
HealthcareWorkPermitService->>NationalRegistryService: Validate citizenship
NationalRegistryService->>EES: Check EES countries
EES-->>NationalRegistryService: Return validation result
NationalRegistryService-->>HealthcareWorkPermitService: Citizenship valid/invalid
HealthcareWorkPermitService->>UniversityCareersClient: Obtain career information
UniversityCareersClient-->>HealthcareWorkPermitService: Return career information
HealthcareWorkPermitService->>HealthDirectorateClient: Submit healthcare permit application
HealthDirectorateClient-->>HealthcareWorkPermitService: Confirm permit submission
HealthcareWorkPermitService-->>Application: Return final result
Application-->>User: Notifies user of application status
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Datadog ReportAll test runs ❌ 101 Total Test Services: 1 Failed, 98 Passed Test ServicesThis report shows up to 10 services
❌ Failed Tests (1)
🔻 Code Coverage Decreases vs Default Branch (3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 17
Outside diff range and nitpick comments (3)
libs/application/templates/healthcare-work-permit/src/lib/messages/information.ts (1)
3-89
: Refine message descriptions for better clarity.Some message descriptions (lines 7, 21, 37, 55, 61, 71, 77) could be more descriptive to provide better context for translators and developers. For example, instead of 'Select work permit section title', a more descriptive text could be 'Title for the section where users select their desired work permit'.
libs/application/templates/healthcare-work-permit/src/lib/messages/error.ts (1)
3-94
: Improve error message descriptions for better clarity.The descriptions for error messages (lines 7, 13, 25, 39, 47, 53, 63, 70) could be more detailed to provide better context for translators and developers. For example, instead of 'Unhandled error in data provider', a more detailed description could be 'Error message displayed when an unexpected error occurs while fetching data from a provider'.
libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts (1)
118-118
: Consider adding a comment to explain why the pruning time is set to 60 minutes. This will help maintainers understand the rationale behind this specific duration.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (53)
- libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.module.ts (1 hunks)
- libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.service.ts (1 hunks)
- libs/application/template-api-modules/src/lib/modules/templates/index.ts (3 hunks)
- libs/application/template-loader/src/lib/templateLoaders.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/.babelrc (1 hunks)
- libs/application/templates/healthcare-work-permit/.eslintrc.json (1 hunks)
- libs/application/templates/healthcare-work-permit/README.md (1 hunks)
- libs/application/templates/healthcare-work-permit/jest.config.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/project.json (1 hunks)
- libs/application/templates/healthcare-work-permit/src/assets/Logo.tsx (1 hunks)
- libs/application/templates/healthcare-work-permit/src/dataProviders/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/fields/CustomFormConclusionSectionField/index.tsx (1 hunks)
- libs/application/templates/healthcare-work-permit/src/fields/CustomFormConclusionSectionField/styles.css.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/fields/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/forms/Confirmation/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/personalSection.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/selectWorkPermitSection.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/forms/Prerequisites/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/constants.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/dataSchema.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/application.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/confirmation.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/error.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/externalData.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/information.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/payment.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/messages/personal.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/lib/types.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/shared/constants.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/shared/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/utils/EES.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/utils/formatDate.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/utils/getChargeItemCodes.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/src/utils/index.ts (1 hunks)
- libs/application/templates/healthcare-work-permit/tsconfig.json (1 hunks)
- libs/application/templates/healthcare-work-permit/tsconfig.lib.json (1 hunks)
- libs/application/templates/healthcare-work-permit/tsconfig.spec.json (1 hunks)
- libs/application/types/src/lib/ApplicationTypes.ts (2 hunks)
- libs/application/types/src/lib/InstitutionMapper.ts (1 hunks)
- libs/clients/health-directorate/src/clientConfig.json (6 hunks)
- libs/clients/health-directorate/src/lib/apiConfiguration.ts (2 hunks)
- libs/clients/health-directorate/src/lib/healthDirectorateClient.service.ts (4 hunks)
- libs/clients/health-directorate/src/lib/healthDirectorateClient.types.ts (2 hunks)
- libs/clients/university-careers/src/lib/dto/index.ts (1 hunks)
- libs/clients/university-careers/src/lib/dto/studentTrackDto.ts (1 hunks)
- libs/feature-flags/src/lib/features.ts (1 hunks)
- libs/shared/constants/src/lib/chargeItemCode.ts (1 hunks)
- tsconfig.base.json (1 hunks)
Files not summarized due to errors (1)
- libs/application/templates/healthcare-work-permit/src/assets/Logo.tsx: Error: Message exceeds token limit
Files skipped from review due to trivial changes (22)
- libs/application/templates/healthcare-work-permit/.babelrc
- libs/application/templates/healthcare-work-permit/.eslintrc.json
- libs/application/templates/healthcare-work-permit/README.md
- libs/application/templates/healthcare-work-permit/jest.config.ts
- libs/application/templates/healthcare-work-permit/project.json
- libs/application/templates/healthcare-work-permit/src/fields/CustomFormConclusionSectionField/styles.css.ts
- libs/application/templates/healthcare-work-permit/src/fields/index.ts
- libs/application/templates/healthcare-work-permit/src/lib/index.ts
- libs/application/templates/healthcare-work-permit/src/lib/messages/confirmation.ts
- libs/application/templates/healthcare-work-permit/src/lib/messages/externalData.ts
- libs/application/templates/healthcare-work-permit/src/lib/messages/index.ts
- libs/application/templates/healthcare-work-permit/src/lib/messages/payment.ts
- libs/application/templates/healthcare-work-permit/src/shared/constants.ts
- libs/application/templates/healthcare-work-permit/src/shared/index.ts
- libs/application/templates/healthcare-work-permit/src/utils/EES.ts
- libs/application/templates/healthcare-work-permit/src/utils/formatDate.ts
- libs/application/templates/healthcare-work-permit/src/utils/index.ts
- libs/application/templates/healthcare-work-permit/tsconfig.json
- libs/application/templates/healthcare-work-permit/tsconfig.lib.json
- libs/application/templates/healthcare-work-permit/tsconfig.spec.json
- libs/clients/university-careers/src/lib/dto/index.ts
- tsconfig.base.json
Additional context used
Path-based instructions (31)
libs/application/templates/healthcare-work-permit/src/lib/constants.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/healthcare-work-permit/src/lib/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/healthcare-work-permit/src/lib/dataSchema.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/healthcare-work-permit/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/clients/university-careers/src/lib/dto/studentTrackDto.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/healthcare-work-permit/src/utils/getChargeItemCodes.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/healthcare-work-permit/src/dataProviders/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/clients/health-directorate/src/lib/healthDirectorateClient.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/healthcare-work-permit/src/lib/messages/application.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/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/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/application/templates/healthcare-work-permit/src/forms/Confirmation/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/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/selectWorkPermitSection.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/shared/constants/src/lib/chargeItemCode.ts (2)
Pattern
libs/shared/**/*
: "Confirm that the code adheres to the following:
- Cross-application utility functions, types, and constants.
- TypeScript best practices to ensure type safety and reusability.
- Documentation and examples for library consumers."
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/clients/health-directorate/src/lib/apiConfiguration.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.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/application/templates/healthcare-work-permit/src/lib/messages/personal.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/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/personalSection.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/healthcare-work-permit/src/forms/Prerequisites/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/application/templates/healthcare-work-permit/src/lib/messages/information.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/healthcare-work-permit/src/lib/messages/error.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/feature-flags/src/lib/features.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/healthcare-work-permit/src/fields/CustomFormConclusionSectionField/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/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.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/clients/health-directorate/src/lib/healthDirectorateClient.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."
libs/application/template-loader/src/lib/templateLoaders.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/types/src/lib/InstitutionMapper.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/types/src/lib/ApplicationTypes.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.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."
libs/application/template-api-modules/src/lib/modules/templates/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/clients/health-directorate/src/clientConfig.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/application/templates/healthcare-work-permit/src/assets/Logo.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."
Biome
libs/application/templates/healthcare-work-permit/src/assets/Logo.tsx
[error] 4-11: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)
For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.
Additional comments not posted (34)
libs/application/templates/healthcare-work-permit/src/lib/constants.ts (3)
3-3
: TheEvents
type declaration is correctly using theDefaultEvents
enum. Good use of TypeScript for type safety.
5-10
: TheStates
enum is well-defined, clearly representing the different stages of the application process.
12-14
: TheRoles
enum is simple and appropriate for the application's context, focusing on the user as theAPPLICANT
.libs/application/templates/healthcare-work-permit/src/lib/types.ts (2)
3-7
: TheMessage
interface is well-defined, suitable for handling localized messages in the application.
9-17
: ThePermitProgram
interface is flexible, with optional fields and integrated error handling using theMessage
type. This design supports varying data availability and error scenarios.libs/application/templates/healthcare-work-permit/src/lib/dataSchema.ts (2)
3-10
: BothUserInformationSchema
andSelectWorkPermitSchema
use Zod to enforce minimum string lengths, ensuring basic data validation.
12-16
: TheHealthcareWorkPermitSchema
is comprehensive, integrating sub-schemas and additional validation for theapproveExternalData
field. This ensures robust data integrity.libs/application/templates/healthcare-work-permit/src/index.ts (1)
1-18
: The organization of imports and exports in this file is efficient, enhancing modularity and maintainability. Dynamic imports forfields
anddataProviders
are particularly well-implemented for optimizing load times.libs/clients/university-careers/src/lib/dto/studentTrackDto.ts (2)
24-24
: The addition ofprogramId
toStudentTrackDto
is appropriate for identifying specific programs. Good use of optional typing for flexibility.
24-24
: ThemapToStudentTrackDto
function is well-implemented, with appropriate checks and clean data handling.libs/application/templates/healthcare-work-permit/src/utils/getChargeItemCodes.ts (2)
6-10
: ThegetChargeItemCodes
function effectively abstracts away details, providing a clean API for retrieving charge item codes.
12-33
: ThegetChargeItemCodesAndExtraLabel
function is well-structured and uses TypeScript features effectively to ensure type safety and handle potential undefined values.libs/application/templates/healthcare-work-permit/src/dataProviders/index.ts (1)
8-37
: The API configurations inindex.ts
are correctly set up usingdefineTemplateApi
, ensuring consistency and maintainability. Good use of external data identifiers for clarity.libs/clients/health-directorate/src/lib/healthDirectorateClient.types.ts (1)
49-57
: TheHealthcareWorkPermitRequest
interface is appropriately structured for capturing necessary details for a healthcare work permit application. The use of an array foreducation
allows handling multiple qualifications, which is a practical approach.libs/application/templates/healthcare-work-permit/src/lib/messages/application.ts (1)
3-37
: All message definitions are correctly internationalized and well-documented.libs/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/index.ts (1)
10-35
: The form structure is modular and integrates well with the defined sections and fields.Verification successful
The
HealthcareWorkPermitForm
is properly integrated and used within the application, specifically in theHealthcareWorkPermitTemplate.ts
file.
libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of HealthcareWorkPermitForm in the application. # Test: Search for the form usage in the application. Expect: Proper integration and usage. rg --type typescript $'HealthcareWorkPermitForm'Length of output: 82
Script:
#!/bin/bash # Description: Verify the integration of HealthcareWorkPermitForm in the application. # Test: Search for the form usage in the application. Expect: Proper integration and usage. rg --type ts $'HealthcareWorkPermitForm'Length of output: 644
libs/application/templates/healthcare-work-permit/src/forms/Confirmation/index.ts (1)
15-53
: The confirmation form is well-structured and covers all necessary aspects of the application's final stage.Verification successful
The search results indicate that the
ConfirmationForm
is used in multiple locations across different templates. However, the specific integration of theConfirmationForm
fromlibs/application/templates/healthcare-work-permit/src/forms/Confirmation/index.ts
is not explicitly verified in the context of its usage within the healthcare work permit application.To ensure proper integration, it is necessary to verify that the
ConfirmationForm
is correctly imported and utilized within the healthcare work permit application.
The search results show that the
ConfirmationForm
is defined in thelibs/application/templates/healthcare-work-permit/src/forms/Confirmation/index.ts
file, but there is no evidence of its import or usage elsewhere in the healthcare work permit application.To ensure proper integration, we need to verify that this form is imported and used in the relevant parts of the healthcare work permit application.
The previous script failed due to a regex parse error. To correct this, we need to escape the single quotes properly and ensure the search pattern is correctly formatted.
The previous attempts to verify the import and usage of
ConfirmationForm
failed due to regex parse errors. To address this, we should simplify the search pattern and ensure it correctly identifies the import statements.
The previous attempts to verify the import and usage of
ConfirmationForm
failed due to regex parse errors. To address this, we should simplify the search pattern and ensure it correctly identifies the import statements.
The search results indicate that the
ConfirmationForm
is imported dynamically in theHealthcareWorkPermitTemplate.ts
file. This confirms that theConfirmationForm
is indeed integrated into the healthcare work permit application.
libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts: import('../forms/Confirmation').then((val) =>
This dynamic import suggests that the
ConfirmationForm
is used within the healthcare work permit application, ensuring its proper integration.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of ConfirmationForm in the application. # Test: Search for the form usage in the application. Expect: Proper integration and usage. rg --type typescript $'ConfirmationForm'Length of output: 74
Script:
#!/bin/bash # Description: Verify the integration of ConfirmationForm in the application. # Test: Search for the form usage in the application. Expect: Proper integration and usage. rg --type ts 'ConfirmationForm'Length of output: 1479
Script:
#!/bin/bash # Description: Verify the import and usage of ConfirmationForm in the healthcare work permit application. # Test: Search for the import and usage of ConfirmationForm in the healthcare work permit application. rg --type ts 'ConfirmationForm' | grep 'healthcare-work-permit'Length of output: 169
Script:
#!/bin/bash # Description: Verify the import and usage of ConfirmationForm in the healthcare work permit application. # Test: Search for the import and usage of ConfirmationForm in the healthcare work permit application. rg --type ts "import { Confirmation } from './forms/Confirmation'"Length of output: 217
Script:
#!/bin/bash # Description: Verify the import and usage of ConfirmationForm in the healthcare work permit application. # Test: Search for the import and usage of ConfirmationForm in the healthcare work permit application. rg --type ts "import { Confirmation } from './forms/Confirmation'"Length of output: 217
Script:
#!/bin/bash # Description: Verify the import and usage of ConfirmationForm in the healthcare work permit application. # Test: Search for the import and usage of ConfirmationForm in the healthcare work permit application. rg --type ts "import { Confirmation } from"Length of output: 165
Script:
#!/bin/bash # Description: Verify the import and usage of ConfirmationForm in the healthcare work permit application. # Test: Search for the import and usage of ConfirmationForm in the healthcare work permit application. rg --type ts "Confirmation" | grep "import"Length of output: 11736
libs/shared/constants/src/lib/chargeItemCode.ts (1)
29-29
: LGTM! The addition ofHEALTHCARE_WORK_PERMIT
aligns with the PR's objectives.libs/clients/health-directorate/src/lib/apiConfiguration.ts (1)
12-12
: LGTM! The addition ofUmsoknStarfsleyfiApi
to the exported APIs supports the new healthcare work permit functionalities.Also applies to: 46-46
libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.module.ts (1)
24-50
: LGTM! TheHealthcareWorkPermitModule
is well-structured and correctly imports necessary configurations and client modules.libs/application/templates/healthcare-work-permit/src/lib/messages/personal.ts (1)
3-55
: LGTM! The message definitions inpersonal.ts
are clear and consistent, supporting the user interface of the healthcare work permit application effectively.libs/application/types/src/lib/InstitutionMapper.ts (1)
230-233
: LGTM! Please verify the correctness of thenationalId
andslug
values forHEALTHCARE_WORK_PERMIT
.Verification successful
The definitions for
InstitutionNationalIds.EMBAETTI_LANDLAEKNIS
andInstitutionTypes.EMBAETTI_LANDLAEKNIS
were found in the following files:
libs/application/types/src/lib/InstitutionNationalIds.ts
libs/application/types/src/lib/InstitutionTypes.ts
The values are:
InstitutionNationalIds.EMBAETTI_LANDLAEKNIS = '7101695009'
InstitutionTypes.EMBAETTI_LANDLAEKNIS = 'embaetti-landlaeknis'
These values appear to be consistent with the intended mappings for the healthcare work permit.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the national ID and slug values for the healthcare work permit. # Test: Check if the values match expected records. Expect: Values are correct. echo "Please manually verify the national ID and slug values with the institution records."Length of output: 178
Script:
#!/bin/bash # Locate and display the definition of InstitutionNationalIds.EMBAETTI_LANDLAEKNIS echo "Definition of InstitutionNationalIds.EMBAETTI_LANDLAEKNIS:" rg 'EMBAETTI_LANDLAEKNIS' --type js --type ts --type tsx # Locate and display the definition of InstitutionTypes.EMBAETTI_LANDLAEKNIS echo "Definition of InstitutionTypes.EMBAETTI_LANDLAEKNIS:" rg 'EMBAETTI_LANDLAEKNIS' --type js --type ts --type tsxLength of output: 411
Script:
#!/bin/bash # Locate and display the definition of InstitutionNationalIds.EMBAETTI_LANDLAEKNIS echo "Definition of InstitutionNationalIds.EMBAETTI_LANDLAEKNIS:" rg 'EMBAETTI_LANDLAEKNIS' --type js --type ts # Locate and display the definition of InstitutionTypes.EMBAETTI_LANDLAEKNIS echo "Definition of InstitutionTypes.EMBAETTI_LANDLAEKNIS:" rg 'EMBAETTI_LANDLAEKNIS' --type js --type tsLength of output: 2841
libs/application/types/src/lib/ApplicationTypes.ts (1)
59-59
: LGTM! Please ensure the translation keyhwp.application
is correctly set up in the localization files.Also applies to: 306-309
libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.service.ts (2)
66-75
: Class declaration and constructor setup look good.
121-140
: MethodgetMyHealthcareLicenses
is well-implemented with proper async handling and error management.libs/application/template-api-modules/src/lib/modules/templates/index.ts (4)
76-76
: The import ofHealthcareWorkPermitModule
is correctly placed and follows the existing pattern of module imports.
77-77
: The import ofHealthcareWorkPermitService
is correctly placed and follows the existing pattern of service imports.
187-187
: The addition ofHealthcareWorkPermitModule
to the exportedmodules
array is correct and ensures the module can be utilized appropriately within the application.
256-256
: The addition ofHealthcareWorkPermitService
to the exportedservices
array is correct and ensures the service can be utilized appropriately within the application.libs/clients/health-directorate/src/clientConfig.json (4)
884-933
: Review the newly addedNamsUpplysingar
schema for completeness and accuracy.The schema for
NamsUpplysingar
appears comprehensive and well-defined, covering various aspects of educational data.
192-248
: Validate the schema reference forUtbuaStarfsleyfiSkjalRequest
.Verification successful
The schema reference for
UtbuaStarfsleyfiSkjalRequest
is correctly defined in theclientConfig.json
file. The schema includes properties such asname
,dateOfBirth
,citizenship
,phoneNo
,idProfession
, andeducation
, along with their respective types and descriptions.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Validate the schema reference for `UtbuaStarfsleyfiSkjalRequest`. # Test: Search for the schema definition in the JSON file. Expect: Correct schema definition. rg --type json '"UtbuaStarfsleyfiSkjalRequest"' libs/clients/health-directorate/src/clientConfig.jsonLength of output: 143
Script:
#!/bin/bash # Description: Extract and display the full schema definition for `UtbuaStarfsleyfiSkjalRequest`. # Extract the schema definition from the JSON file. rg --type json -A 20 '"UtbuaStarfsleyfiSkjalRequest"' libs/clients/health-directorate/src/clientConfig.jsonLength of output: 792
Script:
#!/bin/bash # Description: Extract and display the full schema definition for `UtbuaStarfsleyfiSkjalRequest`. # Extract the schema definition from the JSON file with more lines to capture the complete definition. rg --type json -A 50 '"UtbuaStarfsleyfiSkjalRequest"' libs/clients/health-directorate/src/clientConfig.jsonLength of output: 1758
1020-1067
: Confirm the fields inUtbuaStarfsleyfiSkjalRequest
are necessary and secure.
934-995
: Ensure theStarfsleyfiUmsoknStarfsleyfi
schema aligns with data privacy regulations.libs/application/templates/healthcare-work-permit/src/assets/Logo.tsx (1)
3-42
: SVG structure and attributes are correctly implemented.The SVG code is well-structured and uses appropriate elements and attributes for displaying the logo. Good job on maintaining clean and readable code.
Tools
Biome
[error] 4-11: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)
For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.
...ation/templates/healthcare-work-permit/src/fields/CustomFormConclusionSectionField/index.tsx
Show resolved
Hide resolved
libs/clients/health-directorate/src/lib/healthDirectorateClient.service.ts
Outdated
Show resolved
Hide resolved
...i-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.service.ts
Outdated
Show resolved
Hide resolved
...mplates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/selectWorkPermitSection.ts
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15146 +/- ##
========================================
Coverage 37.12% 37.12%
========================================
Files 6448 6469 +21
Lines 131456 131729 +273
Branches 37588 37650 +62
========================================
+ Hits 48798 48910 +112
- Misses 82658 82819 +161
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 13 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- libs/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/personalSection.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/application/templates/healthcare-work-permit/src/forms/HealthcareWorkPermitForm/personalSection.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core files LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- .github/CODEOWNERS (1 hunks)
- apps/application-system/api/src/app/app.module.ts (2 hunks)
- libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.module.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/CODEOWNERS
Additional context used
Path-based instructions (2)
libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.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."
apps/application-system/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."
Biome
libs/application/template-api-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.module.ts
[error] 8-21: Avoid classes that contain only static members. (lint/complexity/noStaticOnlyClass)
Prefer using simple functions instead of classes with only static members.
Additional comments not posted (2)
apps/application-system/api/src/app/app.module.ts (2)
41-49
: The added imports are correctly placed and necessary for the new functionality pertaining to the healthcare work permit and university careers.
95-101
: The client configurations are correctly added to the global load array, ensuring that they are available throughout the application.
...pi-modules/src/lib/modules/templates/healthcare-work-permit/healthcare-work-permit.module.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Another employee from Norda approved this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- libs/application/core/src/lib/messages.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/application/core/src/lib/messages.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- tsconfig.base.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- tsconfig.base.json
...
Attach a link to issue if relevant
What
Specify what you're trying to achieve
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
Chores
tsconfig.base.json
to include the new healthcare work permit template library.