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(DEV-14052): pdf download button is disabled until the url is defined #597

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

costa-monite
Copy link
Collaborator

@costa-monite costa-monite commented Feb 24, 2025

  • Added explicit type definitions for ReceivableResponse and ReceivablesStatusEnum
  • Created a constant array ALLOWED_DOWNLOAD_STATUSES to clearly define which statuses allow PDF downloads

Enhanced PDF Download Button Behavior:

  • Added loading indicator (CircularProgress) when PDF is being generated

New isDownloadPDFButtonDisabled state that considers:

  • If PDF query is loading
  • If PDF URL is ready
  • If any mutation is in progress

Improved Download PDF Visibility Logic:

  • Simplified the status check using the new isAllowedDownloadStatus helper
  • Added isPdfReady check to ensure PDF URL exists before showing the button

Copy link

changeset-bot bot commented Feb 24, 2025

🦋 Changeset detected

Latest commit: 9444437

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@monite/sdk-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 24, 2025

🚀 Preview URLs are now available! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pullpreview Generate a live preview for this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants