-
Notifications
You must be signed in to change notification settings - Fork 200
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
Pdf export feature #2331
Pdf export feature #2331
Conversation
|
WalkthroughRecent updates to the Changes
Poem
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 (
|
PR Description updated to latest commit (da3d438) |
1 similar comment
PR Description updated to latest commit (da3d438) |
PR Review(Review updated until commit 8f21348)
Code feedback:
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
Persistent review updated to latest commit 8f21348 |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
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: 10
Out of diff range and nitpick comments (6)
apps/backoffice-v2/src/pages/Entity/pdfs/case-information/pages/TitlePage/title-page.schema.ts (1)
4-4
: Consider adding a comment explaining the purpose of extendingBaseCaseInformationPdfSchema
with an empty object, especially if future properties are expected to be added.apps/backoffice-v2/src/pages/Entity/pdfs/case-information/pages/CompanySanctionsPage/empty-company-sanctions.schema.ts (1)
4-4
: Consider adding a comment explaining the purpose of extendingBaseCaseInformationPdfSchema
with an empty object, especially if future properties are expected to be added.apps/backoffice-v2/src/pages/Entity/pdfs/case-information/pages/CompanyOwnershipPage/empty-company-ownership-page.schema.ts (1)
4-4
: Consider adding a comment explaining the purpose of extendingBaseCaseInformationPdfSchema
with an empty object, especially if future properties are expected to be added.apps/backoffice-v2/src/pages/Entity/pdfs/case-information/pages/IdentityVerificationsPage/empty-identity-verfications.schema.ts (1)
4-4
: Consider adding a comment explaining the purpose of extendingBaseCaseInformationPdfSchema
with an empty object, especially if future properties are expected to be added.apps/backoffice-v2/src/pages/Entity/pdfs/case-information/pages/IndividualSanctionsPage/components/IndividualSanctionsItem/ValueOrNone.tsx (1)
27-27
: Ensure type safety by explicitly handling the type conversion ofvalueOrNone(value)
.Consider using TypeScript's type assertion or a type guard to ensure the type of
valueOrNone(value)
matchesAnyChildren
.apps/backoffice-v2/src/lib/blocks/hooks/useUbosRegistryProvidedBlock/useUbosRegistryProvidedBlock.tsx (1)
5-5
: Consider adding JSDoc comments to theuseUbosRegistryProvidedBlock
hook to improve code documentation and developer understanding.Add JSDoc comments explaining the parameters and the return type of the
useUbosRegistryProvidedBlock
hook.
...information/pages/IndividualSanctionsPage/components/IndividualSanctionsItem/ValueOrNone.tsx
Show resolved
Hide resolved
...information/pages/IndividualSanctionsPage/components/IndividualSanctionsItem/ValueOrNone.tsx
Show resolved
Hide resolved
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/CaseOptions.tsx
Outdated
Show resolved
Hide resolved
...se/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/company-ownership-page.pdf.tsx
Outdated
Show resolved
Hide resolved
...se/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/company-sanctions-page.pdf.tsx
Outdated
Show resolved
Hide resolved
...s/Entity/pdfs/case-information/pages/IdentityVerificationsPage/IdentityVerificationsPage.tsx
Outdated
Show resolved
Hide resolved
...mponents/CaseOptions/hooks/useCaseOptionsLogic/renderers/identity-verifications-page.pdf.tsx
Outdated
Show resolved
Hide resolved
...office-v2/src/lib/blocks/hooks/useUbosRegistryProvidedBlock/useUbosRegistryProvidedBlock.tsx
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- services/workflows-service/scripts/seed.ts (3 hunks)
Additional comments not posted (2)
services/workflows-service/scripts/seed.ts (2)
4-4
: Import ofType
from@sinclair/typebox
added.This change allows for the use of
Type
in defining JSON schemas which is consistent with the PR objectives to enhance schema definitions.
7-7
: Import ofenv
from../src/env
.This import is crucial for accessing environment variables within the script, facilitating dynamic configuration.
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 UI
Review profile: CHILL
Files selected for processing (1)
- services/workflows-service/scripts/seed.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- services/workflows-service/scripts/seed.ts
User description
Description
Sample PDF
certificate).pdf
empty states .pdf
Type
enhancement
Description
CaseOptions
with functionality to download PDF certificates.IPDFRenderer
to standardize PDF rendering operations.Changes walkthrough
14 files
svg-to-png.ts
Add SVG to PNG Conversion Utility
apps/backoffice-v2/src/common/utils/svg-to-png/svg-to-png.ts
svgToPng
to convert SVG images to PNGformat.
fetchers.ts
Refactor Customer Data Schema Definition
apps/backoffice-v2/src/domains/customer/fetchers.ts
constant
CustomerSchema
.fetchCustomer
function to use the newCustomerSchema
.fetchers.ts
Enhance Workflow Fetchers with New Schemas and Fields
apps/backoffice-v2/src/domains/workflows/fetchers.ts
WorkflowDefinitionByIdSchema
andAmlSchema
.childWorkflows
toBaseWorkflowByIdSchema
.useUbosRegistryProvidedBlock.tsx
Export Ubo Type from useUbosRegistryProvidedBlock Hook
apps/backoffice-v2/src/lib/blocks/hooks/useUbosRegistryProvidedBlock/useUbosRegistryProvidedBlock.tsx
Ubo
from local to exported.Case.Actions.tsx
Integrate CaseOptions Component into Case Actions
apps/backoffice-v2/src/pages/Entity/components/Case/Case.Actions.tsx
CaseOptions
.CaseOptions
component into the UI.CaseOptions.tsx
Implement CaseOptions Component with PDF Download
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/CaseOptions.tsx
CaseOptions
component with dropdown menu for downloadingPDF certificates.
company-ownership-page.pdf.tsx
Add Company Ownership PDF Rendering Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/company-ownership-page.pdf.tsx
company-sanctions-page.pdf.tsx
Add Company Sanctions PDF Rendering Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/company-sanctions-page.pdf.tsx
identity-verifications-page.pdf.tsx
Add Identity Verifications PDF Rendering Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/identity-verifications-page.pdf.tsx
individual-sanctions-page.pdf.tsx
Add Individual Sanctions PDF Rendering Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/individual-sanctions-page.pdf.tsx
pdf-renderer.abstract.ts
Introduce Abstract PDF Renderer Class
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/pdf-renderer.abstract.ts
IPDFRenderer
for PDF renderingoperations.
registry-page.pdf.tsx
Add Registry Page PDF Rendering Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/registry-page.pdf.tsx
title-page.pdf.tsx
Add Title Page PDF Rendering Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/renderers/title-page.pdf.tsx
useCaseOptionsLogic.tsx
Implement PDF Certificate Generation and Download Logic
apps/backoffice-v2/src/pages/Entity/components/Case/components/CaseOptions/hooks/useCaseOptionsLogic/useCaseOptionsLogic.tsx
Summary by CodeRabbit
New Features
CaseOptions
component with dropdown menu for generating and opening PDF certificates.Bug Fixes
Documentation
Refactor
Chores