Skip to content
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

Fix Conditional Rendering of TextAreaFormField for Sample Test Type #8960

Merged

Conversation

JavidSumra
Copy link
Contributor

@JavidSumra JavidSumra commented Oct 29, 2024

Proposed Changes

@ohcnetwork/care-fe-code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced internationalization support for the SampleDetails component, allowing dynamic translation of text for enhanced accessibility.
    • Expanded localization vocabulary with new medical terminology in the English language files.
  • Bug Fixes

    • Adjusted conditional rendering for the SampleTest component to improve display logic based on sample type selection.
    • Simplified sample type display logic in the SampleTestCard component for consistency.

These updates enhance user experience by improving language support and refining component functionality.

@JavidSumra JavidSumra requested a review from a team as a code owner October 29, 2024 08:33
Copy link

netlify bot commented Oct 29, 2024

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 685fd28
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/672e2d0353e510000720ac9e
😎 Deploy Preview https://deploy-preview-8960--care-ohc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JavidSumra JavidSumra changed the title update condition to render component Fix Conditional Rendering of TextAreaFormField for Sample Test Type Oct 29, 2024
Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solves the mentioned issue; but in the sample details page, the sample test type details (value entered in the text area) is not being shown. let's fix that too

image image

@JavidSumra
Copy link
Contributor Author

JavidSumra commented Oct 29, 2024

@rithviknishad Can I add extra space after type for that or just display it inline?

@rithviknishad
Copy link
Member

you can add it to the right (2nd col. of the grid) like others

@JavidSumra
Copy link
Contributor Author

@rithviknishad requested changes done

src/components/Patient/SampleDetails.tsx Outdated Show resolved Hide resolved
{sampleDetails?.sample_type === "OTHER TYPE" && (
<div>
<span className="font-semibold capitalize leading-relaxed">
Sample Type Description:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space after the colon, similar to what's there for other titles.

On a side note, now's probably the time to add in translations for these titles.

Copy link
Contributor Author

@JavidSumra JavidSumra Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So shall I need to add translation for each field title?
@Jacobjeevan

@khavinshankar
Copy link
Member

@Jacobjeevan @rithviknishad can u please re-review this

@nihal467
Copy link
Member

nihal467 commented Nov 4, 2024

@gigincg There is no product requirement for adding a text box for selecting other sample test types in the sample test request form. Can you provide insight into whether it's a required change or not?

@nihal467 nihal467 added the question Further information is requested label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text Area Not Visible When 'Other Type' is Selected in Sample Test Type
5 participants