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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

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

@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 8dfc4d2
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/6720c9cba3c7550009128826
😎 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

@@ -25,6 +25,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
if (!(res?.ok && data)) {
navigate("/not-found");
}
console.log(data);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this console.log 👍

{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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
3 participants