-
Notifications
You must be signed in to change notification settings - Fork 92
Create print button #10507
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
Create print button #10507
Conversation
# Conflicts: # packages/client/src/v2-events/components/forms/File.interaction.stories.tsx # packages/client/src/v2-events/components/forms/FormFieldGenerator/FormSectionComponent.tsx
This comment has been minimized.
This comment has been minimized.
cibelius
left a comment
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.
All the PR check failures need to be fixed, will review again after that is done
packages/migration/src/migrations/events/1746712582483_create_events_and_actions_tables.sql
Show resolved
Hide resolved
| ? findActiveDraftForEvent(event, remoteDraft) | ||
| : undefined | ||
|
|
||
| const emptyDraft = createEmptyDraft(event.id, createTemporaryId(), 'DECLARE') |
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.
need further clarification about which actionTypes can be passed here
| throw Error(res.statusText) | ||
| } | ||
| const response = await res.json() | ||
| const response: IApplicationConfigResponse = await res.json() |
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.
these changes are failing storybook stories locally and in CI
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.
I made the default HTTP handlers in Storybook now return a 8 byte string as the "font". Previously it seemed like our http handlers were internally making requests to country config to fetch the fonts. Not sure how it ever worked as CI certainly doens't have country config running
| return HttpResponse.arrayBuffer(fontArrayBuffer) | ||
| }), | ||
|
|
||
| http.get('/api/countryconfig/fonts/NotoSans-Bold.ttf', async () => { |
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.
storybook interactions passing locally now, but still failing when snapshots are being taken a tad early, do we need to introduce a delay in the snapshot?
…isation isn't slown down
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.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| // If even one of the parts is undefined or null, then return empty string | ||
| const idParts = args.slice(0, -1) | ||
| if (idParts.some((part) => part === undefined)) { | ||
| if (idParts.some((part) => !isNil(part))) { |
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.
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.
@pankaj-pant note this. I changed it to isNil(part)
…s tennis club membership cert expects there to be a PRINT_CERTIFICATE action
| // If even one of the parts is undefined or null, then return empty string | ||
| const idParts = args.slice(0, -1) | ||
| if (idParts.some((part) => part === undefined)) { | ||
| if (idParts.some((part) => !isNil(part))) { |
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.
| createdBySignature: userDetails.localRegistrar?.signature, | ||
| createdAtLocation: userDetails.primaryOffice.id as UUID | ||
| } | ||
| ] |
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.
Bug: Invalid Action Type Causes Runtime Errors
The AlphaPrintButton component creates an optimistic action with DECLARATION_ACTION_UPDATE as its type. This string constant is not a valid ActionType enum value, causing type mismatches and runtime errors when the action is processed or used in an EventDocument.
| mobile: '+260911111111', | ||
| email: '[email protected]', | ||
| role: { | ||
| id: TestUserRole.Enum.SOCIAL_WORKER, |
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.
…ing there is nothing when app inits
|
E2Es passing here @bvenceslas @pankaj-pant https://github.com/opencrvs/e2e/actions/runs/18240400113 |
All change requests resolved, and tests passing in CI and in e2e
Description
This PR is made to create a Print Button that will facilitate Madagascar to print the certificate in offline mode.
The print button will be used on the review page.
country confid PR
Issues
[Issue #10039 ]
Issue #10102
Checklist