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

Don't show credit owed when = 0 in order confirmation #11668

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

drummer83
Copy link
Contributor

What? Why?

If an order is paid with the exact amount, then there is no credit owed and no balance due. In this case it is not required to show the credit owed = 0.

What should we test?

  • Visit /orders/ORDER_NUMBER page from the user account.
  • If the order has a balance due, this should be indicated in red (as before).
  • If the order has a credit owed, this should be indicated in black (as before).
  • If the order has neither, this should not be indicated at all (this is new).

Before:
image

After:
image

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

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

Dependencies

Documentation updates

@drummer83 drummer83 self-assigned this Oct 13, 2023
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Very good, thank you. I added a little simplification to keep the code easier to read.

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Go team!

@filipefurtad0 filipefurtad0 self-assigned this Oct 17, 2023
@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Oct 18, 2023
@filipefurtad0
Copy link
Contributor

Hey @drummer83,

Thanks for this improvement, and for documenting the issue nicely 💪

Following your proposed testing steps:

i) If the order has a balance due, this should be indicated in red (as before):

image

ii) If the order has a credit owed, this should be indicated in black (as before):

image

iii) If the order has neither, this should not be indicated at all (this is new).

image

Awesome - good to go, merging 🎉

PS: It should be fairly straightforward to add some some assertions to check for these and the changes introduced on #11114, within our test suite, I'll look for the relevant file and do so.

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Oct 18, 2023

Another note, for some reason, this last build run took unusually long 👀

image

Let's see what happens after merging...

Edit: all good again (except what seems to be a flaky spec)
image

@filipefurtad0 filipefurtad0 merged commit caa655f into openfoodfoundation:master Oct 18, 2023
52 checks passed
@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Oct 18, 2023
filipefurtad0 added a commit to filipefurtad0/openfoodnetwork that referenced this pull request Oct 18, 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.

4 participants