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 action field in consultation form #6314

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Fix action field in consultation form #6314

merged 1 commit into from
Sep 21, 2023

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Sep 20, 2023

WHAT

🤖 Generated by Copilot at 26eab22

The pull request improves the ConsultationForm component to handle numeric actions, set default values, and clear fields appropriately. It also fixes a bug and enhances the document title with patient information.

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

HOW

🤖 Generated by Copilot at 26eab22

  • Change the type and initial value of the action property in the FormDetails interface and the initForm object to match the backend API and the TELEMEDICINE_ACTIONS array (link, link, link)
  • Add the handleFormFieldChange function to handle special cases when the user changes some form fields, such as setting default values or clearing other fields (link)
  • Use the handleFormFieldChange function as the onChange prop for the SelectFormField, MultilineInputField, and TextInputField components in the ConsultationForm component (link)
  • Change the set_form action in the fetchData function to merge the existing form values with the API response values, instead of replacing them (link)
  • Change the order of the statements in the fetchPatientName function to dispatch the action value from the API response before setting the patient name and facility name (link)
  • Update the dependencies of the useEffect hook in the ConsultationForm component to include the patientName and patientId variables (link)
  • Change the SelectFormField component for the action field to use the selectField helper function instead of the field helper function, and add the optionDescription prop (link)

@Ashesh3 Ashesh3 requested a review from a team September 20, 2023 18:58
@Ashesh3 Ashesh3 requested a review from a team as a code owner September 20, 2023 18:58
@vercel
Copy link

vercel bot commented Sep 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 20, 2023 6:58pm

@netlify
Copy link

netlify bot commented Sep 20, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 26eab22
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/650b40bb9d232200089d859e
😎 Deploy Preview https://deploy-preview-6314--care-egov-staging.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.

@cypress
Copy link

cypress bot commented Sep 20, 2023

Passing run #1290 ↗︎

0 75 0 0 Flakiness 0

Details:

Fix action field in consultation form
Project: CARE Commit: 26eab22d15
Status: Passed Duration: 03:36 💡
Started: Sep 20, 2023 7:02 PM Ended: Sep 20, 2023 7:05 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit f4bddb9 into develop Sep 21, 2023
33 of 40 checks passed
@khavinshankar khavinshankar deleted the issue-6298 branch September 21, 2023 06:02
@github-actions
Copy link

@Ashesh3 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

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.

"Action" in consultation update- not working
3 participants