-
Notifications
You must be signed in to change notification settings - Fork 536
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
ResourceUpdates Bug Fix #10341
ResourceUpdates Bug Fix #10341
Conversation
WalkthroughThe pull request introduces modifications to the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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. |
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: 0
🧹 Nitpick comments (1)
src/components/Resource/ResourceDetailsUpdate.tsx (1)
140-140
: LGTM! Consider adding type safety for status values.The conversion to lowercase ensures consistent status handling, fixing potential case-sensitivity issues. However, consider using a TypeScript enum or union type for status values to catch potential mismatches at compile time.
type ResourceStatus = (typeof RESOURCE_STATUS_CHOICES)[number]['text'];
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Resource/ResourceDetailsUpdate.tsx
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: cypress-run (1)
🔇 Additional comments (1)
src/components/Resource/ResourceDetailsUpdate.tsx (1)
236-237
: LGTM! Verify facility selection persistence.The change correctly aligns the facility selection state with the form submission structure. Please verify that:
- Selected facility persists after selection
- Facility data is correctly submitted to the API
✅ Verification successful
✅ Facility state management change verified
The change from
assigned_facility_object
toassigned_facility
is consistent with the codebase patterns. No legacy references remain, and the implementation aligns with both the form submission structure and other FacilitySelect usages in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify consistent facility state management across the codebase # Check for any remaining references to assigned_facility_object rg "assigned_facility_object" --type ts --type tsx # Check the pattern of facility selection handling in other components ast-grep --pattern 'FacilitySelect { $$$ selected={$_} setSelected={$_} $$$ }'Length of output: 167
Script:
#!/bin/bash # Search for assigned_facility_object references rg "assigned_facility_object" -t ts rg "assigned_facility_object" -t typescript # Look for FacilitySelect component usage patterns ast-grep --pattern ' <FacilitySelect $$$ selected={$_} setSelected={$_} $$$ />' # Search for facility state management patterns rg "setFacility|assigned_facility" -t ts -t typescript -A 2 -B 2Length of output: 1553
@Jacobjeevan 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! 🙌 |
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit