Skip to content

fix: add source_agreement for agreement details display - #384

Merged
plakkara-bc merged 6 commits into
devfrom
feat/source-agreement-field
Jun 25, 2026
Merged

fix: add source_agreement for agreement details display#384
plakkara-bc merged 6 commits into
devfrom
feat/source-agreement-field

Conversation

@mdiapenabc

Copy link
Copy Markdown
Collaborator

Description

Adds source_agreement so Agreement Details shows ICM/MIS from the primary agreement. Placement Details still uses source_placement. Fixes blank Agreement Source for OOC contacts (OPC/OPO/OPT) where placement is intentionally blank.

What Changed

  • Migration V22: add source_agreement, backfill from source_placement
  • Eligibility: extract primaryAgreement?.source ?? primaryPlacement?.source
  • API + frontend: expose sourceAgreement; Agreement Details Source uses it
  • Hide Placement Details when placement_location is blank

How To Test

  • Node 24
  • cd backend && npm test -- src/sync/eligibility/eligibility.service.spec.ts
  • cd frontend && npm test -- src/utils/__tests__/mock-placement.test.ts
  • OOC contact: Placement Details blank, Agreement Source shows ICM/MIS
  • Non-OOC contact: both placement and agreement sources show as expected

Introduce source_agreement so OOC contacts show ICM/MIS in Agreement Details
while placement source stays scoped to primary placement. Includes migration
backfill from source_placement, eligibility extract, API/frontend wiring, and
tests for OOC and MIS agreement fallback paths.
@mdiapenabc
mdiapenabc requested a review from saifrazabc June 24, 2026 04:40

@saifrazabc saifrazabc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve to ad source_agreement for agreement details display.

@plakkara-bc
plakkara-bc merged commit 0fda128 into dev Jun 25, 2026
15 checks passed
@plakkara-bc
plakkara-bc deleted the feat/source-agreement-field branch June 25, 2026 01:40
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.

3 participants