-
Notifications
You must be signed in to change notification settings - Fork 516
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
Remove duplicate age #9928
base: develop
Are you sure you want to change the base?
Remove duplicate age #9928
Conversation
WalkthroughThe pull request modifies 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/pages/Appointments/AppointmentDetail.tsx (1)
294-295
: LGTM! Consider these minor improvementsThe changes successfully remove the duplicate age display while maintaining a clean and readable format. Two suggestions for enhancement:
- Consider moving the years translation into the age display for better readability:
- {differenceInYears( - new Date(), - appointment.patient.date_of_birth!, - )} - </> - )}{" "} - {t("years")} + {`${differenceInYears( + new Date(), + appointment.patient.date_of_birth!, + )} ${t("years")}`} + </> + )}
- Add an aria-label for better accessibility:
- <p className="text-gray-600"> + <p className="text-gray-600" aria-label={`${t("date_of_birth_and_age")}`}>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/Appointments/AppointmentDetail.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: cypress-run (1)
{differenceInYears( | ||
new Date(), | ||
appointment.patient.date_of_birth!, | ||
)} | ||
</> | ||
)} |
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.
So, patient can register with either year of birth or date of birth. If they fill out date of birth, BE will automatically populate year of birth as well.
If they only provide year of birth, date of birth will be unpopulated. So you will have to add this back and only trigger it if date of birth isn't available.
Proposed Changes
BEFORE
AFTER
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit