Skip to content

fix(pharmacist): stop silent failure when redirecting to Inventory - #283

Merged
vishwab1 merged 1 commit into
vb/hwc-3.8.1from
sn/fix-pharmacist-inventory-redirect-3.8.1
Aug 4, 2026
Merged

fix(pharmacist): stop silent failure when redirecting to Inventory#283
vishwab1 merged 1 commit into
vb/hwc-3.8.1from
sn/fix-pharmacist-inventory-redirect-3.8.1

Conversation

@snehar-nd

Copy link
Copy Markdown
Contributor

InventoryService.current_language_set was declared but never assigned, so the guard's error-alert branch threw instead of showing a message whenever authKey/facility/host was missing — masking the real problem and making the redirect look like a no-op. Populate it from HttpServiceService.currentLangugae$, the same pattern AuthGuard already uses.

Also guard getppID() against a missing serviceLineDetails entry (JSON.parse(null).parkingPlaceID threw before the redirect could fire), and fix the setLanguage fallback check in worklist.component (sessionStorage.getItem returns null, never undefined).

📋 Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

InventoryService.current_language_set was declared but never
assigned, so the guard's error-alert branch threw instead of
showing a message whenever authKey/facility/host was missing —
masking the real problem and making the redirect look like a
no-op. Populate it from HttpServiceService.currentLangugae$, the
same pattern AuthGuard already uses.

Also guard getppID() against a missing serviceLineDetails entry
(JSON.parse(null).parkingPlaceID threw before the redirect could
fire), and fix the setLanguage fallback check in worklist.component
(sessionStorage.getItem returns null, never undefined).
@coderabbitai

coderabbitai Bot commented Aug 4, 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: 83252fda-b4a1-477d-8a07-a8eac246ebb1

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

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@vishwab1
vishwab1 merged commit 5d02ddb into vb/hwc-3.8.1 Aug 4, 2026
5 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