Skip to content

Add multi-PCD support for v50 and v51#262

Merged
SamWooldridgeKainos merged 293 commits into
CPS-Innovation:mainfrom
SamWooldridgeKainos:main
Jul 14, 2026
Merged

Add multi-PCD support for v50 and v51#262
SamWooldridgeKainos merged 293 commits into
CPS-Innovation:mainfrom
SamWooldridgeKainos:main

Conversation

@SamWooldridgeKainos

Copy link
Copy Markdown
Contributor

Archive each completed charging decision (PCD) into its own read-only summary card when the user logs another communication. Key changes:

  • Add sortPcdDecisions Nunjucks filter mirroring sortVclDecisions
  • Add finalizePcdDecision() and addPcdFollowUp() helpers in v50/v51 routes to archive transient PCD fields into pcdDecisions[] and route follow-ups to the correct card via pcdId
  • Add /v50/pcd/log-another route to trigger archival and restart the PCD flow
  • Add new card.html partials (v50 and v51) rendering archived decision cards with call attempts, email/letter sections, and per-card follow-up links
  • Update pcd/index.html in v50/v51 to render archived cards below the live decision and show/hide the initial prompt correctly
  • Expand v51 vcl-type.html into a unified "Log another communication" chooser covering DTC, NFA, stopped-charge and altered-charge options
  • Rename "Victim is not to be contacted" radio label to "Decision made not to contact victim" across v50/v51 PCD and VCL contacted-by pages

SamWooldridgeKainos and others added 30 commits January 27, 2026 11:23
Hopeful merge conflicts resolution
SamWooldridgeKainos and others added 28 commits June 29, 2026 17:10
Disability and access needs and VLO onboarding updates
Introduces a new “task already exists” journey in v50/v51 PCD routes and views, preventing duplicate DTC/NFA task creation while allowing due date entry/updates before continuing. Due date handling now preserves PCD context and redirects back to victim communications with a new `due-date-updated` success state, with matching notification banner updates across victim index variants.

Also updates victim category handling in v50/v51 by removing outdated exclusive options/client-side validation hooks and showing selected category values dynamically on the overview page.
Add duplicate PCD task flow and category fixes
Extends the v51 VCL phone-contact journey so first unsuccessful call attempts can capture whether a text was sent, record text details, and store planned second/third call times before returning to communications. Adds new pages and route handlers for this flow, and updates task entry to use `/v51/vcl/start-task`.

The victim communications card now supports in-progress VCL decisions, shows latest vs previous call attempts more clearly, and surfaces next-step actions (log another communication or force letter after 3 failed calls). It also refactors repeated email/letter/call rendering into macros and tightens follow-up section visibility. Copy was updated in v50/v51 follow-up logging screens to be victim-specific and simpler ("Email"/"Post").
Add text-message branch to VCL call flow
Archive each completed charging decision (PCD) into its own read-only summary card when the user logs another communication. Key changes:

- Add `sortPcdDecisions` Nunjucks filter mirroring `sortVclDecisions`
- Add `finalizePcdDecision()` and `addPcdFollowUp()` helpers in v50/v51 routes to archive transient PCD fields into `pcdDecisions[]` and route follow-ups to the correct card via `pcdId`
- Add `/v50/pcd/log-another` route to trigger archival and restart the PCD flow
- Add new `card.html` partials (v50 and v51) rendering archived decision cards with call attempts, email/letter sections, and per-card follow-up links
- Update `pcd/index.html` in v50/v51 to render archived cards below the live decision and show/hide the initial prompt correctly
- Expand v51 `vcl-type.html` into a unified "Log another communication" chooser covering DTC, NFA, stopped-charge and altered-charge options
- Rename "Victim is not to be contacted" radio label to "Decision made not to contact victim" across v50/v51 PCD and VCL contacted-by pages
Add multi-PCD support for v50 and v51
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
84.7% Duplication on New Code (required ≤ 3%)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@SamWooldridgeKainos SamWooldridgeKainos merged commit 3b3d99e into CPS-Innovation:main Jul 14, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants