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

User (Doctor) Autocomplete for Consultation Verified By #6194

Merged
merged 13 commits into from
Sep 7, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Aug 31, 2023

WHAT

🤖 Generated by Copilot at c8d2e64

The pull request adds a user autocomplete field for selecting the verifying doctor in a consultation form and displays the verifying doctor's information in the consultation details. It also refactors the user types and improves the user filtering logic. The affected files are ConsultationForm.tsx, models.tsx, UserAutocompleteFormField.tsx, and ConsultationDetails.tsx.

Required Backends:

Proposed Changes

image

@coronasafe/care-fe-code-reviewers @coronasafe/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

HOW

🤖 Generated by Copilot at c8d2e64

  • Add verified_by_object property to ConsultationModel and FormDetails to store the user object of the verifying doctor (link, link)
  • Display the full name and active status of the verifying doctor in ConsultationDetails using verified_by_object or deprecated_verified_by as a fallback (link)
  • Replace TextAreaFormField with UserAutocompleteFormField for the verified_by field in ConsultationForm to allow selecting a user from a filtered list (link)
  • Pass the search_filter and query parameters to getFacilityUsers in UserAutocompleteFormField to filter the facility users by the search text and other criteria (link)
  • Handle the change and error events of the user autocomplete field in ConsultationForm and update the verified_by and verified_by_object properties accordingly (link, link, link)
  • Remove the verified_by property from the set_form action of the dispatch function in ConsultationForm and add the verified_by and verified_by_object properties instead (link, link)
  • Define UserBareMinimum type to represent the minimal user object with id and username and use it as a base type for other user types and as a property type for other models (link, link, link, link, link)
  • Pass the label prop to the UserAutocompleteFormField component for the assigned_to field in ConsultationForm to specify the label text for the field (link)

@rithviknishad rithviknishad requested a review from a team August 31, 2023 11:36
@rithviknishad rithviknishad requested a review from a team as a code owner August 31, 2023 11:36
@rithviknishad rithviknishad requested a review from bodhish August 31, 2023 11:36
@vercel
Copy link

vercel bot commented Aug 31, 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 7, 2023 5:00pm

@netlify
Copy link

netlify bot commented Aug 31, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 31ec62a
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64fa018e52e64a0008d30310
😎 Deploy Preview https://deploy-preview-6194--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.

@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Aug 31, 2023
@rithviknishad rithviknishad removed the cypress failed pull request with cypress test failure label Sep 4, 2023
@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Sep 4, 2023
@nihal467
Copy link
Member

nihal467 commented Sep 5, 2023

@rithviknishad modify the cypress test

@rithviknishad rithviknishad removed the cypress failed pull request with cypress test failure label Sep 5, 2023
@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Sep 5, 2023
@rithviknishad
Copy link
Member Author

@nihal467 cypress will keep failing here until backend is merged

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

👋 Hi, @rithviknishad,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@nihal467 nihal467 added the urgent label Sep 7, 2023
@rithviknishad rithviknishad removed the merge conflict pull requests with merge conflict label Sep 7, 2023
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Sep 7, 2023
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

👋 Hi, @rithviknishad,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@rithviknishad rithviknishad removed the merge conflict pull requests with merge conflict label Sep 7, 2023
@github-actions github-actions bot added cypress failed pull request with cypress test failure and removed cypress passed labels Sep 7, 2023
@nihal467
Copy link
Member

nihal467 commented Sep 7, 2023

LGTM

@github-actions github-actions bot added cypress passed and removed cypress failed pull request with cypress test failure labels Sep 7, 2023
@khavinshankar khavinshankar merged commit 0c2be8b into develop Sep 7, 2023
24 checks passed
@khavinshankar khavinshankar deleted the consultation-verifiedby-user branch September 7, 2023 17:18
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

@rithviknishad 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.

Consultation form is malfunctioning Consultation- verified by doctor- change to dropdown
3 participants