fix(WEB-1104): hide the Close action for already-closed clients - #4000
fix(WEB-1104): hide the Close action for already-closed clients#4000parth-sharma-10 wants to merge 1 commit into
Conversation
|
Warning Review limit reachedNext included review available in 28 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Note
|
The client header Actions menu rendered Close unconditionally, so a Closed client could open the Close Client form and submit it, only to have Fineract reject the command with "Client is already closed." Guard the entry on status !== 'Closed', the inverse of the existing Reactivate guard beside it. This deliberately does not narrow to === 'Active': Fineract's closeClient permits Pending -> Closed (it only rejects Closed and under-transfer clients), and closing a Pending client from the menu is a legal, working flow today. Supersedes openMF#3796 by Farah Nahle.
b65cff2 to
408c874
Compare
Description
The client header Actions menu rendered Close unconditionally, so a Closed client could open the Close Client form and submit it, only to have Fineract reject the command with "Client is already closed."
The entry is now guarded on
clientViewData.status.value !== 'Closed'— the inverse of the existingReactivateguard beside it.This deliberately does not narrow to
=== 'Active'(the approach in #3796). Fineract'scloseClientonly rejects Closed and under-transfer clients; it explicitly permits Pending → Closed (isNotPending()branch inClientWritePlatformServiceJpaRepositoryImpl.closeClient). Confirmed against a local Fineract: closing a Pending client via?command=closesucceeds, and re-closing it returns the 403 this ticket describes. Gating on Active would have hidden a working, legal action for Pending clients.Supersedes #3796 by @Farah-Nahle-FOO — picking it up per the maintainer's request there.
Related issues and discussion
WEB-1104 · #3796
Verified
Against
demo.mifos.communityvia the dev proxy:prettier and htmlhint clean.
Checklist
web-app/.github/CONTRIBUTING.md.