Skip to content

OBPIH-7570 Fix styling for 'no quantity counted' disappearing after saving progress#5618

Merged
alannadolny merged 1 commit intorelease/0.9.6from
bug/OBPIH-7568
Nov 17, 2025
Merged

OBPIH-7570 Fix styling for 'no quantity counted' disappearing after saving progress#5618
alannadolny merged 1 commit intorelease/0.9.6from
bug/OBPIH-7568

Conversation

@SebastianLib
Copy link
Collaborator

✨ Description of Change

Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-7568
Description:


📷 Screenshots & Recordings (optional)

@github-actions github-actions bot added type: bug Addresses unintended behaviours of the app domain: frontend Changes or discussions relating to the frontend UI labels Nov 13, 2025
{quantityCounted === null
? <ValueIndicator variant={valueIndicatorVariant.EMPTY} />
: quantityCounted}
{quantityCounted ?? <ValueIndicator variant={valueIndicatorVariant.EMPTY} />}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the case described in the ticket our backend returns quantityCounted as undefined, so the previous solution didn’t work. I think the best solution is to use nullish coalescing operator

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's rather impossible for Grails' backend to return undefined in the response. The only way this could be undefined is when the property would not be sent at all from backend.
I'm fine with the solution but are we sure this can't be e.g. empty string where the nullish coalescing operator would also not work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you are right the backend doesn’t return undefined in the response. I was mistaken because when I did console.log, I saw quantityCounted as undefined 🙈 There shouldn't be any possiblity that quantityCounted could be empty string so I think this solution is fine

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/0.9.6@3a79a5f). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             release/0.9.6   #5618   +/-   ##
===============================================
  Coverage                 ?   8.71%           
  Complexity               ?    1187           
===============================================
  Files                    ?     712           
  Lines                    ?   45618           
  Branches                 ?   10914           
===============================================
  Hits                     ?    3975           
  Misses                   ?   41061           
  Partials                 ?     582           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alannadolny alannadolny added the warn: do not merge Marks a pull request that is not yet ready to be merged label Nov 13, 2025
@SebastianLib SebastianLib changed the base branch from release/0.9.6 to develop November 14, 2025 08:53
Copilot AI review requested due to automatic review settings November 14, 2025 09:00
@SebastianLib SebastianLib removed the warn: do not merge Marks a pull request that is not yet ready to be merged label Nov 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the quantity counted cell rendering logic in the cycle count resolve step table to use the nullish coalescing operator, which fixes an issue where the "no quantity counted" indicator was disappearing after saving progress.

Key Changes:

  • Replaced verbose ternary operator with nullish coalescing operator (??) for cleaner, more robust null/undefined handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alannadolny alannadolny changed the base branch from develop to release/0.9.6 November 17, 2025 09:46
@alannadolny alannadolny merged commit cb115dd into release/0.9.6 Nov 17, 2025
13 checks passed
@alannadolny alannadolny deleted the bug/OBPIH-7568 branch November 17, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI type: bug Addresses unintended behaviours of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants