Skip to content

fix(closure): match legacy closeCall contract - ISO datetime and remo…#28

Open
Aarti-panchal01 wants to merge 1 commit into
mainfrom
fix/closure-contract
Open

fix(closure): match legacy closeCall contract - ISO datetime and remo…#28
Aarti-panchal01 wants to merge 1 commit into
mainfrom
fix/closure-contract

Conversation

@Aarti-panchal01

@Aarti-panchal01 Aarti-panchal01 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Fix two closeCall contract mismatches found by comparing legacy source:

  1. prefferedDateTime was sent as YYYY-MM-DD (date-only), legacy sends full ISO datetime via timezone-offset shift + .toJSON(). Fixed to match.
  2. isServiceAvailed was sent in request body, legacy never sends this field. Removed from request and CloseCallRequest interface.

isEmergency and isSuicidal as booleans already matched legacy exactly — no change needed.
Note: emergencyType (RO-role only, legacy sets 0/1/2) is not applicable to HAO closure — will be handled when RO workspace is built.

Summary by CodeRabbit

  • Bug Fixes
    • Improved follow-up date handling when closing a call, ensuring the selected date and time are submitted accurately across time zones.
    • Removed an obsolete service-availed flag from call closure requests.

…ve isServiceAvailed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f7d7ae99-5007-4608-9b60-f25f31d8d425

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7b4bd and 126f79a.

📒 Files selected for processing (2)
  • src/app/app-modules/call/hao/hao.models.ts
  • src/app/app-modules/call/hao/steps/closure-step.component.ts
💤 Files with no reviewable changes (1)
  • src/app/app-modules/call/hao/hao.models.ts

📝 Walkthrough

Walkthrough

The HAO closure request removes isServiceAvailed and computes a timezone-adjusted preferred follow-up datetime before submitting the closure payload.

Changes

HAO closure update

Layer / File(s) Summary
Update closure request contract
src/app/app-modules/call/hao/hao.models.ts
Removes isServiceAvailed from CloseCallRequest.
Build follow-up datetime payload
src/app/app-modules/call/hao/steps/closure-step.component.ts
Computes prefferedDateTime from followUpDate when required and includes it in the closure request.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: aligning closeCall with the legacy contract by using ISO datetime and removing a field.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

2 participants