Skip to content

11571 create laboratory order report print view #11572

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

Merged

Conversation

damithdeshan98
Copy link
Collaborator

@damithdeshan98 damithdeshan98 commented Apr 3, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a dedicated print report layout that displays detailed laboratory test data with fee breakdowns and optimized formatting for print.
    • Updated report page buttons with refreshed designs, including a print icon and redirected actions for improved usability.
  • Style

    • Refined text and layout styling by standardizing font sizing across screen and print displays for a more consistent viewing experience.

Copy link
Contributor

coderabbitai bot commented Apr 3, 2025

Walkthrough

This pull request updates the printing functionality of laboratory reports. In the lab inward order report page, button styles and actions were modified to redirect to a new print page. A new XHTML file for printing the test-wise count report has been created, featuring a dynamic table, conditional row rendering, and responsive styling for screen and print formats. Additionally, CSS adjustments were made in another print file to consolidate font size styling from inline attributes to media-specific CSS rules.

Changes

File(s) Change Summary
src/.../reportLab/lab_inward_order_report.xhtml
src/.../reportLab/lab_inward_order_report_print.xhtml
Modified command button styles and behavior in the report page to redirect to a new print page; added a new XHTML file with a dynamic, responsive layout for printing the test-wise count report.
src/.../reportLab/test_wise_count_print.xhtml Added media-specific CSS rules for the .toinsdept class (16px for screen, 14px for print) and removed an inline font-size style from a div.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant RP as Report Page
    participant PP as Print Page

    U->>RP: Clicks Print Button
    RP->>PP: Redirects to Print Page (lab_inward_order_report_print.xhtml)
    PP->>U: Renders Test Wise Count Report layout with print/back options
Loading

Possibly related PRs


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09eb61f and 3c7a5fb.

📒 Files selected for processing (3)
  • src/main/webapp/reportLab/lab_inward_order_report.xhtml (1 hunks)
  • src/main/webapp/reportLab/lab_inward_order_report_print.xhtml (1 hunks)
  • src/main/webapp/reportLab/test_wise_count_print.xhtml (3 hunks)
🔇 Additional comments (9)
src/main/webapp/reportLab/lab_inward_order_report.xhtml (2)

236-242: Style improvement on the Download button.

The Download button now uses the warning color scheme, which provides better visual distinction from the Process button next to it. This follows a good UI pattern of using different colors for different action types.


244-251: Improved print functionality with dedicated view.

The print button has been significantly improved:

  • Changed from inline printing to redirecting to a dedicated print view
  • Updated with a proper print icon
  • Added consistent styling with width specification
  • Changed label to be more descriptive

This change enhances user experience by providing a specialized print view rather than printing directly from the data table.

src/main/webapp/reportLab/test_wise_count_print.xhtml (3)

63-66: Good practice: Moving styling to CSS classes for screen media.

Moving the font-size styling from inline HTML to a dedicated CSS class improves maintainability and follows best practices for separation of concerns.


114-117: Good practice: Media-specific styling for print.

Adding a separate font-size definition for print media ensures the report will be properly sized when printed. The smaller 14px font size for print is appropriate as printed content often appears larger than screen content at the same pixel size.


156-156: Good practice: Removed inline styling.

Removing the inline font-size styling and relying on the CSS class is a good improvement for code maintainability and separation of concerns.

src/main/webapp/reportLab/lab_inward_order_report_print.xhtml (4)

1-38: Well-structured print page header with navigation controls.

The header section is well organized with:

  • Clear title indicating this is a print view
  • Print button with printer component targeting the report view
  • Back navigation button to return to the report page
  • Appropriate styling and icons

This provides good user experience with clear controls for printing and navigation.


40-121: Well-defined CSS for both screen and print media.

The CSS includes:

  • Specific styles for both screen and print media
  • Paper size and zoom settings
  • Table and text formatting rules
  • Page numbering for printed output

This comprehensive styling ensures the report displays well both on screen and when printed.


176-307: Well-structured report table with conditional rendering.

The table implementation:

  • Uses appropriate column widths and alignments
  • Handles different row types (Bill and BillItem) with conditional rendering
  • Properly formats currency values
  • Includes detailed footer with totals

The conditional rendering based on row type ensures that bills and bill items are displayed differently, improving readability.


124-174: Well-structured report header with institutional information.

The report header displays:

  • Institution name
  • Report title with optional department
  • Date range information
  • Service information when available

The layout is well-organized with appropriate font sizes and spacing.

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.

2 participants