Skip to content

fix(doctor-worklist): guard against undefined success message in care-context popup - #286

Merged
vanitha1822 merged 1 commit into
vb/hwc-3.8.1from
sn/fix-doctor-worklist-undefined-popup-rebased
Aug 26, 2026
Merged

fix(doctor-worklist): guard against undefined success message in care-context popup#286
vanitha1822 merged 1 commit into
vb/hwc-3.8.1from
sn/fix-doctor-worklist-undefined-popup-rebased

Conversation

@snehar-nd

Copy link
Copy Markdown
Contributor

Rebased replacement for #284, which was cut from main and therefore carried 17 unrelated commits (CLAUDE.md, CONTRIBUTING.md, auth-guard fix, jasmine bump, environment.*.ts edits) into the vb/hwc-3.8.1 release line and could not merge. This branch is a clean descendant of vb/hwc-3.8.1 with only the fix.

Problem

After a beneficiary returns from the lab and the doctor clicks Update on the doctor worklist, getHealthIDDetails() concatenated res.data.response straight 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 inside getHealthIDDetails(), so all 16 call sites that pass res.data.response raw are covered by the single change.

Verification

  • Prettier: clean
  • ESLint: clean
  • Commit subject 83 chars, within commitlint's 100-char limit
  • Diff is 1 file, +5 −1; fast-forwardable onto vb/hwc-3.8.1 with no conflict

Supersedes #284 — that PR can be closed.

🤖 Generated with Claude Code

…-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>
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 66e3ca09-b3c6-4de6-a09e-6b7b94bc3b8a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@vanitha1822
vanitha1822 merged commit 164a180 into vb/hwc-3.8.1 Aug 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants