Skip to content

Conversation

@mrsaicharan1
Copy link
Member

@mrsaicharan1 mrsaicharan1 commented May 21, 2019

order-invoice

Fixes #2925

Short description of what this resolves:

Downloads Order Invoice as PDF(Similar to tickets). Links the button to the server route.

Changes proposed in this pull request:

  • downloadFile for order invoice downloads
  • Created an anchor href on-the-fly & supported pdf download
  • Linked the order generation server route to frontend button
  • Created separate isLoadingTickets & isLoadingInvoice for loader.

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Copy link
Contributor

@abhinavk96 abhinavk96 left a comment

Choose a reason for hiding this comment

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

  • Irrelevant commits are present in the PR
  • Use es6 getters.

this.get('notify').success(this.get('l10n').t('Here is your Order Invoice'));
})
.catch(e => {
console.warn(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

don't disable the print thing for now, put it inside the catch block, if for some reason the above fails, it will be a fallback invoice.

@fossasia fossasia deleted a comment May 22, 2019
@fossasia fossasia deleted a comment May 22, 2019
@fossasia fossasia deleted a comment May 22, 2019
@fossasia fossasia deleted a comment May 22, 2019
@fossasia fossasia deleted a comment May 22, 2019
@mrsaicharan1
Copy link
Member Author

mrsaicharan1 commented May 22, 2019

@CosmicCoder96 @uds5501 @shreyanshdwivedi I've made the necessary changes. Added a GIF in the description for the order invoice downloads.
Also, the isLoading seems to be ambiguous because when one action triggers the isLoading, it shows a change in the other button. I segregated them using isLoadingTickets and isLoadingInvoice.

@fossasia fossasia deleted a comment May 22, 2019
@fossasia fossasia deleted a comment May 22, 2019
Added isLoadingTickets & isLoadingInvoice

Changed filename & used ES6 getters

Made firefox compatible
@fossasia fossasia deleted a comment May 22, 2019
@abhinavk96 abhinavk96 merged commit 587df69 into fossasia:development May 23, 2019
@fossasia fossasia deleted a comment May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link Print Invoice to server route

2 participants