-
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(driving-instructor-registrations): Add tabs for B and BE license #14609
Conversation
WalkthroughThe changes introduce a new feature to manage teacher rights and license categories ('B' and 'BE') in the driving license book system. Key updates include adding a Changes
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 (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14609 +/- ##
==========================================
+ Coverage 36.98% 37.05% +0.06%
==========================================
Files 6417 6424 +7
Lines 130864 130495 -369
Branches 37464 37242 -222
==========================================
- Hits 48402 48349 -53
+ Misses 82462 82146 -316
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 105 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 9 Total Test Services: 0 Failed, 9 Passed Test Services
🔻 Code Coverage Decreases vs Default Branch (1)
|
This PR's had a 15-day siesta. Lost its spark, did it? It's making an exit in 5 days unless the stale label disappears. |
This PR's had a 15-day siesta. Lost its spark, did it? It's making an exit in 5 days unless the stale label disappears. |
Datadog ReportAll test runs ✅ 41 Total Test Services: 0 Failed, 39 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (3) |
Affected services are: api,application-system-api,air-discount-scheme-web,skilavottord-web,web,application-system-form,island-ui-storybook,portals-admin,service-portal,system-e2e, |
...application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx
Outdated
Show resolved
Hide resolved
libs/clients/driving-license-book/src/lib/drivingLicenseBookType.types.ts
Outdated
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.
Actionable comments posted: 3
Outside diff range and nitpick comments (1)
libs/application/templates/driving-instructor-registrations/src/fields/ViewStudent/index.tsx (1)
47-47
: Add TypeScript documentation for the newlicenseCategory
prop.Consider adding a brief TypeScript comment above the
licenseCategory
prop to explain its purpose and usage within the component. This enhances maintainability and clarity for other developers.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (18)
- libs/api/domains/driving-license-book/src/index.ts (1 hunks)
- libs/api/domains/driving-license-book/src/lib/drivingLicenceBook.type.ts (1 hunks)
- libs/api/domains/driving-license-book/src/lib/drivingLicenseBook.resolver.ts (1 hunks)
- libs/api/domains/driving-license-book/src/lib/drivingLicenseBook.service.ts (3 hunks)
- libs/api/domains/driving-license-book/src/lib/dto/student.input.ts (1 hunks)
- libs/api/domains/driving-license-book/src/lib/utils/drivingLicenseBookMapper.ts (1 hunks)
- libs/application/template-api-modules/src/lib/modules/shared/api/driving-license/driving-license.service.ts (2 hunks)
- libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx (6 hunks)
- libs/application/templates/driving-instructor-registrations/src/fields/ViewStudent/index.tsx (2 hunks)
- libs/application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts (2 hunks)
- libs/application/templates/driving-instructor-registrations/src/graphql/queries.ts (1 hunks)
- libs/application/templates/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.ts (2 hunks)
- libs/application/templates/driving-instructor-registrations/src/lib/messages.ts (1 hunks)
- libs/application/templates/driving-instructor-registrations/src/types/enums.ts (1 hunks)
- libs/application/types/src/lib/template-api/shared-api/shared-api-definitions/driving-license.ts (1 hunks)
- libs/clients/driving-license-book/src/lib/drivingLicenseBookClient.service.ts (6 hunks)
- libs/clients/driving-license-book/src/lib/drivingLicenseBookType.types.ts (2 hunks)
- libs/clients/driving-license-book/src/utils/mappers.ts (4 hunks)
Files skipped from review due to trivial changes (2)
- libs/api/domains/driving-license-book/src/lib/dto/student.input.ts
- libs/application/templates/driving-instructor-registrations/src/types/enums.ts
Additional context used
Path-based instructions (16)
libs/api/domains/driving-license-book/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/application/types/src/lib/template-api/shared-api/shared-api-definitions/driving-license.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/driving-instructor-registrations/src/graphql/queries.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/driving-instructor-registrations/src/forms/instructorRegistrations.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/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.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/driving-license-book/src/lib/drivingLicenceBook.type.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/driving-license-book/src/lib/utils/drivingLicenseBookMapper.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/driving-license-book/src/lib/drivingLicenseBookType.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/api/domains/driving-license-book/src/lib/drivingLicenseBook.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/clients/driving-license-book/src/utils/mappers.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/driving-license-book/src/lib/drivingLicenseBook.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/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/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/template-api-modules/src/lib/modules/shared/api/driving-license/driving-license.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/templates/driving-instructor-registrations/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."
libs/clients/driving-license-book/src/lib/drivingLicenseBookClient.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/templates/driving-instructor-registrations/src/fields/ViewStudent/index.tsx (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (34)
libs/api/domains/driving-license-book/src/index.ts (1)
4-4
: Export ofTeacherRights
aligns with the new functionalities introduced.libs/application/types/src/lib/template-api/shared-api/shared-api-definitions/driving-license.ts (1)
10-13
: Definition ofGetTeacherRightsApi
is correctly implemented to support new teacher rights functionalities.libs/application/templates/driving-instructor-registrations/src/graphql/queries.ts (1)
45-46
: Updated GraphQL query correctly handles thelicenseCategory
parameter, aligning with the new functionality for B and BE licenses.libs/application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts (1)
44-48
: Addition ofGetTeacherRightsApi
as a data provider item is correctly implemented to support fetching teacher rights.libs/application/templates/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.ts (2)
12-12
: Import ofGetTeacherRightsApi
correctly added.
62-66
: Integration ofGetTeacherRightsApi
in the API array is correctly implemented.#!/bin/bash # Description: Verify the integration of GetTeacherRightsApi across the application. # Test: Search for the usage of GetTeacherRightsApi. Expect: Proper integration and no errors. rg --type typescript $'GetTeacherRightsApi'Also applies to: 73-73
libs/api/domains/driving-license-book/src/lib/drivingLicenceBook.type.ts (1)
119-123
: Definition ofTeacherRights
interface is correctly implemented and aligns with the new functionality requirements.libs/api/domains/driving-license-book/src/lib/utils/drivingLicenseBookMapper.ts (1)
33-38
: Updated calculation fortotalLessonTime
using reduce function is correctly implemented and enhances data accuracy.libs/clients/driving-license-book/src/lib/drivingLicenseBookType.types.ts (2)
71-71
: Addition of optionallicenseCategory
property inDrivingLicenseBookStudentInput
is correctly implemented and supports the new functionality.
171-175
: Consistent implementation ofTeacherRights
interface across different files enhances maintainability.libs/api/domains/driving-license-book/src/lib/drivingLicenseBook.service.ts (4)
19-19
: EnsureTeacherRights
is correctly imported and utilized.
88-94
: Verify the correct handling oflicenseCategory
ingetStudent
.#!/bin/bash # Description: Verify that the `licenseCategory` parameter is correctly handled in the `getStudent` method. # Test: Search for the method usage. Expect: Correct handling of the parameter. rg --type typescript $'getStudent'
100-107
: Ensure that thelicenseCategory
parameter is correctly propagated and utilized ingetStudentsForTeacher
.#!/bin/bash # Description: Verify that the `licenseCategory` parameter is correctly propagated in the `getStudentsForTeacher` method. # Test: Search for the method usage. Expect: Correct propagation of the parameter. rg --type typescript $'getStudentsForTeacher'
165-170
: Confirm thatgetTeacher
method correctly retrievesTeacherRights
.#!/bin/bash # Description: Verify that the `getTeacher` method correctly retrieves `TeacherRights`. # Test: Search for the method usage. Expect: Correct retrieval of `TeacherRights`. rg --type typescript $'getTeacher'libs/clients/driving-license-book/src/utils/mappers.ts (3)
8-8
: EnsureTeacherDetailsGetResponse
is correctly imported and utilized.
17-17
: EnsureTeacherRights
is correctly imported and utilized.
172-180
: Verify the correct mapping ofTeacherRights
fromTeacherDetailsGetResponse
.#!/bin/bash # Description: Verify that the `teacherRightsMapper` function correctly maps `TeacherRights` from `TeacherDetailsGetResponse`. # Test: Search for the function usage. Expect: Correct mapping of `TeacherRights`. rg --type typescript $'teacherRightsMapper'libs/api/domains/driving-license-book/src/lib/drivingLicenseBook.resolver.ts (1)
61-68
: Ensure thelicenseCategory
parameter is correctly handled in the GraphQL resolver.#!/bin/bash # Description: Verify that the `licenseCategory` parameter is correctly handled in the GraphQL resolver. # Test: Search for the resolver usage. Expect: Correct handling of the parameter. rg --type typescript $'drivingLicenseBookStudentsForTeacher'libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx (6)
10-10
: EnsureTabs
component is correctly imported and utilized.
25-26
: EnsureLicenseCategory
enum is correctly imported and utilized.
36-44
: Verify the correct handling oflicenseCategory
in the GraphQL query.#!/bin/bash # Description: Verify that the `licenseCategory` variable is correctly handled in the GraphQL query. # Test: Search for the query usage. Expect: Correct handling of the variable. rg --type typescript $'InstructorsStudentsQuery'
56-61
: Confirm thatteacherRights
are correctly retrieved and utilized to conditionally display tabs.#!/bin/bash # Description: Verify that `teacherRights` are correctly retrieved and utilized in the component. # Test: Search for the component usage. Expect: Correct retrieval and utilization of `teacherRights`. rg --type typescript $'StudentsOverview'
96-122
: Ensure the conditional rendering logic for tabs based oncurrentTab
andteacherRights
is correct.#!/bin/bash # Description: Verify that the conditional rendering logic for tabs based on `currentTab` and `teacherRights` is correct. # Test: Search for the component usage. Expect: Correct conditional rendering logic. rg --type typescript $'StudentsOverview'
240-240
: Confirm thatlicenseCategory
is correctly passed to theViewStudent
component.#!/bin/bash # Description: Verify that the `licenseCategory` is correctly passed to the `ViewStudent` component. # Test: Search for the component usage. Expect: Correct passing of `licenseCategory`. rg --type typescript $'ViewStudent'libs/application/template-api-modules/src/lib/modules/shared/api/driving-license/driving-license.service.ts (1)
17-17
: EnsureTeacherRights
is utilized effectively in the service.libs/application/templates/driving-instructor-registrations/src/lib/messages.ts (2)
130-139
: Ensure new message definitions align with UI requirements.The new message definitions for the B and BE license tabs are clear and consistent with existing message structures. Ensure they align with the UI requirements and are correctly utilized in the UI components.
147-151
: Review the specificity of the new message for BE license.The message for the BE license is specific and clearly differentiates from the general B license, which is good for user clarity.
libs/clients/driving-license-book/src/lib/drivingLicenseBookClient.service.ts (4)
32-32
: EnsureTeacherRights
is properly integrated into the service.
42-42
: Review the integration ofteacherRightsMapper
.The integration of
teacherRightsMapper
is appropriate and follows the existing pattern of utilizing mappers for data transformation in this service.
183-190
: Review the handling oflicenseCategory
ingetStudentsForTeacher
.The addition of
licenseCategory
togetStudentsForTeacher
method is a significant enhancement that allows filtering students based on their license type. Ensure this parameter is properly handled in all related API calls.
423-430
: Review the implementation ofgetTeacher
.The method
getTeacher
correctly utilizes theteacherRightsMapper
to transform the API response intoTeacherRights
. This is consistent with the service's pattern of using mappers for data transformation.libs/application/templates/driving-instructor-registrations/src/fields/ViewStudent/index.tsx (3)
54-54
: Ensure consistent usage of thelicenseCategory
prop throughout the component.The addition of
licenseCategory
to the destructured props in the function signature is correctly implemented and used consistently in the GraphQL query.
70-70
: Review the fetch policy setting in the GraphQL query.Setting the
fetchPolicy
to 'no-cache' ensures that the most current data is fetched each time, which is appropriate for dynamic student data that might change frequently.
67-67
: Validate thelicenseCategory
prop to ensure it matches expected values.#!/bin/bash # Description: Verify that the `licenseCategory` prop is always passed as 'B' or 'BE' throughout the application. # Test: Search for incorrect usages of the `licenseCategory` prop. Expect: No occurrences of incorrect values. rg --type typescript --glob '*.{ts,tsx}' 'licenseCategory: [^'\'']B'\'']'Ensure that the
licenseCategory
prop is always either 'B' or 'BE'. This validation is crucial to prevent runtime errors and ensure data integrity.
...n/template-api-modules/src/lib/modules/shared/api/driving-license/driving-license.service.ts
Show resolved
Hide resolved
libs/clients/driving-license-book/src/lib/drivingLicenseBookClient.service.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.
Actionable comments posted: 1
Outside diff range and nitpick comments (2)
libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx (2)
Line range hint
166-169
: Use self-closing tags for JSX elements without children to improve readability and adhere to best practices.- <T.HeadData style={styles.tableStyles}></T.HeadData> + <T.HeadData style={styles.tableStyles} />
Line range hint
176-176
: Use optional chaining to safely access properties on potentially undefined objects.- student.totalLessonCount.toFixed(2) ?? 0 + student.totalLessonCount?.toFixed(2) ?? 0This change ensures that the code does not throw an error if
totalLessonCount
is undefined.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx (5 hunks)
- libs/application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts (3 hunks)
- libs/application/templates/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.ts (2 hunks)
- libs/application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.ts (1 hunks)
Additional context used
Path-based instructions (4)
libs/application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.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/driving-instructor-registrations/src/forms/instructorRegistrations.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/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.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/driving-instructor-registrations/src/fields/StudentsOverview/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."
Biome
libs/application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.ts
[error] 26-26: Avoid the use of spread (
...
) syntax on accumulators. (lint/performance/noAccumulatingSpread)Spread syntax should be avoided on accumulators (like those in
.reduce
) because it causes a time complexity ofO(n^2)
.
Consider methods such as .splice or .push instead.libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx
[error] 166-169: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)
Unsafe fix: Use a SelfClosingElement instead
[error] 176-176: Change to an optional chain. (lint/complexity/useOptionalChain)
Unsafe fix: Change to an optional chain.
Additional comments not posted (3)
libs/application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts (2)
44-48
: Ensure that the new data providerGetTeacherRightsApi
is correctly integrated and utilized in the form.
64-65
: Confirm that theallowBELicense
feature flag is effectively used to conditionally render form fields.libs/application/templates/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.ts (1)
56-67
: Confirm that the feature flags are correctly used to conditionally load the form configuration based on theALLOW_BE_LICENSE
flag.
...application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.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.
Actionable comments posted: 4
Outside diff range and nitpick comments (3)
libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx (3)
Line range hint
166-169
: Use self-closing tags for empty JSX elements.In JSX, elements without children should be self-closing to improve readability and conform to style guidelines.
- <Tabs - selected={currentTab} - onlyRenderSelectedTab={true} - label={''} + <Tabs + selected={currentTab} + onlyRenderSelectedTab={true} + label={''} />
Line range hint
176-176
: Utilize optional chaining for safer property access.Using optional chaining can prevent runtime errors when accessing properties on objects that might be
undefined
ornull
.- student.totalLessonCount.toFixed(2) ?? 0 + student.totalLessonCount?.toFixed(2) ?? 0
244-244
: Ensure consistency in prop passing.It's good practice to maintain consistency in how props are passed to components. Here,
licenseCategory
is passed explicitly, but other props related to the student could be structured similarly for clarity.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx (5 hunks)
- libs/application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts (3 hunks)
- libs/application/templates/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.ts (2 hunks)
- libs/application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.ts (1 hunks)
- libs/clients/driving-license-book/src/lib/drivingLicenseBookType.types.ts (2 hunks)
Additional context used
Path-based instructions (5)
libs/application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.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/driving-instructor-registrations/src/forms/instructorRegistrations.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/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.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/driving-license-book/src/lib/drivingLicenseBookType.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/driving-instructor-registrations/src/fields/StudentsOverview/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."
Biome
libs/application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.ts
[error] 26-26: Avoid the use of spread (
...
) syntax on accumulators. (lint/performance/noAccumulatingSpread)Spread syntax should be avoided on accumulators (like those in
.reduce
) because it causes a time complexity ofO(n^2)
.
Consider methods such as .splice or .push instead.libs/application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx
[error] 166-169: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing. (lint/style/useSelfClosingElements)
Unsafe fix: Use a SelfClosingElement instead
[error] 176-176: Change to an optional chain. (lint/complexity/useOptionalChain)
Unsafe fix: Change to an optional chain.
Additional comments not posted (3)
libs/application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts (1)
64-66
: Validate theallowBELicense
flag usage.Ensure that the
allowBELicense
flag is being correctly passed and utilized in all relevant components and queries. This is crucial for feature flag management and to avoid unexpected behavior.libs/application/templates/driving-instructor-registrations/src/lib/InstructorRegistrationsTemplate.ts (1)
56-67
: Ensure dynamic form loading based on feature flags.The implementation dynamically loads the form configuration based on the
ALLOW_BE_LICENSE
feature flag. This is a good practice for feature toggling and ensures that the application can adapt to configuration changes without redeployment.libs/clients/driving-license-book/src/lib/drivingLicenseBookType.types.ts (1)
171-175
: Add newTeacherRights
interface.The addition of the
TeacherRights
interface aligns with the new functionalities introduced in the PR, such as handling different types of driving lessons and rights management for instructors.
...application/templates/driving-instructor-registrations/src/lib/getApplicationFeatureFlags.ts
Show resolved
Hide resolved
.../application/templates/driving-instructor-registrations/src/forms/instructorRegistrations.ts
Show resolved
Hide resolved
libs/clients/driving-license-book/src/lib/drivingLicenseBookType.types.ts
Show resolved
Hide resolved
...application/templates/driving-instructor-registrations/src/fields/StudentsOverview/index.tsx
Show resolved
Hide resolved
* fix(inheritance-report): EFS touch ups (#15161) * fix(inheritance-report): EFS touch ups * done texts * tweaks * texts * removed unused files --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * feat(license-service): less contentful (#15088) * feat: less contentful * chore:use reaodnly * chore: remove unnecessary * chore: console logs --------- Co-authored-by: Þorkell Máni Þorkelsson <mani@hugsmidjan.is> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * chore(user-profile): Remove migration worker and make user profile strict (#14791) * Remove worker and make user profile strict * Fix dependant type errors. --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * feat(j-s): Actor title in indictment confirmation pt2 (#15149) * Convert px to pts * Use Pts instead of pxls * Refactoring * Revert change * Tweeks to COA * Tweeks to COA * Smaller COA * Cleanup * Make title optional * Don't use Beygla for confirmation * Move confirmation stamp from pxls to pts * Remove debug code * Fix lint --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * feat(driving-instructor-registrations): Add tabs for B and BE license (#14609) * add tabs for B and BE license * set no-cache on query * fetch license category specific book * only display tabs for teachers with multiple rights * add feature flag * remove console logs * address comments --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix: formstepper formatMessage * chore: simplify slightly * fix(ojoi): Datepicker default date (#15177) --------- Co-authored-by: albinagu <47886428+albinagu@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Þorkell Máni Þorkelsson <wowthorkell@gmail.com> Co-authored-by: Þorkell Máni Þorkelsson <mani@hugsmidjan.is> Co-authored-by: Sævar Már Atlason <54210288+saevarma@users.noreply.github.com> Co-authored-by: Ívar Oddsson <ivaroddsson@gmail.com> Co-authored-by: juni-haukur <158475136+juni-haukur@users.noreply.github.com> Co-authored-by: Þórður H <thordur@hugsmidjan.is>
…#14609) * add tabs for B and BE license * set no-cache on query * fetch license category specific book * only display tabs for teachers with multiple rights * add feature flag * remove console logs * address comments --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…#14609) * add tabs for B and BE license * set no-cache on query * fetch license category specific book * only display tabs for teachers with multiple rights * add feature flag * remove console logs * address comments --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
...
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
TeacherRights
interface to manage teacher permissions and details.licenseCategory
parameter in various components and services, enabling better categorization and filtering of driving students and lessons.Enhancements
StudentsOverview
component with tabs for different license categories, enhancing user experience.licenseCategory
for more specific data retrieval.Documentation