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 and review after fields to copy from consultation page to log update #5348

Closed
wants to merge 4 commits into from

Conversation

aeswibon
Copy link
Member

@aeswibon aeswibon commented Apr 17, 2023

Bug Fix

WHAT

🤖 Generated by Copilot at d4bc6d0

Improved the logic and UI of the daily rounds component for patient consultations. Used more descriptive state variable names and reduced unnecessary API calls. Added a debug log in DailyRounds.tsx.

Proposed Changes

  • Added action and review_interval to take values from previous log

Associated Issue

@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 the screenshot or demo video for the changelog entry, and attach it to issue
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at d4bc6d0

  • Rename actions to action in initForm object to match API field name (link)
  • Add prevAction state variable to store previous action for patient (link)
  • Fetch patient name, facility name, previous review interval and action from API and set them in state variables in useEffect hook (link)
  • Convert useEffect hook and fetchHasPreviousLog function to anonymous async functions for simplicity (link, link)
  • Remove redundant fetchPatientName and fetchHasPreviousLog function calls (link, link)
  • Replace action and review_interval properties in data object with prevAction and prevReviewInterval state variables when saving consultation update (link)
  • Update action input field to use and set prevAction state variable on change (link)
  • Update review_interval input field to use and set prevReviewInterval state variable on change (link)

@aeswibon aeswibon requested a review from a team April 17, 2023 17:51
@aeswibon aeswibon requested a review from a team as a code owner April 17, 2023 17:51
@aeswibon aeswibon added needs testing P1 breaking issue or vital feature labels Apr 17, 2023
@vercel
Copy link

vercel bot commented Apr 17, 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 May 8, 2023 7:19am

@netlify
Copy link

netlify bot commented Apr 17, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 72f6783
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6458a20cb03cfe0008d59b74
😎 Deploy Preview https://deploy-preview-5348--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 settings.

@nihal467
Copy link
Member

@cp-Coder I holding this PR, as a co-related issue that need to be fixed before this #5342

@nihal467 nihal467 added the hold label Apr 18, 2023
@Ashesh3 Ashesh3 mentioned this pull request Apr 19, 2023
4 tasks
@nihal467 nihal467 removed the hold label May 3, 2023
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label May 4, 2023
@github-actions
Copy link

github-actions bot commented May 4, 2023

👋 Hi, @cp-Coder,
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.

@aeswibon aeswibon removed the merge conflict pull requests with merge conflict label May 4, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 8, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
29.5% 29.5% Duplication

@nihal467
Copy link
Member

nihal467 commented May 8, 2023

LGTM

@khavinshankar
Copy link
Member

@ cp-Coder seems there are no changes in code, some other pr might have handled it. So closing this pr, feel free to open it if needed.

cc: @nihal467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 breaking issue or vital feature tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the action and review after fields in log update are to be copied from consultation page
3 participants