-
Notifications
You must be signed in to change notification settings - Fork 995
Fix incorrect resourceSubType filter applied to ServiceRequest charge items #15113
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
base: develop
Are you sure you want to change the base?
Conversation
…rgeItemsTable components
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughThis change introduces a new optional Changes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (13)**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.{tsx,jsx}📄 CodeRabbit inference engine (.cursorrules)
Files:
src/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{ts,tsx,css}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/pages/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{tsx,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{tsx,css}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.tsx📄 CodeRabbit inference engine (.cursor/rules/02-coding-standards.mdc)
Files:
**/*.{tsx,ts}📄 CodeRabbit inference engine (.cursor/rules/04-ui-components.mdc)
Files:
**/*.{ts,tsx,js,jsx,json,css,scss,html}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/components/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (8)📚 Learning: 2025-11-25T13:52:51.914ZApplied to files:
📚 Learning: 2025-11-25T13:53:20.837ZApplied to files:
📚 Learning: 2025-11-25T13:50:46.407ZApplied to files:
📚 Learning: 2025-11-25T13:50:46.407ZApplied to files:
📚 Learning: 2025-11-25T13:51:23.408ZApplied to files:
📚 Learning: 2025-12-17T19:47:58.152ZApplied to files:
📚 Learning: 2025-12-22T10:16:36.690ZApplied to files:
📚 Learning: 2024-12-10T02:49:05.600ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (3)
Comment |
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.
Pull request overview
This PR fixes an issue where the incorrect resourceSubType filter was being applied to charge items, specifically affecting ServiceRequest-related charge items. The fix makes the resource subtype explicit and configurable rather than hardcoded.
Changes:
- Added
resourceSubTypeas a configurable prop toAddMultipleChargeItemsSheetcomponent - Updated parent components to pass appropriate
resourceSubTypevalues based on their context - Removed hardcoded bed charges resource subtype from the sheet component
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
AddMultipleChargeItemsSheet.tsx |
Added resourceSubType prop to interface and replaced hardcoded bed charges subtype with the prop value |
BedChargeItemsTable.tsx |
Explicitly passes bed charges resource subtype when using the sheet component |
ChargeItemsSection.tsx |
Passes generic "other" resource subtype for service request charge items |
🎭 Playwright Test ResultsStatus: ❌ Failed
📊 Detailed results are available in the playwright-final-report artifact. Run: #4571 |
Proposed Changes
Fixes #15112
This pull request introduces improvements to how charge item resources are categorized and handled across billing components. The main change is the addition and propagation of a new
resourceSubTypeprop, allowing for more flexible and explicit assignment of resource subtypes when adding or displaying charge items. This refactor enhances code maintainability and enables future extensibility.Charge Item Resource Subtype Handling
resourceSubTypeprop to theAddMultipleChargeItemsSheetcomponent and its TypeScript interface, allowing parent components to specify the subtype dynamically. [1] [2]AddMultipleChargeItemsSheetin bothChargeItemsSectionandBedChargeItemsTablecomponents to pass the appropriateresourceSubTypevalue, making the resource subtype assignment explicit and context-aware. [1] [2]AddMultipleChargeItemsSheetto use the passed-inresourceSubTypeprop instead of hardcoding the value for bed charges, improving flexibility for different charge item types.Type Imports
ResourceCategorySubTypein relevant files to support the new prop and ensure type safety. [1] [2]Tagging: @ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.