-
Notifications
You must be signed in to change notification settings - Fork 687
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
[PWA-893] My Account: Order History - Remove @client directive #2786
Merged
Merged
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fbd6689
Remove client directive and work through errors from using live data
tjwiebell c4e4b3d
Fixup region display so its not rendering ids
tjwiebell eb62267
Fix payment method display and remove extra comma in addresses
tjwiebell cf1750f
Merge remote-tracking branch 'origin/develop' into tommy/orders-remov…
tjwiebell c1e4000
Additional tweaks from UX feedback
tjwiebell 63c515b
Fixup failing tests
tjwiebell 75ab886
Fix couple tests failing after gql move
tjwiebell 77cd793
Fix bug where tracking information doesn't exist for shipped order
tjwiebell f10bdcf
Updated Intl FormattedMessage component mock. (#2792)
revanth0212 a9e3194
- Adjust item grid based on UX feedback
tjwiebell d8025cf
Merge branch 'develop' into tommy/orders-remove-mock
tjwiebell 2943abf
Fixup failing tests
tjwiebell 299b560
Merge branch 'develop' into tommy/orders-remove-mock
tjwiebell 6d3da3c
Address PR feedback
tjwiebell bb4d380
Cover new context with tests
tjwiebell 115c3ac
Merge remote-tracking branch 'origin/develop' into tommy/orders-remov…
tjwiebell 1c1a478
Address QA feedback
tjwiebell 5ccd567
Fixup tests and hide incomplete features
tjwiebell 5604e84
Address additional edges found in QA
tjwiebell 41d2595
Merge branch 'develop' into tommy/orders-remove-mock
tjwiebell b8eb620
Dependently render discount row
tjwiebell af521e9
Update snaps with new mock
tjwiebell a1a069b
Allow empty string as quantity value to support backspace
tjwiebell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
99 changes: 99 additions & 0 deletions
99
packages/peregrine/lib/talons/OrderHistoryPage/orderHistoryPage.gql.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { gql } from '@apollo/client'; | ||
|
||
export const GET_CUSTOMER_ORDERS = gql` | ||
query GetCustomerOrders { | ||
customer { | ||
id | ||
orders { | ||
items { | ||
billing_address { | ||
city | ||
country_code | ||
firstname | ||
lastname | ||
postcode | ||
region | ||
street | ||
telephone | ||
} | ||
id | ||
invoices { | ||
id | ||
} | ||
items { | ||
id | ||
product_name | ||
product_sale_price { | ||
currency | ||
value | ||
} | ||
product_sku | ||
product_url_key | ||
selected_options { | ||
label | ||
value | ||
} | ||
quantity_ordered | ||
} | ||
number | ||
order_date | ||
payment_methods { | ||
name | ||
type | ||
additional_data { | ||
name | ||
value | ||
} | ||
} | ||
shipments { | ||
id | ||
tracking { | ||
carrier | ||
number | ||
} | ||
} | ||
shipping_address { | ||
city | ||
country_code | ||
firstname | ||
lastname | ||
postcode | ||
region | ||
street | ||
telephone | ||
} | ||
shipping_method | ||
status | ||
total { | ||
discounts { | ||
amount { | ||
currency | ||
value | ||
} | ||
} | ||
grand_total { | ||
currency | ||
value | ||
} | ||
subtotal { | ||
currency | ||
value | ||
} | ||
total_shipping { | ||
currency | ||
value | ||
} | ||
total_tax { | ||
currency | ||
value | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export default { | ||
getCustomerOrdersQuery: GET_CUSTOMER_ORDERS | ||
}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change this over to query by URL Key, since the product_sku returned by orders was variant skus which will return no results from the backend. Issue was escalated to GraphQL team, and they will be adding new fields in 2.4.2 so we shouldn't need to make a secondary query to get this data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because of our sample data or is it by design of the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is by design; configurable variants all have Visibility = Not Visible Individually, so GraphQL is correct in not returning them. Couple JIRA tickets were created to address this though; this one so we don't even need to do a second query for images, and this one so parent sku is returned (which is also a blocker to doing re-orders).