WEB-951 The 'Print' button should be visible #3638
Conversation
|
Note
|
| 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html (1)
48-48: ⚡ Quick winVerify 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
📒 Files selected for processing (1)
src/app/loans/loans-view/loan-account-actions/loan-screen-reports/loan-screen-reports.component.html
alberto-art3ch
left a comment
There was a problem hiding this comment.
Which is the reason to have this constraint related to production env ?
Two points: |
Chnages Made :-
-Restore print button visibility condition when MIFOS_PRODUCTION_MODE is enabled .
WEB-951
Summary by CodeRabbit