-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Implement appointment notification bell in sidebar #15247
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?
feat: Implement appointment notification bell in sidebar #15247
Conversation
- Added AppointmentNotificationBell component with appointment count badge - Integrated bell into AppSidebar footer (centered) - Added appointments.list API integration with silent mode - Added necessary translations - Fixes ohcnetwork#11568
|
WalkthroughAdds an appointment notification bell component to the sidebar (shows today's appointment count), adds three localization keys, updates Changes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview Deployment Ready!🔗 Preview URL: https://pr-15247.care-preview-a7w.pages.dev 📱 Mobile Access: This preview will be automatically updated when you push new commits to this PR. |
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: 4
🤖 Fix all issues with AI agents
In @.env:
- Around line 11-13: Update the tracked REACT_CARE_API_URL in .env to the
production fallback (use https://careapi.ohc.network as in .example.env) and
remove the localhost value; then create a local-only .env.local containing
REACT_CARE_API_URL=http://127.0.0.1:9000 for development. Keep
REACT_SBOM_BASE_URL unchanged in the shared .env. Ensure .env.local is listed in
.gitignore so local overrides are not committed.
In `@public/locale/en.json`:
- Around line 682-685: Replace the non-pluralized key appointments_today_count
that uses "(s)" with proper pluralization — either convert it to an ICU plural
string or create separate keys (e.g., appointments_today_count_one and
appointments_today_count_other) and use the existing pattern used by
appointments_scheduled_for_day_link_one/other; then update the call site that
reads appointments_today_count to pass the count and select the correct plural
key or use ICU plural formatting so screen readers and translations get correct
singular/plural forms.
In `@src/components/ui/sidebar/AppointmentNotificationBell.tsx`:
- Around line 15-17: Reorder the imports so third-party modules come first: move
the useQuery import from "@tanstack/react-query" into the third-party group
above the internal/aliased imports (scheduleApi and query); update the import
ordering around the symbols useQuery, scheduleApi, and query so linter/style
rules for import groups are satisfied.
- Around line 29-30: The current computation of today uses UTC via toISOString()
which can produce the wrong local date; update AppointmentNotificationBell.tsx
to compute the local date using date-fns (e.g. import format from 'date-fns' and
set the today variable with format(new Date(), 'yyyy-MM-dd')) so the component
uses the user’s local date; ensure you add the date-fns import at the top and
replace the existing today assignment that references toISOString().
abhi-battula
left a 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.
Hi @suhaan-24 ,
please refrain from opening a PR until the issue is assigned. Thanks.
|
I am Sorry @abhi-battula. I will look upto it |
No worries, thanks for understanding. And no need to call me sir 🙂 |
adarsh-priydarshi-5646
left a 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.
@suhaan-24 Kindly ensure that an issue is assigned to you before creating a PR. PRs without assigned issues will be treated as spam.
|
I am sorry @adarsh-priydarshi-5646 , I am new to open source, This won't be repeated |
Tagging: @ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
New Features
Localization