Merged PR 2252: refactor(representations): extract journey step-resolution helpers (Slice R3,...
refactor(representations): extract journey step-resolution helpers (Slice R3, behaviour-preserving) Related work items: #22441
This commit is contained in:
@@ -6,8 +6,8 @@ Base branch: `refactor`
|
||||
|
||||
## Status
|
||||
|
||||
Current slice: Slice R2 — Representation Page Loader Separation
|
||||
Status: COMPLETE
|
||||
Current slice: Slice R3 — Journey Step Resolution Extraction
|
||||
Status: IMPLEMENTED (manual validation pending)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,6 +94,30 @@ Isolate step navigation logic.
|
||||
- next/previous step logic
|
||||
- validation gating between steps
|
||||
|
||||
**Completion notes (this slice):**
|
||||
|
||||
- Added pure step-resolution helpers in `components/case/representation/utils/stepResolution.js`:
|
||||
- `resolveJourneyStageFlags({ representationSubmit, representationSubmitConfirmation })`
|
||||
- `resolveRepresentationControlKey({ isLPA, representationCapacity, repDetailsCapacity, appealType, normalizeCapacity })`
|
||||
- `resolveSubmitTransition({ representationType, showQuestionnaireSection, questionnaireCount })`
|
||||
- `getQuestionnaireNextSection(currentSection, questionnaireCount)`
|
||||
- `getQuestionnairePreviousSection(currentSection)`
|
||||
- Updated `components/case/representation/index.js` to call helpers for:
|
||||
- check-stage flag resolution (`showCheckStage`)
|
||||
- control key resolution in `whichControl()`
|
||||
- questionnaire/non-questionnaire submit transition decision
|
||||
- questionnaire next-section increment calculation
|
||||
- Preserved behaviour-critical constraints:
|
||||
- no JSX structure redesign
|
||||
- no route/query changes
|
||||
- no payload/Redux shape changes
|
||||
- no dispatch/API side-effect sequencing changes
|
||||
- no representation-type availability logic changes (`buildRepsArr` unchanged)
|
||||
- Validation evidence:
|
||||
- `npm run lint` completed (warnings only, no new errors).
|
||||
- `npm run test:reps` re-run completed: **6 passed**.
|
||||
- Manual APP/IP/Agent/LPA and EN/CY checks: **pending for this slice**.
|
||||
|
||||
---
|
||||
|
||||
### Slice R4 — Flow Shell Decomposition
|
||||
|
||||
Reference in New Issue
Block a user