made a reusable component for table in routine and nursing care procedures
Changes made fixes: https://github.com/ohcnetwork/care_fe/issues/8562
- Added a reusable component.
- 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
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
- [ ] add the translation to the options
- [ ] the dates are shown as invalid under the nursing care section
- [ ] as per issue, the first row should be frozen while scrolling, which is still not solved
@Sahil-Sinha-11 @rithviknishad
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 "
Hey @rithviknishad I fixed the date issue and fixed the 1st column in in mobile view.
: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.
@Sahil-Sinha-11 fix the lint issue
LGTM @khavinshankar @rithviknishad @Sahil-Sinha-11 fix the lint issue
: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.
@nihal467 please check this PR and get it closed
LGTM @rithviknishad @khavinshankar can you take over the PR and clear the merge conflict
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
LogUpdateAnalayseTablecomponent, which is directly utilized in the main PR'sConsultationNursingTab.tsxfile, 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?
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
cosing in favor of #9079
github doesn't allow pushing changes to workflows on contributors repos
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 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