-
Notifications
You must be signed in to change notification settings - Fork 100
11565 create all sales report print view #11566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
11565 create all sales report print view #11566
Conversation
closes #11565 Signed-off-by: DamithDeshan <[email protected]>
Signed-off-by: DamithDeshan <[email protected]>
WalkthroughThis pull request modifies existing XHTML views and introduces a new one for printing laboratory income reports. The primary report file now features an updated print button with a redirection action and the removal of specific columns, while a new print-specific template has been added to handle formatted print views using JSF components and dedicated CSS for print media. Additionally, styling and template references have been adjusted in another print view template to enhance layout formatting. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ReportPage as "laboratary_income_report.xhtml"
participant PrintPage as "laboratary_income_report_print.xhtml"
User->>ReportPage: Click "To Print" button
ReportPage->>PrintPage: Redirect using action attribute (faces-redirect=true)
PrintPage-->>User: Render formatted print view with report data
Possibly related PRs
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/main/webapp/reportLab/laboratary_income_report.xhtml (1)
286-286
: Consider using responsive design instead of fixed zoom valueWhile the zoom value helps with readability, using fixed zoom values might not be optimal for all users and devices. Consider implementing responsive design techniques instead of hardcoding the zoom value.
-style="padding: 2px!important; margin-top: 10px!important; margin: 0px!important; font-size: #{laborataryReportController.fontSizeForScreen}!important; zoom: 1.6;" +style="padding: 2px!important; margin-top: 10px!important; margin: 0px!important; font-size: #{laborataryReportController.fontSizeForScreen}!important;"src/main/webapp/reportLab/test_wise_count_print.xhtml (1)
46-47
: Consider using responsive design instead of fixed zoom valueWhile increasing the zoom improves visibility, using fixed zoom values might not be optimal for all users and devices. Consider implementing responsive design techniques instead.
- zoom: 2.0 + /* Consider using responsive design techniques instead of fixed zoom */src/main/webapp/reportLab/laboratary_income_report_print.xhtml (2)
40-121
: Comprehensive CSS for both screen and print mediaThe CSS properly defines styles for both screen viewing and printing, with appropriate settings for page size, table formatting, and text styles. The print media query includes proper page counters for pagination.
However, consider adding print-specific styles to hide navigation elements when printing.
@media print { + .no-print { + display: none !important; + } @page { @bottom-right {Then update the header div:
-<div class="d-flex justify-content-between"> +<div class="d-flex justify-content-between no-print">
239-242
: Date format could be more consistent with application preferencesThe date format is hardcoded as "dd/MM/YY" instead of using the application preference pattern that's used in the header section.
-<f:convertDateTime pattern="dd/MM/YY" /> +<f:convertDateTime pattern="#{sessionController.applicationPreference.shortDateFormat}" />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/webapp/reportLab/laboratary_income_report.xhtml
(2 hunks)src/main/webapp/reportLab/laboratary_income_report_print.xhtml
(1 hunks)src/main/webapp/reportLab/test_wise_count_print.xhtml
(4 hunks)
🔇 Additional comments (8)
src/main/webapp/reportLab/laboratary_income_report.xhtml (1)
264-270
: Button label and functionality improvedThe button label change from "Print" to "To Print" provides better clarity about the button's action. Adding the redirect action to a dedicated print view page is a good separation of concerns, allowing for optimized print layouts.
src/main/webapp/reportLab/test_wise_count_print.xhtml (3)
10-11
: Template structure improvedChanging to a more standardized template and updating the content definition name improves consistency across the application.
83-83
: Proper page size definition for printingAdding explicit page size declaration ensures consistent printing output, which is essential for report formats.
94-94
: Table width adjustment for better print layoutIncreasing the table width from 99% to 99.9% helps prevent content from being cut off in the print view.
src/main/webapp/reportLab/laboratary_income_report_print.xhtml (4)
14-38
: Well-designed header with navigation optionsThe header provides clear navigation with Print and Back buttons, enhancing user experience. The Print button correctly uses the PrimeFaces printer component targeting the report content.
90-90
: Landscape orientation for print formatUsing landscape orientation is appropriate for this report given the number of columns. This ensures all data fits properly on the printed page.
227-297
: Well-structured data presentation using UI repeatThe table uses
ui:repeat
to iterate through data rows with proper formatting for dates and currency values. The layout is well-organized with appropriate column widths and text alignment.
299-358
: Comprehensive footer with financial summariesThe footer section properly displays summary values for all financial columns, providing a complete overview of the report data.
Summary by CodeRabbit
New Features
Style