-
Notifications
You must be signed in to change notification settings - Fork 243
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) O3-3521: Add configurable ability to print multiple stickers on the same page #1934
base: main
Are you sure you want to change the base?
Conversation
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker.modal.tsx
Outdated
Show resolved
Hide resolved
3fd3ae9
to
67b180a
Compare
a815733
to
245d57a
Compare
eea4160
to
0239db1
Compare
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
if (numberOfLabelColumns < 1 || numberOfLabelRowsPerPage < 1 || labels.length < 1) { | ||
return; | ||
} |
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.
Shouldn't this be validated properly, that we always have at least 1 sticker to print, min value of the fields must be set to 1
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.component.tsx
Outdated
Show resolved
Hide resolved
gridTemplateColumns: `repeat(${numberOfLabelColumns}, 1fr)`, | ||
gridTemplateRows: `repeat(${numberOfLabelRowsPerPage}, auto)`, |
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.
What if the pagesize
provided by the user is not able to accommodate the provided count, what will/should happen in such cases?
Thanks!
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.scss
Outdated
Show resolved
Hide resolved
packages/esm-patient-banner-app/src/banner-tags/print-identifier-sticker-content.scss
Outdated
Show resolved
Hide resolved
Why did we revert out the CSS property stuff? I also don't really understand the reversion to 2.x instead of 3.x... |
@ibacher i have created a separate ticket to track the migration here since the API was changing and there are many other printing spots around the patient chart beyond the Identifier-Sticker
Sorry @ibacher, I forgot to share here. Styles for some un-known reason were not being loaded into the print preview. For that reason, i was only able to print only a single page instead of 2 or more depending on the number of stickers per page and the number of rows and columns. Supplying styles directly Screen.Recording.2024-08-28.at.19.15.31.movSupplying styles indirectly using CSS file Screen.Recording.2024-08-28.at.19.17.47.mov |
Ping @jnsereko , is it clear to you how to move forward? |
… separator height
Co-authored-by: OpenMRS Bot <[email protected]>
…openmrs#2103) (feat) O3-4072: Improve Start Visit Form to Support Default Visit Type
Co-authored-by: OpenMRS Bot <[email protected]>
@jnsereko is this ready for re-review? Please request re-reviews when it is. |
i surely will @brandones. The best option is to pass a json schema as config and render the sticker as a pdf. I have logic for the first part but haven't found a good library to translate html to pdf. Such a library should have the following qualities.
|
Requirements
Summary
This PR adds the following configurability
This PR also adds ability to preview rows and columns before printing.
cc @denniskigen @vasharma05 @ibacher @pirupius
Screenshots
Video Preview
Related Issue
https://openmrs.atlassian.net/browse/O3-3521
Other
With a configuration like below
you get the following result