-
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(web): Journeyman list - display national id field #15645
Conversation
WalkthroughThe recent modifications enhance the 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 Configuration File (
|
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 (5)
- apps/web/components/connected/syslumenn/TableLists/JourneymanList/JourneymanList.tsx (2 hunks)
- apps/web/components/connected/syslumenn/TableLists/JourneymanList/queries.ts (1 hunks)
- libs/clients/syslumenn/src/clientConfig.json (3 hunks)
- libs/clients/syslumenn/src/lib/syslumennClient.types.ts (1 hunks)
- libs/clients/syslumenn/src/lib/syslumennClient.utils.ts (1 hunks)
Additional context used
Path-based instructions (5)
apps/web/components/connected/syslumenn/TableLists/JourneymanList/queries.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."
libs/clients/syslumenn/src/lib/syslumennClient.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."
apps/web/components/connected/syslumenn/TableLists/JourneymanList/JourneymanList.tsx (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."
libs/clients/syslumenn/src/lib/syslumennClient.utils.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/syslumenn/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."
Additional comments not posted (8)
apps/web/components/connected/syslumenn/TableLists/JourneymanList/queries.ts (1)
10-10
: LGTM! Ensure API schema alignment.The addition of
nationalId
to the GraphQL query looks good. Verify that the API schema has been updated to includenationalId
.libs/clients/syslumenn/src/lib/syslumennClient.types.ts (1)
400-400
: LGTM! Verify optionality consistency.The addition of
nationalId
as an optional property in theJourneymanLicence
interface looks good. Ensure that this optionality is consistent across the codebase.Verification successful
Optionality of
nationalId
is consistent across the codebase.The
nationalId
property in theJourneymanLicence
interface is consistently treated as optional in both TypeScript and GraphQL models.
- TypeScript Interface:
nationalId
is optional inlibs/clients/syslumenn/src/lib/syslumennClient.types.ts
.- GraphQL Model:
nationalId
is optional inlibs/api/domains/syslumenn/src/lib/models/journeymanLicence.ts
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the usage of `nationalId` is consistent with its optionality across the codebase. # Test: Search for `JourneymanLicence` usage. Expect: Handling of `nationalId` as an optional property. rg --type typescript 'JourneymanLicence'Length of output: 75
Script:
#!/bin/bash # Corrected script to search for `.ts` files instead of using an unrecognized file type. # Test: Search for `JourneymanLicence` usage. Expect: Handling of `nationalId` as an optional property. rg 'JourneymanLicence' --glob '*.ts' -A 5Length of output: 6224
apps/web/components/connected/syslumenn/TableLists/JourneymanList/JourneymanList.tsx (2)
289-293
: LGTM! Verify the display logic fornationalId
.The display of
nationalId
in the table looks good. Ensure that the data is correctly fetched and displayed.
265-265
: Ensure consistency in header labeling.The header label for
dateOfPublication
is still present. Confirm that this is intentional and aligns with the UI requirements.Verification successful
Header Labeling for
dateOfPublication
is ConsistentThe usage of
dateOfPublication
in theJourneymanList
component is consistent with the header label 'Útgáfuár'. This aligns with the UI requirements as observed in the code. No inconsistencies were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistency of header labeling in the `JourneymanList` component. # Test: Check for occurrences of `dateOfPublication` in the component. Expect: Consistent use across headers and data display. rg --type tsx 'dateOfPublication'Length of output: 61
Script:
#!/bin/bash # Description: Verify the consistency of header labeling in the `JourneymanList` component. # Test: Check for occurrences of `dateOfPublication` in the component without specifying file type. rg 'dateOfPublication'Length of output: 2335
libs/clients/syslumenn/src/lib/syslumennClient.utils.ts (1)
559-561
: LGTM! Verify the function usage in the codebase.The inclusion of the
nationalId
field in themapJourneymanLicence
function is consistent with the data model and PR objectives.Ensure that all usages of
mapJourneymanLicence
are updated to accommodate the new parameter.Verification successful
Function Usage Verified
The
mapJourneymanLicence
function is used inlibs/clients/syslumenn/src/lib/syslumennClient.service.ts
and appears to be implemented correctly with the updated signature. No further changes are necessary.
- File:
libs/clients/syslumenn/src/lib/syslumennClient.service.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `mapJourneymanLicence` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'mapJourneymanLicence'Length of output: 83
Script:
#!/bin/bash # Description: Verify all function calls to `mapJourneymanLicence` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'mapJourneymanLicence'Length of output: 1583
libs/clients/syslumenn/src/clientConfig.json (3)
3213-3215
: Addition of "kennitala" field is appropriate.The "kennitala" field is correctly added as a string, aligning with its use as a personal identifier in the schema. Ensure that any corresponding application code is updated to handle this new field.
3438-3440
: Addition of "kennitala" field is appropriate.The "kennitala" field is correctly added as a string, consistent with its role as a personal identifier. Ensure that any related application logic is updated to utilize this field.
4636-4638
: Addition of "arfshlutfall" field is appropriate.The "arfshlutfall" field is added as a number with a decimal format, which is suitable for representing fractional values. Ensure that the application logic correctly handles this new field.
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 (2)
- apps/web/components/connected/syslumenn/TableLists/JourneymanList/JourneymanList.tsx (6 hunks)
- libs/api/domains/syslumenn/src/lib/models/journeymanLicence.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/web/components/connected/syslumenn/TableLists/JourneymanList/JourneymanList.tsx
Additional context used
Path-based instructions (1)
libs/api/domains/syslumenn/src/lib/models/journeymanLicence.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 (1)
libs/api/domains/syslumenn/src/lib/models/journeymanLicence.ts (1)
15-16
: Addition ofnationalId
field is appropriate.The
nationalId
field is correctly added as an optional field with a nullable GraphQL annotation, aligning with the PR's objectives. This enhances theJourneymanLicence
class by allowing the representation of national identification.
Datadog ReportAll test runs ✅ 101 Total Test Services: 0 Failed, 99 Passed Test ServicesThis report shows up to 10 services
|
* Add national id field to journeyman table view * Display publication date * Allow for national id search * Add field to gql model * Change table header display name --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Add national id field to journeyman table view * Display publication date * Allow for national id search * Add field to gql model * Change table header display name --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Journeyman list - display national id field
What
Checklist:
Summary by CodeRabbit
New Features
nationalId
property in the JourneymanLicence interface for better identification.Bug Fixes
These changes enhance user experience by improving data visibility and retrieval capabilities.