-
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(license-service): update license service #15204
Conversation
WalkthroughThe recent updates significantly enhance the license service's functionality and structure by introducing new GraphQL DTOs, refining existing data models, and implementing new components. Key improvements include a more straightforward approach to localization, increased type specificity, and components designed to dynamically render license data and provide detailed views. These changes aim to improve user experience and streamline data handling within the service. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant LicenseService
participant Database
User->>Frontend: Request license overview
Frontend->>LicenseService: Fetch licenses
LicenseService->>Database: Query for licenses
Database-->>LicenseService: Return licenses data
LicenseService-->>Frontend: Send licenses data
Frontend-->>User: Display licenses overview
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 (
|
Datadog ReportAll test runs ✅ 69 Total Test Services: 0 Failed, 67 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (3) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15204 +/- ##
==========================================
+ Coverage 36.85% 36.86% +0.01%
==========================================
Files 6584 6584
Lines 134962 134952 -10
Branches 38533 38528 -5
==========================================
+ Hits 49745 49756 +11
+ Misses 85217 85196 -21
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…-service' into feat/update-license-service
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,judicial-system-api,judicial-system-digital-mailbox-api,judicial-system-backend,judicial-system-message-handler,judicial-system-robot-api,judicial-system-scheduler,judicial-system-xrd-api,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-endorsements-api,services-search-indexer,services-sessions,services-university-gateway,services-user-notification,services-user-profile,air-discount-scheme-web,skilavottord-web,web,application-system-form,island-ui-storybook,portals-admin,service-portal,system-e2e, |
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/service-portal/licenses/src/components/LicenseDataFields/LicenseDataFields.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/service-portal/licenses/src/components/LicenseDataFields/LicenseDataFields.tsx
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.
Beautiful ✨
libs/api/domains/license-service/src/lib/dto/GenericLicenseError.dto.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.
LGTM! Good job. Tested the app and the barcode worked in the app
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 (4)
- libs/api/domains/license-service/src/lib/dto/GenericLicenseError.dto.ts (1 hunks)
- libs/api/domains/license-service/src/lib/licenseService.service.ts (5 hunks)
- libs/service-portal/licenses/src/screens/v2/LicensesOverview/LicensesOverview.graphql (1 hunks)
- libs/service-portal/licenses/src/utils/capitalize.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- libs/service-portal/licenses/src/utils/capitalize.ts
Files skipped from review as they are similar to previous changes (2)
- libs/api/domains/license-service/src/lib/dto/GenericLicenseError.dto.ts
- libs/service-portal/licenses/src/screens/v2/LicensesOverview/LicensesOverview.graphql
Additional context used
Path-based instructions (1)
libs/api/domains/license-service/src/lib/licenseService.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."
Additional comments not posted (8)
libs/api/domains/license-service/src/lib/licenseService.service.ts (8)
Line range hint
68-76
:
Constructor simplification looks good.The removal of dependencies like
cmsContentfulService
andcacheManager
suggests improved maintainability and focus on core responsibilities.
Line range hint
275-288
:
Centralized client retrieval logic ingetClient
.The method improves code organization by centralizing client retrieval based on license type.
Line range hint
290-317
:
Improved error handling ingeneratePkPassUrl
.The method ensures that only clients supporting PkPass are processed, enhancing error handling.
Line range hint
319-346
:
Robust error handling ingeneratePkPassQRCode
.The method ensures that only clients supporting PkPass QR codes are processed, enhancing robustness.
Line range hint
408-493
:
Flexible and robustverifyLicenseBarcode
method.The method supports multiple barcode formats and includes structured error handling, enhancing flexibility and robustness.
Line range hint
95-135
:
Enhanced error handling and structured response ingetLicenseCollection
.The method now returns a
LicenseCollection
with explicit error handling, improving robustness.Ensure that the new return type is correctly handled in the rest of the codebase.
249-273
: Improved error handling ingetLicense
.The method now returns
GenericUserLicense
,LicenseError
, ornull
, enhancing robustness.Verify that the new return types are correctly handled in the codebase.
143-241
: Structured response and improved error handling ingetLicensesOfType
.The method now returns a
LicenseTypeFetchResponse
, enhancing clarity and maintainability.Verify that the new response structure is correctly utilized throughout the codebase.
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/feature-flags/src/lib/features.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/feature-flags/src/lib/features.ts
* feat:updat emodels * feat/bunch * feat: updates * feat: add and remove * chore: stash merge * feat: more stuff * fix: license type * feat: license overivew works * chore:revert * chore: revert messages * chore: console * chore: revert * chore: nx format:write update dirty files * fix: passports * chore: start details * chore: nx format:write update dirty files * feat: update details * fix: enum * fix: date format * fix: type import * chore:small fixes * chore:rename-liceinse-service ' ' * chore: remove original license service * chore: add unchanged license service * chore: add mocks back * chore: add to resolver * chore:renmae license * chore: readd licens service * fix: license-v2 * fix: readd ls-v1 * feat: rename * chore: nx format:write update dirty files * fix: passport display * chore: codeowners * chore: move datafields * fix: html semantics * fix:pkpass display * chore:console log * chore: use types * feat: remove v2 and merge in v1 * chore:import * fix: expires * fix:navigation * fix: mapping * chore: import * fix: time format * fix:fix * chore: clean up types * fix: async * fix: messages * fix: update display slightly * fix: mcoks * chore: deprecate model * chore: import clean up * fix: update mapping * chore: import clean up * fix: reimport reaect * chore: use tag map * chore: coderabbit improvements * fix: const issues * chore: concising --------- Co-authored-by: Þorkell Máni Þorkelsson <[email protected]> Co-authored-by: andes-it <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat:updat emodels * feat/bunch * feat: updates * feat: add and remove * chore: stash merge * feat: more stuff * fix: license type * feat: license overivew works * chore:revert * chore: revert messages * chore: console * chore: revert * chore: nx format:write update dirty files * fix: passports * chore: start details * chore: nx format:write update dirty files * feat: update details * fix: enum * fix: date format * fix: type import * chore:small fixes * chore:rename-liceinse-service ' ' * chore: remove original license service * chore: add unchanged license service * chore: add mocks back * chore: add to resolver * chore:renmae license * chore: readd licens service * fix: license-v2 * fix: readd ls-v1 * feat: rename * chore: nx format:write update dirty files * fix: passport display * chore: codeowners * chore: move datafields * fix: html semantics * fix:pkpass display * chore:console log * chore: use types * feat: remove v2 and merge in v1 * chore:import * fix: expires * fix:navigation * fix: mapping * chore: import * fix: time format * fix:fix * chore: clean up types * fix: async * fix: messages * fix: update display slightly * fix: mcoks * chore: deprecate model * chore: import clean up * fix: update mapping * chore: import clean up * fix: reimport reaect * chore: use tag map * chore: coderabbit improvements * fix: const issues * chore: concising --------- Co-authored-by: Þorkell Máni Þorkelsson <[email protected]> Co-authored-by: andes-it <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
What
Why
Feature deploy:
feat/update-license-service
Checklist:
Summary by CodeRabbit
New Features
LicenseDataFields
andLicenseDetail
for detailed views of licenses.licensesV2
feature.Improvements
Bug Fixes
Documentation
Style
Chores