fix(WEB-1105): fix collateral edit Cancel button redirecting to blank screen - #4005
Conversation
… screen The Cancel button's routerLink navigated two levels up (['../../']) instead of one (['../']), overshooting the collateral view route and landing on a path with no matching component. submit() already navigates with ['../'] on the same route, so Cancel now matches it. Continues openMF#3797. Claude-Session: https://claude.ai/code/session_017c5ZQZugitY2bDF6Y3LQU2
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Cancel route update src/app/collaterals/edit-collateral/edit-collateral.component.html |
The Cancel button uses ['../'] instead of ['../../'] for router navigation. |
Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Bug fix
Suggested reviewers: adamsaghy
Merge Risk: ⚪ Minimal · up to 026c8
Cancel now returns users to the collateral details page as intended.
🚥 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 clearly identifies the fix to the collateral edit Cancel button and its blank-screen redirect behavior. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… |
| 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 unit tests (beta)
- Create PR with unit tests
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.
Comment @coderabbitai help to get the list of available commands.
Description
Continues #3797, which the original author (@Farah-Nahle-FOO) handed off. Same root cause and same one-line fix, rebased onto current
dev.The Cancel button's
routerLinkon the client collateral edit form pointed to['../../'], overshooting the collateral view route (one level up, not two) and landing on a path with no matching component — a blank screen instead of the collateral's details page.submit()in the same component already navigates withthis.router.navigate(['../'], { relativeTo: this.route })on success, so Cancel now matches that existing convention.Related issue
WEB-1105 · continues #3797
Verification
['../../']is still present on currentdev(bug reproduces).submit()uses['../']relative to the same route — Cancel now matches it.routerLinkinsrc/app/collaterals/has the same overshoot.prettier --checkpasses on the changed file.Summary by CodeRabbit