care_fe icon indicating copy to clipboard operation
care_fe copied to clipboard

made a reusable component for table in routine and nursing care procedures

Open Sahil-Sinha-11 opened this issue 1 year ago • 9 comments

Changes made fixes: https://github.com/ohcnetwork/care_fe/issues/8562

  1. Added a reusable component.
  2. fixed width of the 2nd column onwards

@ohcnetwork/care-fe-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

Sahil-Sinha-11 avatar Sep 24 '24 09:09 Sahil-Sinha-11

Deploy Preview for care-ohc ready!

Name Link
Latest commit 1a76ce1e5019c85feb9557677dd18777a7cf7a2d
Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/6731cf6fb1903000086d95c5
Deploy Preview https://deploy-preview-8608--care-ohc.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.

netlify[bot] avatar Sep 24 '24 09:09 netlify[bot]

image

  • [ ] add the translation to the options
  • [ ] the dates are shown as invalid under the nursing care section

image

  • [ ] as per issue, the first row should be frozen while scrolling, which is still not solved

@Sahil-Sinha-11 @rithviknishad

nihal467 avatar Sep 24 '24 13:09 nihal467

Hey @rithviknishad I am not able to find where the dates input for nursing care is . I think the format in which it is entered is giving invalid date. How can I change it? should i change the date format in the logUpdateAnalyseTable itself if it is in other format? 02:18 AM; "15/05/2024" to " 2024-09-20 09:24:23.859000+00:00 "

Sahil-Sinha-11 avatar Sep 27 '24 06:09 Sahil-Sinha-11

Hey @rithviknishad I fixed the date issue and fixed the 1st column in in mobile view.

Sahil-Sinha-11 avatar Sep 28 '24 15:09 Sahil-Sinha-11

Screenshot 2024-10-06 at 11 56 20 AM Hey @rithviknishad This is how the page looks like , please tell me if I need to change anything.

Sahil-Sinha-11 avatar Oct 06 '24 06:10 Sahil-Sinha-11

:wave: Hi, @Sahil-Sinha-11, 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[bot] avatar Oct 08 '24 08:10 github-actions[bot]

@Sahil-Sinha-11 fix the lint issue

nihal467 avatar Oct 08 '24 18:10 nihal467

LGTM @khavinshankar @rithviknishad @Sahil-Sinha-11 fix the lint issue

nihal467 avatar Oct 08 '24 18:10 nihal467

:wave: Hi, @Sahil-Sinha-11, 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[bot] avatar Oct 23 '24 10:10 github-actions[bot]

@nihal467 please check this PR and get it closed

bodhish avatar Nov 06 '24 08:11 bodhish

LGTM @rithviknishad @khavinshankar can you take over the PR and clear the merge conflict

nihal467 avatar Nov 08 '24 20:11 nihal467

Walkthrough

The changes in this pull request involve significant enhancements to the ConsultationNursingTab.tsx file, introducing a new component for displaying nursing care data. The NursingPlot component fetches daily rounds data and manages pagination, while the LogUpdateAnalayseTable component replaces the previous table structure for displaying results. The modifications aim to improve the modularity and presentation of nursing consultation data, integrating new data models and ensuring cohesive information display.

Changes

File Path Change Summary
src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx - Added NursingPlot component for fetching and displaying nursing data.
- Updated main export to include NursingPlot.
- Modified RoutineSection to use LogUpdateAnalayseTable.
src/Components/Facility/Consultations/LogUpdateAnalayseTable.tsx - Introduced LogUpdateAnalayseTable component for structured data display.
- Added SharedSectionTableProps interface for props definition.
src/Components/Facility/Consultations/NursingPlot.tsx - Removed NursingPlot component (previous version).

Assessment against linked issues

Objective Addressed Explanation
Make the Nursing Care section similar to the Routine Section by switching to a table layout (Make the component a reusable component to achieve it). (#8562)
Optional: feel free to improve the overall UI (borders or colors, etc.) (#8562) Unclear if UI improvements were made.

Possibly related PRs

  • #9006: This PR introduces the LogUpdateAnalayseTable component, which is directly utilized in the main PR's ConsultationNursingTab.tsx file, indicating a strong connection between the two changes.

Suggested labels

good to merge

Suggested reviewers

  • rithviknishad

Poem

In the nursing tab, oh what a sight,
With tables and plots, all done just right.
Data flows smoothly, like a gentle stream,
Enhancements abound, fulfilling the dream.
A hop and a skip, through code we shall glide,
Celebrating changes, with joy and with pride! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Nov 08 '24 20:11 coderabbitai[bot]

cosing in favor of #9079

github doesn't allow pushing changes to workflows on contributors repos

sainak avatar Nov 11 '24 09:11 sainak

I’m really sorry if I didn’t do it right. I’m still figuring things out, and I appreciate your patience. I’ll try to do better next time. Thanks for understanding. @rithviknishad I learned a lot, Thanks for the guidance 😀.

Sahil-Sinha-11 avatar Nov 11 '24 10:11 Sahil-Sinha-11

@Sahil-Sinha-11 you can reopen the pr and revert changes to the workflows folder, I had to close it because github was not allowing me to push to it

I'll add the changes from reviews to this pr itself

sainak avatar Nov 11 '24 11:11 sainak