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 display invoice tab for completed, resumed and canceled orders only #11327

Conversation

bouaik
Copy link
Contributor

@bouaik bouaik commented Aug 3, 2023

What? Why?

Closes #11240

Show invoice tab if the invoice feature is enabled for the current user

Also adding method in the Order model that checks the state of the order, and using it in the edit page to fix the display of the invoice tab

What should we test?

Change the state of the orders and check if the invoice tab is displayed for completed, resumed and canceled only

Release notes

Changelog Category: Technical changes

The title of the pull request will be included in the release notes.

@bouaik bouaik requested a review from abdellani August 4, 2023 00:07
Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

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

Looks good 👍 , Thanks for that !

Copy link
Member

@abdellani abdellani left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@RachL RachL self-assigned this Aug 9, 2023
@RachL RachL added the pr-staged-fr staging.coopcircuits.fr label Aug 9, 2023
@RachL
Copy link
Contributor

RachL commented Aug 9, 2023

States tested:

  • Completed - displayed
  • Resumed - displayed
  • Cancelled - displayed
  • Confirmation - not displayed
  • Payment - not displayed
  • Awaiting return - not displayed

I wonder if we shouldn't leave the tab for the awaiting return state... Or to simplify any state equal or future to complete? Will ask our order states masters, but it does not block this PR. Merging!

@RachL RachL merged commit 4505bef into openfoodfoundation:master Aug 9, 2023
52 checks passed
@RachL RachL removed the pr-staged-fr staging.coopcircuits.fr label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Invoices] Tab displayed regardless of order state
4 participants