fix(doctor-worklist): guard against undefined success message in care-context popup - #286
Conversation
…-context popup After a beneficiary returns from the lab and the doctor clicks Update, getHealthIDDetails() concatenated res.data.response directly into the popup text. When that field was falsy, `undefined + '. '` rendered the literal word "undefined" in the success dialog. Fall back to a proper success string, matching the pattern already used by the initial Save flow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|



Rebased replacement for #284, which was cut from
mainand therefore carried 17 unrelated commits (CLAUDE.md, CONTRIBUTING.md, auth-guard fix, jasmine bump,environment.*.tsedits) into thevb/hwc-3.8.1release line and could not merge. This branch is a clean descendant ofvb/hwc-3.8.1with only the fix.Problem
After a beneficiary returns from the lab and the doctor clicks Update on the doctor worklist,
getHealthIDDetails()concatenatedres.data.responsestraight into the care-context popup text. When that field was null/undefined,undefined + '. 'rendered the literal word "undefined" in the success dialog.Fix
Fall back to
alerts.info.datafillSuccessfully(then a plain English default), matching the pattern the initial Save flow already uses a few lines above. The guard sits insidegetHealthIDDetails(), so all 16 call sites that passres.data.responseraw are covered by the single change.Verification
vb/hwc-3.8.1with no conflictSupersedes #284 — that PR can be closed.
🤖 Generated with Claude Code