Skip to content

WEB-951 The 'Print' button should be visible #3638

Open
JaySoni1 wants to merge 1 commit into
openMF:devfrom
JaySoni1:fix-WEB-951-print-button-production-mode
Open

WEB-951 The 'Print' button should be visible #3638
JaySoni1 wants to merge 1 commit into
openMF:devfrom
JaySoni1:fix-WEB-951-print-button-production-mode

Conversation

@JaySoni1

@JaySoni1 JaySoni1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Chnages Made :-

-Restore print button visibility condition when MIFOS_PRODUCTION_MODE is enabled .

WEB-951

Summary by CodeRabbit

  • Bug Fixes
    • Print button in loan screen reports now displays only in production mode.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

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

Walkthrough

The Print button in the loan screen reports template is now conditionally rendered only when productionMode is truthy. The button retains its existing disabled state logic and click handler behavior.

Changes

Print Button Production Mode Conditioning

Layer / File(s) Summary
Print button production mode conditioning
src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html
The Print button now includes *ngIf="productionMode" directive to render only in production mode while maintaining the existing disabled state tied to template and the print() click handler.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • openMF/web-app#2919: Updates Print button behavior/presentation in screen-reports templates with conditional rendering logic.
  • openMF/web-app#3588: Changes loan-screen-reports.component.html to conditionally render the Print button based on production mode.

Suggested reviewers

  • IOhacker
🚥 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 PR title 'WEB-951 The 'Print' button should be visible' directly describes the main change: conditionally showing the Print button based on productionMode.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html (1)

48-48: ⚡ Quick win

Verify Prettier formatting compliance.

This line has multiple attributes that may exceed line length limits or violate formatting rules. As per coding guidelines, run npx prettier --write . to ensure proper formatting before merging.

Run the following to check and apply formatting:

#!/bin/bash
# Description: Check if Prettier would reformat this file

# Check formatting
npx prettier --check src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html

# If changes needed, show the diff
npx prettier src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html | diff -u src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html - || true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html`
at line 48, The button element with multiple attributes (the <button> that has
[disabled]="!template", (click)="print()" and *ngIf="productionMode") likely
violates Prettier/line-length formatting; run Prettier to reformat the template
(npx prettier --write . or npx prettier --write the file) and commit the
resulting formatting so the button attributes are wrapped/ordered per project
rules, ensuring the (click)="print()", [disabled]="!template" and
*ngIf="productionMode" stays intact and behavior is unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html`:
- Line 48: The button element with multiple attributes (the <button> that has
[disabled]="!template", (click)="print()" and *ngIf="productionMode") likely
violates Prettier/line-length formatting; run Prettier to reformat the template
(npx prettier --write . or npx prettier --write the file) and commit the
resulting formatting so the button attributes are wrapped/ordered per project
rules, ensuring the (click)="print()", [disabled]="!template" and
*ngIf="productionMode" stays intact and behavior is unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 49417277-404c-45e4-8d4f-de541b7cabc0

📥 Commits

Reviewing files that changed from the base of the PR and between bb13ed6 and 52ffdff.

📒 Files selected for processing (1)
  • src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html

@alberto-art3ch alberto-art3ch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is the reason to have this constraint related to production env ?

@IOhacker IOhacker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The constrain is to avoid any confusion with other users that don't use the Pentaho plugin.

@alberto-art3ch

Copy link
Copy Markdown
Collaborator

LGTM. The constrain is to avoid any confusion with other users that don't use the Pentaho plugin.

Two points:
If that is the rule, It has nothing to use productiveMode, and
Second, the current implementation is not correct, I mean *ngIf is not used more

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.

3 participants