Skip to content

Sireesha taking over Aswin fix: implemented injury-severity to the Total Construction Dashboard#4489

Open
Aswin20010 wants to merge 3 commits into
developmentfrom
aswin_add_injury_severity_card
Open

Sireesha taking over Aswin fix: implemented injury-severity to the Total Construction Dashboard#4489
Aswin20010 wants to merge 3 commits into
developmentfrom
aswin_add_injury_severity_card

Conversation

@Aswin20010

@Aswin20010 Aswin20010 commented Dec 4, 2025

Copy link
Copy Markdown

Description

image

This PR adds a new display card for the grouped bar graph showing Injury Severity by Projects to the Total Construction Dashboard.
Previously, the chart introduced in PR #3903 was not visible anywhere in the dashboard, resulting in low visibility of injury-related metrics.
This update ensures the injury severity data is clearly surfaced, styled consistently with the rest of the dashboard, and fully responsive with dark-mode support.
Fixes: High priority visibility issue – the injury severity dataset from PR #3903 was not displayed on the dashboard.

Related PRS (if any):

Frontend PR related to: #3903 (Injury Severity dataset introduction)
This PR exposes the UI section needed to display the data added in #3903.
No backend changes required; this PR can be tested independently from backend PRs.

Main changes explained:

Updated WeeklyProjectSummary.jsx

  • Added a new dashboard section titled "Injury Severity by Projects".
  • Integrated the InjurySeverityChart component into a full-width dashboard card.
  • Ensured consistency with the existing card layout and grid behavior.
  • Added toggling logic to expand/collapse the new section.
    Updated styles in WeeklyProjectSummary.module.css
  • Fixed dark-mode text visibility for section headers and card titles.
  • Standardized background and foreground variables for consistent theming.
  • Ensured the new card matches width, padding, and grid structure.
    Improved dark mode compatibility
  • Adjusted colors so titles, labels, and chart text are readable on dark backgrounds.
    Refactored and cleaned duplicates flagged by stylelint
  • Removed duplicate selectors.
  • Aligned CSS ordering to satisfy Husky/stylelint requirements.

How to test:

  1. check into current branch
  • git fetch
  • git checkout
  • npm install
  1. Run the frontend
  • npm run start:local
  1. Clear browser site data/cache to avoid stale CSS and components.
  2. Log in as Admin.
  3. Navigate to:
    Dashboard → Reports → Total Construction Dashboard
    http://localhost:5173/bmdashboard/totalconstructionsummary
  4. Verify the following:
  • A new display card titled "Injury Severity by Projects" is visible.
  • The grouped bar chart loads correctly and matches the screenshot from PR Zhifan - Create a grouped bar graph showing injury severity by projects #3903.
  • The section can be expanded/collapsed like other dashboard cards.
  • The chart adjusts gracefully for various screen sizes.
  • Dark mode styling displays readable text, proper card backgrounds, and no washed-out elements.
  1. Confirm no console errors appear during load or chart interaction.

Screenshots or videos of changes:

PR.4489.mov

Note:

This PR does not modify backend logic.
Reviewers should focus on:

  • UI integration
  • Dashboard consistency
  • Responsiveness
    All lint/stylelint issues have been resolved, allowing successful pre-commit execution.

@netlify

netlify Bot commented Dec 4, 2025

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 3f3f33a
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a2af3887a73560008abffa7
😎 Deploy Preview https://deploy-preview-4489--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2025

Copy link
Copy Markdown

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Feb 10, 2026

@Anusha-Gali Anusha-Gali 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.

Hi Aswin,

I have reviewed your PR locally and identified the below issues:

  • When there is no data , a ghost chart appears
  • The calendar is in light mode when the application is in dark mode
  • The dropdowns are also in light mode when the application is in dark mode
Image Image Image Image Image

@rohanrastogi311 rohanrastogi311 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.

Hi Aswin,

Lots of work to be done here. Dark mode is also not functional.

Image

@one-community one-community changed the title fix: implemented injury-severity to the Total Construction Dashboard Aswin fix: implemented injury-severity to the Total Construction Dashboard Apr 9, 2026
@one-community one-community changed the title Aswin fix: implemented injury-severity to the Total Construction Dashboard Rajastrivatsan taking over Aswin fix: implemented injury-severity to the Total Construction Dashboard Apr 21, 2026
@one-community one-community changed the title Rajastrivatsan taking over Aswin fix: implemented injury-severity to the Total Construction Dashboard Sireesha taking over Aswin fix: implemented injury-severity to the Total Construction Dashboard May 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@DeepighaJ DeepighaJ 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.

  • Checked out to current branch and tested PR locally.
  • A new display card titled "Injury Severity by Projects" is visible and looks good.
  • Filters applied as expected.
  • But the calendar under dark mode needs improvement. Background goes to white when highlighted while picking a date. Please refer the last screenshot.
  • The contrast of numbers in the chart can be improved so easily readable in dark mode even in mobile view.
Image Image Image image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants