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

consultationDetails.tsx file broken down into smaller components fixes #5830 #5838

Closed
wants to merge 3 commits into from

Conversation

nazrul7711
Copy link

@nazrul7711 nazrul7711 commented Jul 5, 2023

WHAT

🤖 Generated by Copilot at 37ce728

The pull request adds several new components to the src/Components/Facility directory, each corresponding to a different tab for displaying consultation data. The components use a common interface defined in src/Common/constants.tsx to receive props from the parent component. The components also import and render various plot, table, and file upload components from other directories. The purpose of the changes is to enhance the user interface and functionality of the consultation feature.
The task was to break ConsultationDetails.tsx files into smaller components.

Proposed Changes

I made the following components.

  1. ConsultationUpdatesTab
  2. ConsultationFeedTab
  3. ConsultationSummaryTab
  4. ConsultationMedicinesTab
  5. ConsultationFilesTab
  6. ConsultationABGTab
  7. ConsultationNursingTab
  8. ConsultationNeurologicalMonitoringTab
  9. ConsultationVentilatorTab
  10. ConsultationNutritionTab
  11. ConsultationPressureSoreTab
  12. ConsultationDialysisTab
  13. ConsultationInvestigationsTab

@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 37ce728

  • Import types for consultation and patient data (link)
  • Define common props interface for consultation tabs (link)
  • ABG analysis tab (link)
  • Dialysis tab (link)
  • Camera feed tab (link)
  • File upload tab (link)
  • Investigations tab (link)
  • Medicines tab (link)
  • Neurological monitoring tab (link)
  • Nursing analysis tab (link)
  • Nutrition tab (link)
  • Pressure sore tab (link)
  • Primary parameters tab (link)
  • Respiratory support tab (link)
    defined ConsultationTabProps in common/constanct.tsx then I broke consultationDetail.tsx into smaller components . All the component logic which was based on condition tab==="condition" was moved to a separate component , then I defined a object name CONSULTATION_TAB where I defined the key as the "condition" and the value as those components and instead of conditional rendering I used const SelectedTab = CONSULTATION_TAB[tab] to render a single component depending upon the tab selected.

@nazrul7711 nazrul7711 requested a review from a team July 5, 2023 09:20
@nazrul7711 nazrul7711 requested a review from a team as a code owner July 5, 2023 09:20
@nazrul7711 nazrul7711 requested a review from gigincg July 5, 2023 09:20
@vercel
Copy link

vercel bot commented Jul 5, 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 Jul 14, 2023 10:06am

@netlify
Copy link

netlify bot commented Jul 5, 2023

Deploy Preview for care-egov-staging ready!

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

@rithviknishad rithviknishad linked an issue Jul 5, 2023 that may be closed by this pull request
2 tasks
src/Components/Facility/ConsultationDetails.tsx Outdated Show resolved Hide resolved
src/Common/constants.tsx Outdated Show resolved Hide resolved
src/Components/Facility/ConsultationABGTab.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

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

@github-actions
Copy link

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 14, 2023
@nazrul7711
Copy link
Author

hey @rithviknishad kindly review pr i have resolved the merge conflicts

@github-actions github-actions bot removed the stale label Jul 15, 2023
@khavinshankar khavinshankar added needs testing needs review and removed merge conflict pull requests with merge conflict labels Jul 18, 2023
@khavinshankar
Copy link
Member

@rithviknishad can you review this again

@rithviknishad
Copy link
Member

@nazrul7711 did you forget to push your changes before you requested review?

@nazrul7711
Copy link
Author

hey @rithviknishad I think i have messed sth in pr, its not allowing me to push down changes m closing this one and making a fresh PR

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.

Code Refactor: ConsultationDetails.tsx
3 participants