[ENG-584] feat: always show print appointment/accounts quick action#16463
[ENG-584] feat: always show print appointment/accounts quick action#16463Jacobjeevan wants to merge 4 commits into
Conversation
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Greptile SummaryThis PR makes the "Print Appointment" and "Accounts" quick actions always visible in the appointment detail view, regardless of appointment status. It also moves the "Token" heading inside its conditional block so it only renders when a token is present or can be generated, and adds
Confidence Score: 5/5Safe to merge — the change is a focused UI restructuring with no logic regressions and a minor bug fix for URL encoding. The restructuring correctly uses the existing AppointmentFinalStatuses and CancelledAppointmentStatuses constants to gate each action appropriately. The encodeURIComponent addition fixes a real edge case. No data mutations or state management are affected. No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "chore: further filtering for print appt/..." | Re-trigger Greptile |
Walkthrough
ChangesAppointmentDetail UI Restructure
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates the Appointment Detail page to keep key “quick actions” (printing the appointment and navigating to accounts) visible regardless of appointment status, and to only show the “Token” heading when a token exists or can be generated.
Changes:
- Always display “Print Appointment” and “Accounts” quick actions (even for final statuses).
- Move the “Token” section heading inside conditional branches so it only renders when relevant.
- Restructure the quick-actions rendering logic to separate always-available actions from status-dependent actions.
Deploying care-preview with
|
| Latest commit: |
d19f0ba
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c2ee5095.care-preview-a7w.pages.dev |
| Branch Preview URL: | https://eng-584-appointments.care-preview-a7w.pages.dev |
🎭 Playwright Test ResultsStatus: ✅ Passed
📊 Detailed results are available in the playwright-final-report artifact. Run: #9632 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/Appointments/AppointmentDetail.tsx`:
- Around line 540-548: The QuickAction component with actionId
"print-appointment" is wrapped in a conditional check that uses
CancelledAppointmentStatuses to hide the Print Appointment tile for
cancelled/no-show appointments. Remove the conditional wrapper (the line
checking `!CancelledAppointmentStatuses.includes(appointment.status)`) and
render the QuickAction component unconditionally so that the Print Appointment
action remains visible for all appointment statuses including cancelled and
no-show states.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8ac06a39-3605-48e4-b4d2-ee3ee36900f3
📒 Files selected for processing (1)
src/pages/Appointments/AppointmentDetail.tsx



Proposed Changes
Tagging: @ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit