-
Notifications
You must be signed in to change notification settings - Fork 487
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
zoom in out functionality added and added responsiveness for mobile s… #8336
Conversation
@Coderayush13 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site 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.
Could you discard all changes made to the Prescription's Print Preview? Adding zoom support alone to the PrintPreview component should be fine right?
<div className="mb-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-y-1.5 border-2 border-secondary-400 p-2"> | ||
<PatientDetail name="Patient" className="col-span-1 md:col-span-2 lg:col-span-2"> | ||
{patient && ( | ||
<> | ||
<span className="uppercase">{patient.name}</span> -{" "} | ||
{t(`GENDER__${patient.gender}`)},{" "} | ||
{patientAgeInYears(patient).toString()}yrs | ||
</> | ||
)} | ||
</PatientDetail> | ||
<PatientDetail name="IP/OP No." className="col-span-1 md:col-span-1 lg:col-span-1"> | ||
{encounter?.patient_no} | ||
</PatientDetail> | ||
|
||
<PatientDetail | ||
name={ | ||
encounter | ||
? `${t(`encounter_suggestion__${encounter.suggestion}`)} on` | ||
: "" | ||
} | ||
className="col-span-5" | ||
> | ||
{formatDate(encounter?.encounter_date)} | ||
</PatientDetail> | ||
<PatientDetail name="Bed" className="col-span-3"> | ||
{encounter?.current_bed?.bed_object.location_object?.name} | ||
{" - "} | ||
{encounter?.current_bed?.bed_object.name} | ||
</PatientDetail> | ||
<PatientDetail | ||
name={ | ||
encounter | ||
? `${t(`encounter_suggestion__${encounter.suggestion}`)} on` | ||
: "" | ||
} | ||
className="col-span-1 md:col-span-2 lg:col-span-2" | ||
> | ||
{formatDate(encounter?.encounter_date)} | ||
</PatientDetail> | ||
<PatientDetail name="Bed" className="col-span-1 md:col-span-1 lg:col-span-1"> | ||
{encounter?.current_bed?.bed_object.location_object?.name} | ||
{" - "} | ||
{encounter?.current_bed?.bed_object.name} | ||
</PatientDetail> | ||
|
||
<PatientDetail name="Allergy to medication" className="col-span-1 md:col-span-2 lg:col-span-4"> | ||
{patient?.allergies ?? "None"} | ||
</PatientDetail> |
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.
@ayushpatil2122 Like already mentioned in the issue, let's not make the print preview child responsive based on screen size. This would mean, the print output could differ on different screen size than what was shown in the preview.
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.
sorry i will fix that
<div className="pt-12"> | ||
<p className="font-medium text-secondary-800"> | ||
<div className="pt-12 px-4"> | ||
<p className="font-medium text-secondary-800 text-base"> |
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.
Let's not make changes to things that were not asked in the issue.
<p className="font-medium text-secondary-800 text-base"> | |
<p className="font-medium text-secondary-800"> |
@@ -150,31 +153,34 @@ const PrescriptionsTable = ({ | |||
} | |||
|
|||
if (!items.length) { | |||
return; | |||
return <div>No prescriptions available</div>; // Add a fallback message for empty items |
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.
return <div>No prescriptions available</div>; // Add a fallback message for empty items | |
return <div>No prescriptions available</div>; |
))} | ||
</tbody> | ||
</table> | ||
<div className="overflow-x-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.
Why was this made scrollable? Print preview content should not be scrollable within the paper view.
@ayushpatil2122 Were you able to make the changes? |
Closing due to inactivity and completed in #8487 |
…creen
Proposed Changes
Added a zoom in and zoom out in PrintPreview component added a button for zoom in and zoom out make a PrintPreview component responsive for mobile screen
PrintPreview
component #8323@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist