-
Notifications
You must be signed in to change notification settings - Fork 558
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
Fixed facility selection issue in UserAddEditForm #9503
Conversation
WalkthroughThe pull request introduces modifications to several components, primarily focusing on the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
CARE
|
Project |
CARE
|
Branch Review |
fix-facility-select
|
Run status |
|
Run duration | 05m 17s |
Commit |
|
Committer | Khavin Shankar |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
139
|
View all changes introduced in this branch ↗︎ |
Deploying care-fe with
|
Latest commit: |
ac57899
|
Status: | ✅ Deploy successful! |
Preview URL: | https://b53f4a4f.care-fe.pages.dev |
Branch Preview URL: | https://fix-facility-select.care-fe.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
cypress/e2e/patient_spec/PatientConsultationDischarge.cy.ts
(2 hunks)
🧰 Additional context used
📓 Learnings (1)
cypress/e2e/patient_spec/PatientConsultationDischarge.cy.ts (1)
Learnt from: Jacobjeevan
PR: ohcnetwork/care_fe#9145
File: cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts:93-94
Timestamp: 2024-11-18T10:48:08.501Z
Learning: In `cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts`, bed capacity verification assertions after patient admission are already being performed elsewhere, so adding them here is unnecessary.
🔇 Additional comments (2)
cypress/e2e/patient_spec/PatientConsultationDischarge.cy.ts (2)
28-28
: LGTM: Viewport configuration ensures consistent test environment.
Setting a fixed viewport size is a good practice for maintaining consistent test behavior across different environments.
28-28
: Verify relevance of test changes to PR scope.
These changes appear to be unrelated to the PR's main objective of fixing facility selection in UserAddEditForm. Consider:
- Moving the viewport configuration to a separate PR for test improvements
- Removing the unrelated discharge verification change
This will help maintain a focused PR that addresses only the facility selection issue.
Also applies to: 121-121
LGTM |
@khavinshankar Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
The issue was that because the SelectFacility component was not a form field, the values of facilities field was not stored inside Form component's state. Previously we were using formData (state from Form component) in handleSubmit, now were are use the state.form (state for UserAddEditForm) in handleSubmit.
Summary by CodeRabbit
Bug Fixes
facilities
property in the form to ensure proper assignment when falsy values are encountered.New Features
PatientInfoCard
component by adding a role attribute to dropdown options.Tests