Repository navigation
feat(orders): order history and receipts - #76
Merged
Merged
Conversation
- Order history pins orders in progress (with a track button) above past orders, shows what was ordered, the date, item count and total, and marks canceled orders. Pages load as you scroll; the first page is kept on the device so the list opens instantly. Loading, empty and error states included. - Every order now has a receipt, not just QPay ones: store, reference, items with their options and bookings, each charge, promotions, total, how it was paid and where it went. It can be shared as text. QPay orders keep the e-barimt tax receipt as a section. - Tracking links to the receipt for every order. - Account: canceled orders no longer show as the active order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #75. Redesigns order history and the receipt.
Order history
offset, which the customer orders endpoint already supports. Pull to refresh works too.Receipt
orderId, loading the order when needed.Other
src/commerce/order-summary.tsis a pure module that turns the order resource into what these screens need. It is fully covered by tests, including the shared receipt text.orderProgress().finishedis false for cancelled orders. It now uses the summary'sactiveflag.OrdersandReceiptstrings added in English, Mongolian and Ukrainian.Checks
yarn jest: 208 passing.yarn typecheck:strictandyarn lint:strictpass with no errors.