Skip to content

feat(outbound): phase 7c — outbound worklist hub, dial hand-offs and outbound call loop#10

Open
Madhav2402 wants to merge 4 commits into
feat/phase7b-supervisor-shellfrom
feat/phase7c-outbound-worklist
Open

feat(outbound): phase 7c — outbound worklist hub, dial hand-offs and outbound call loop#10
Madhav2402 wants to merge 4 commits into
feat/phase7b-supervisor-shellfrom
feat/phase7c-outbound-worklist

Conversation

@Madhav2402

Copy link
Copy Markdown
Contributor

📋 Description


✅ 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)

What's in this PR

Worklist hub + three tabs (app-modules/outbound/)

  • Route OutboundCallWorklistsComponent (old path verbatim) → tab hub: generic (call/outboundCallList, is1097:true, optional assignedUserID like the old service), Everwell (everwellCall/outboundCallList, with the checkIfAlreadyCalled pre-dial guard — old semantics kept exactly: flag absent → no dial, true → alert, false → dial, read off the top-level envelope like the old extractData), grievance (getGrievanceOutboundWorklist; the backend's severety / beneficiaryRegId field spellings kept verbatim)
  • Faithful table columns, client-side search filters, last-call/N/A cell logic
  • Shared OutboundDialService — one CZentrix dial handshake (cti/callBeneficiary), setting isOnCall + the variant flag (isEverwellCall/isGrievanceCall/none) exactly as each old worklist did

CTI call-event listener at shell level (CtiCallEventsService)

  • Key old-app finding: the old dashboard attached its message listener via addEventListener("message", this.listener.bind(this)) — unremovable (bound reference lost), so it leaked and stayed alive on every page visited after the dashboard. That leak was the only reason an outbound-worklist dial ever reached the call screen.
  • The listener (same validation + navigation logic reviewed in PR feat/phase4d CTI wiring (CZentrix) #6) is now attached once at the shell, active on every post-login page — the old listener's effective coverage, deliberately and with proper cleanup. The call screen keeps its own mid-call listener (the old app ran both concurrently).

Outbound branches of the call flow

  • Registration: campaign fork on the memory-only campaign (old current_campaign semantics — a mid-call reload falls into the inbound path); generic outbound opens the call with the worklist row's beneficiaryRegID/phone, captures outBoundCallID (= the row's outboundCallReqID), auto-loads the row's beneficiary for selection (old startOutBoundCalloutboundEvent)
  • Closure: OUTBOUND completes the worklist item FIRST, then closes (old order) — plain: call/completeOutboundCall; grievance: completeGrievanceCall with the old payload verbatim; Everwell: faithful silent no-op (the old app posted nothing when no feedback data existed — the Phase 8 feedback flow adds the completion branch); old bare-HTTP-status error alerts kept
  • Grievance-resolution slide: now reads the row's beneficiaryRegId (both casings) and opens the call whenever the campaign is OUTBOUND and hand-off data exists (old gate)
  • Shared start-call.helpers.ts — one call/startCall request builder + response capture used by all three call-open sites

Dashboard entry

  • "Outbound Worklist" link in the Activity panel (CO + OUTBOUND campaign only, old visibility) → cti/switchToOutbound → hub; the "already in MANUAL mode" error still navigates (old behaviour)

Declared deviations (frontend-only; payloads unchanged)

  1. The CTI listener is hosted at the shell with proper cleanup instead of replicating the old leaked, duplicate-accumulating listener (identical user-visible behaviour and coverage)
  2. worklist-date helpers coerce numeric-string epochs like Angular's DatePipe did (rendering-only)

Verification (live against UAT, CO account)

  • Hub + all three tabs render; all three list endpoints 200 with byte-exact payloads
  • Full outbound loop end-to-end: seeded worklist row → CZentrix Accept|…|OUTBOUND event on the hub → call screen → call/startCall (beneficiaryRegID from the row, 200) → outBoundCallID captured → beneficiary auto-loaded → linked (updatebeneficiaryincall 200) → closure → completeOutboundCall {outboundCallReqID, isCompleted:true} 200 → closeCall {IsOutbound:true, isCompleted:true} 200 → dashboard
  • Activity-panel link: hidden on INBOUND / visible on OUTBOUND; the real CZ error ("not allowed to switch to MANUAL mode") alerts without navigating (old branch logic)
  • ng build clean, tsc clean, GPL header check passing

ℹ️ Additional Information

  • Pending a quiet-UAT window (shared test account is in active use): grievance-close e2e and shell-listener coverage runs; the physical dial buttons need a CZentrix bar session (VPN) and are bundled with the planned CTI test session.
  • Test caution: the registration slide fires a REAL call/startCall on load and closure submits fire REAL completion + closeCall POSTs.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

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: 0e6e50f1-bc6c-4880-a8ee-22e06ac41979

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.

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.

1 participant