-
Notifications
You must be signed in to change notification settings - Fork 514
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: The APPROVAL LETTER is not wrapped with the <PrintPreview> component #9479
FIXED: The APPROVAL LETTER is not wrapped with the <PrintPreview> component #9479
Conversation
WalkthroughThis pull request focuses on two primary changes: enhancing localization support in the Changes
Assessment against linked issues
Possibly related PRs
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 (2)
src/components/Resource/ResourceDetails.tsx (1)
70-78
: Consider standardizing translation key naming convention.Some translation keys use different formats:
date_and_time
(snake_case)unique_id
(snake_case)
while other keys in the file use different formats. Consider standardizing the naming convention across all translation keys.public/locale/en.json (1)
1214-1215
: Consider using more descriptive translation keys.While the translations are complete, some keys could be more descriptive:
quantity_approved
→resource_request_quantity_approved
quantity_requested
→resource_request_quantity_requested
resource_details
→resource_request_details
title_of_request
→resource_request_title
This would make the context clearer and improve maintainability.
Also applies to: 1268-1268, 1410-1410, 1412-1412
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
public/locale/en.json
(4 hunks)src/components/Resource/ResourceDetails.tsx
(5 hunks)
🔇 Additional comments (3)
src/components/Resource/ResourceDetails.tsx (3)
3-8
: LGTM! Imports align with PR objectives.
The new imports support:
- PrintPreview component for approval letter wrapping
- Button component from shadcn UI
- Internationalization support via useTranslation
198-203
: LGTM! PrintPreview implementation is correct.
The ApprovalLetter is properly wrapped with PrintPreview when in print mode, with translated title.
213-216
: LGTM! Button implementation follows shadcn design system.
The Button component is properly implemented with:
- Correct variant prop
- Icon integration
- Clear labeling
LGTM |
@modamaan 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
Fixes The APPROVAL LETTER is not wrapped with the <PrintPreview> component #9324
change 1
Change 2
update into shadcn button
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
New Features
PrintPreview
component for better print functionality in the Resource Details view.Bug Fixes
Refactor
ResourceDetails
component to utilize translation keys instead of hardcoded strings, enhancing internationalization support.