Skip to content

fix(WEB-1104): hide the Close action for already-closed clients - #4000

Open
parth-sharma-10 wants to merge 1 commit into
openMF:devfrom
parth-sharma-10:WEB-1104-hide-close-action-closed-client
Open

fix(WEB-1104): hide the Close action for already-closed clients#4000
parth-sharma-10 wants to merge 1 commit into
openMF:devfrom
parth-sharma-10:WEB-1104-hide-close-action-closed-client

Conversation

@parth-sharma-10

@parth-sharma-10 parth-sharma-10 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

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 existing Reactivate guard beside it.

This deliberately does not narrow to === 'Active' (the approach in #3796). Fineract's closeClient only rejects Closed and under-transfer clients; it explicitly permits Pending → Closed (isNotPending() branch in ClientWritePlatformServiceJpaRepositoryImpl.closeClient). Confirmed against a local Fineract: closing a Pending client via ?command=close succeeds, 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.community via the dev proxy:

Client Status Actions submenu
104 Closed Transfer Client, Reactivate — no Close
160 Pending Close, Transfer Client, Activate, Withdraw, Reject, Delete
103 Active Close, Transfer Client

prettier and htmlhint clean.

Checklist

  • If you have multiple commits please combine them into one commit by squashing them.
  • Read and understood the contribution guidelines at web-app/.github/CONTRIBUTING.md.

@parth-sharma-10
parth-sharma-10 requested a review from a team September 13, 2026 10:29
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a1a18010-c8f2-403e-9998-f7c7061fe355

📥 Commits

Reviewing files that changed from the base of the PR and between 7f78179 and 408c874.

📒 Files selected for processing (1)
  • src/app/clients/clients-view/clients-view.component.html

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.
@parth-sharma-10
parth-sharma-10 force-pushed the WEB-1104-hide-close-action-closed-client branch from b65cff2 to 408c874 Compare September 13, 2026 10:32
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.

1 participant