Skip to content

Resolve "Make Medicine Analytics Downloadable as PDF in Admin Login"

Shanmukha varma Lanke requested to merge medicine-analytics into develop

What does this MR do and why?

This MR enhances the Download as PDF functionality in the Medicine Analytics section of the Admin Dashboard and improves the readability of medicine information in the generated report.

Previously, administrators could only view medicine analytics data on the dashboard without an option to export it. The earlier update introduced PDF download support. This MR further improves the exported analytics report by addressing data clarity and visibility issues.

Enhancements Included

  • Medicine Identification Improvement
    • Previously, only the medicine ID was displayed in analytics and the generated PDF.
    • Now, each medicine displays both:
    • Medicine ID
    • Formulation Name
    • This makes reports easier to understand and usable for real-world reporting and auditing.
  • Prescribed Count Visibility Fix
    • The Prescribed count appeared in a dark color, making it difficult to read in the dark-themed UI and PDF.
    • Updated the text color to white to improve visibility and accessibility.

Why this change is needed

  • Medicine IDs alone are not meaningful for administrators or reports.
  • Improves readability and usability of analytics exports.
  • Ensures better visual consistency with the dashboard theme.
  • Enhances reporting accuracy without modifying existing functionality.

The generated PDF continues to reflect the currently displayed analytics data and maintains existing dashboard behavior.

How to set up and validate locally

  • Pull the latest changes from the feature branch.
  • Install dependencies if required:
    • npm install
  • Start the development server:
    • npm run dev
  • Login using Admin credentials.
  • Navigate to:
    • Admin Dashboard → Medicine Analytics
  • Click on Download PDF.
  • Verify that:
    • A PDF file downloads successfully.
    • Medicine entries show ID + Formulation Name.
    • Prescribed count text is clearly visible (white color).
    • Analytics data matches dashboard values.
    • Formatting and layout appear correctly.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist to help reduce risks related to quality, performance, reliability, security, and maintainability.

  • Feature works as expected.
  • UI readability issues resolved.
  • Existing functionality unaffected.
  • Manual validation completed.

Merge request reports

Loading