Skip to content
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

fix: zero showing in record cell and page #7384

Merged

Conversation

nganphan123
Copy link
Contributor

@nganphan123 nganphan123 commented Oct 2, 2024

This PR fixes zero being displayed as empty in record cell and show page in currency field #6802
I checked graphql resquests and the data is stored in the correct form (0 or null). The problem only lies in the front end and how the field is null checked.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request addresses the issue of zero values not being displayed correctly in the CurrencyDisplay component for currency fields.

  • Modified CurrencyDisplay.tsx to differentiate between null (empty) and zero values
  • Updated amountToDisplay calculation to handle zero values properly
  • Adjusted the condition for displaying formatted amounts to include zero values
  • Ensures zero currency values are now visible in record cells and record pages

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@FelixMalfait
Copy link
Member

/award 200

Copy link

oss-gg bot commented Oct 3, 2024

Awarding nganphan123: 200 points 🕹️ Well done! Check out your new contribution on oss.gg/nganphan123

@FelixMalfait
Copy link
Member

Thank you!

@FelixMalfait FelixMalfait merged commit da69317 into twentyhq:main Oct 3, 2024
3 of 8 checks passed
Copy link

github-actions bot commented Oct 3, 2024

Thanks @nganphan123 for your contribution!
This marks your 2nd PR on the repo. You're top 18% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
This PR fixes zero being displayed as empty in record cell and show page
in currency field twentyhq#6802
I checked graphql resquests and the data is stored in the correct form
(0 or null). The problem only lies in the front end and how the field is
null checked.

---------

Co-authored-by: Félix Malfait <[email protected]>
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