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

Added logic for showing "Track Shifting" button when patient has active shifting #6318

Merged
merged 8 commits into from
Sep 26, 2023

Conversation

thtauhid
Copy link
Contributor

@thtauhid thtauhid commented Sep 21, 2023

WHAT

🤖 Generated by Copilot at 55de92a

This file adds the functionality to view and track the shifting status of a patient in the consultation details page. It uses the existing listShiftRequests action and activeShiftingData state variable to fetch and display the shifting data. It also modifies the shift patient button to show the current shifting status and action.

Proposed Changes

@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 55de92a

  • Import and dispatch listShiftRequests action to fetch shifting data for a patient (link, link)
  • Declare and assign activeShiftingData state variable to store shifting data for a patient (link)
  • Define hasActiveShiftingRequest function to check if the patient has an active shifting request (link)
  • Modify conditional rendering of shift patient button in src/Components/Facility/ConsultationDetails/index.tsx to show track shifting option if the patient has an active shifting request (link)

@vercel
Copy link

vercel bot commented Sep 21, 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 26, 2023 11:58am

@netlify
Copy link

netlify bot commented Sep 21, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 834e5c9
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6512c7310f66b300083a72a9
😎 Deploy Preview https://deploy-preview-6318--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.

@thtauhid thtauhid marked this pull request as ready for review September 21, 2023 11:04
@thtauhid thtauhid requested a review from a team September 21, 2023 11:04
@thtauhid thtauhid requested a review from a team as a code owner September 21, 2023 11:04
@thtauhid
Copy link
Contributor Author

thtauhid commented Sep 21, 2023

Hi @nihal467
I have run the Cypress tests locally.

The "Create a New consultation to existing patient" test is failing.

It expects "Doctor Dev" in the "Treating Physician" field. But only "rocky sharma" exists in the dropdown.

I am also attaching the screenshots.
Patient Creation with consultation -- Create a New consultation to existing patient (failed) (attempt 3)

image

Can you please advise me what I should do?

Thanks

@rithviknishad
Copy link
Member

Ideally, you'll need to run cypress tests against ur local backend with the default dummy data

@thtauhid
Copy link
Contributor Author

@nihal467
Tests are passing locally
image

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 269d00f into coronasafe:develop Sep 26, 2023
33 checks passed
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.

Shifting request- enhancement
4 participants