Skip to content

GetCaseByRefResult missing agent branch field — case branch can't be read back after setCaseBranch #45

Description

@yusufaltunbicak

Summary

InsurUpCaseClient.setCaseBranch(...) assigns a branch to a case, but getCaseByRef(...) returns no agent-branch field — so a client can set the branch but never read/display the current one. (baseProductBranch on the result is the product branch / ürün dalı — unrelated.)

This is the case-side recurrence of #26 ("GetCustomerResult missing agentBranch field — assigned branch can't be read back after setCustomerBranch").

Verified (@insurup/sdk@0.1.26 / @insurup/contracts@0.1.26)

  • dist/clients/case.d.ts L156–164 — setCaseBranch(request: SetCaseBranchRequest) (write) exists.
  • dist/cases.d.ts GetCaseByRefResultBase L1170–1401 — full field list has no agentBranch/branchId/branchName; only baseProductBranch (L1272, product branch). Variants L1402–1419 add only caseSubType (+ policyId for cancel/endorsement).

Impact / current workaround

agent-panel made the branch control set-only — the AssignBranch form has no "current branch" to show (src/routes/cases/[ref]/components/AssignBranchForm.svelte, …/schema.ts). The user can change the branch but the UI can't confirm what it currently is.

Proposed fix

Add the assigned agent branch (id + name) to GetCaseByRefResultBase, mirroring the customer-side fix requested in #26 so the two read models stay consistent.


Context: surfaced during the agent-panel Cases (Talepler) module migration (InsurUp/agent-panel#8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions