diff --git a/src/Apps/Settings/Routes/Purchases/Components/SettingsPurchasesRow.tsx b/src/Apps/Settings/Routes/Purchases/Components/SettingsPurchasesRow.tsx
index 5c7e58936c4..1638c55bd95 100644
--- a/src/Apps/Settings/Routes/Purchases/Components/SettingsPurchasesRow.tsx
+++ b/src/Apps/Settings/Routes/Purchases/Components/SettingsPurchasesRow.tsx
@@ -16,7 +16,11 @@ import { DateTime } from "luxon"
import { FC } from "react"
import { createFragmentContainer, graphql } from "react-relay"
import { RouterLink } from "System/Components/RouterLink"
-import { SettingsPurchasesRow_order$data } from "__generated__/SettingsPurchasesRow_order.graphql"
+import {
+ SettingsPurchasesRow_order$data,
+ CommerceOrderDisplayStateEnum,
+ CommerceBuyerOfferActionEnum,
+} from "__generated__/SettingsPurchasesRow_order.graphql"
import { LocaleOptions } from "luxon"
import { extractNodes } from "Utils/extractNodes"
import { appendCurrencySymbol } from "Apps/Order/Utils/currencyUtils"
@@ -34,11 +38,31 @@ import {
ClickedChangePaymentMethod,
} from "@artsy/cohesion"
+type BuyerDisplayStateEnum =
+ | CommerceBuyerOfferActionEnum
+ | CommerceOrderDisplayStateEnum
+
+interface SettingsPurchasesRowProps {
+ order: SettingsPurchasesRow_order$data
+}
+
+interface OrderLinkProps {
+ order: SettingsPurchasesRow_order$data
+ trackChangePaymentMethodClick: (orderId: string) => () => void
+}
+
+interface OrderActionButtonProps {
+ displayState: BuyerDisplayStateEnum
+ orderId: string
+ trackChangePaymentMethodClick: (orderId: string) => () => void
+}
+
const ORDER_LABELS = {
APPROVED: "Confirmed",
CANCELED: "Canceled",
FULFILLED: "Delivered",
IN_TRANSIT: "In transit",
+ OFFER_RECEIVED: "Counteroffer received",
PROCESSING: "Processing",
REFUNDED: "Refunded",
SUBMITTED: "Pending",
@@ -51,6 +75,7 @@ const ORDER_ICONS = {
CANCELED: ,
FULFILLED: ,
IN_TRANSIT: ,
+ OFFER_RECEIVED: ,
PROCESSING: ,
REFUNDED: ,
SUBMITTED: ,
@@ -63,6 +88,7 @@ const ORDER_COLORS = {
CANCELED: "red100",
FULFILLED: "green100",
IN_TRANSIT: "black60",
+ OFFER_RECEIVED: "blue100",
PROCESSING: "black60",
REFUNDED: "red100",
SUBMITTED: "black60",
@@ -85,14 +111,84 @@ const getPaymentMethodText = (
}
}
-interface SettingsPurchasesRowProps {
- order: SettingsPurchasesRow_order$data
+const OrderLink: FC = ({
+ order,
+ trackChangePaymentMethodClick,
+}) => {
+ const isOrderActive = !["CANCELED", "REFUNDED"].includes(order.displayState)
+ const isOrderPaymentFailed = order.displayState === "PAYMENT_FAILED"
+
+ if (isOrderPaymentFailed) {
+ return (
+
+ {order.code}
+
+ )
+ }
+
+ if (isOrderActive) {
+ return (
+
+ {order.code}
+
+ )
+ }
+
+ return <>{order.code}>
}
-const SettingsPurchasesRow: FC> = ({ order }) => {
+const OrderActionButton: FC = ({
+ displayState,
+ orderId,
+ trackChangePaymentMethodClick,
+}) => {
+ switch (displayState) {
+ case "PAYMENT_FAILED":
+ return (
+
+ )
+ case "OFFER_RECEIVED":
+ return (
+
+ )
+ default:
+ return null
+ }
+}
+
+const SettingsPurchasesRow: FC> = ({ order }) => {
const [lineItem] = extractNodes(order?.lineItems)
const { artwork, artworkVersion, fulfillments } = lineItem
- const { requestedFulfillment } = order
+ const { requestedFulfillment, buyerAction } = order
const orderCreatedAt = DateTime.fromISO(order.createdAt)
const trackingId = fulfillments?.edges?.[0]?.node?.trackingId
@@ -100,6 +196,13 @@ const SettingsPurchasesRow: FC () => {
const payload: ClickedChangePaymentMethod = {
@@ -112,35 +215,8 @@ const SettingsPurchasesRow: FC {
- const isOrderActive = !["CANCELED", "REFUNDED"].includes(order.state)
- const isOrderPaymentFailed = order.displayState === "PAYMENT_FAILED"
-
- if (isOrderPaymentFailed) {
- return (
-
- {order.code}
-
- )
- }
-
- if (isOrderActive) {
- return (
-
- {order.code}
-
- )
- }
-
- return <>{order.code}>
- }
-
return (
- (
+
- {ORDER_ICONS[order.displayState]}
+ {ORDER_ICONS[buyerDisplayState]}
- {ORDER_LABELS[order.displayState]}
+ {ORDER_LABELS[buyerDisplayState]}
{trackingId && (
@@ -240,20 +316,11 @@ const SettingsPurchasesRow: FC
- {order.displayState === "PAYMENT_FAILED" && (
-
- )}
+
@@ -265,7 +332,10 @@ const SettingsPurchasesRow: FCOrder No.
- {getOrderLink(order)}
+
@@ -311,8 +381,8 @@ const SettingsPurchasesRow: FC
- )
- );
+
+ )
}
export const SettingsPurchasesRowFragmentContainer = createFragmentContainer(
@@ -324,7 +394,6 @@ export const SettingsPurchasesRowFragmentContainer = createFragmentContainer(
internalID
code
displayState
- state
requestedFulfillment {
__typename
}
@@ -386,12 +455,17 @@ export const SettingsPurchasesRowFragmentContainer = createFragmentContainer(
}
}
}
+ ... on CommerceOfferOrder {
+ buyerAction
+ }
}
`,
}
)
-export const SettingsPurchasesRowPlaceholder: FC> = () => {
+export const SettingsPurchasesRowPlaceholder: FC> = () => {
return (
diff --git a/src/Apps/Settings/Routes/Purchases/Components/__tests__/SettingsPurchases.jest.tsx b/src/Apps/Settings/Routes/Purchases/Components/__tests__/SettingsPurchases.jest.tsx
index 77284ac9cae..930e5484c70 100644
--- a/src/Apps/Settings/Routes/Purchases/Components/__tests__/SettingsPurchases.jest.tsx
+++ b/src/Apps/Settings/Routes/Purchases/Components/__tests__/SettingsPurchases.jest.tsx
@@ -27,14 +27,14 @@ describe("SettingsPurchases", () => {
expect(screen.getByText("Need Help?")).toBeInTheDocument()
})
- it("renders correct help email address for non-PS orders", () => {
+ it("renders correct help email address for non private sale orders", () => {
renderWithRelay()
expect(screen.getByText("Contact Us.")).toBeInTheDocument()
})
describe("with private sale orders", () => {
- it("renders correct help email address for PS orders", () => {
+ it("renders correct help email address for private sale orders", () => {
renderWithRelay({
Me: () => ({
orders: {
@@ -63,7 +63,6 @@ describe("SettingsPurchases", () => {
{
node: {
code: "123",
- state: "SUBMITTED",
displayState: "PAYMENT_FAILED",
},
},
@@ -84,7 +83,6 @@ describe("SettingsPurchases", () => {
node: {
code: "123",
internalID: "123",
- state: "SUBMITTED",
displayState: "PAYMENT_FAILED",
},
},
@@ -107,7 +105,6 @@ describe("SettingsPurchases", () => {
node: {
code: "123",
internalID: "123",
- state: "SUBMITTED",
displayState: "PAYMENT_FAILED",
},
},
@@ -123,4 +120,74 @@ describe("SettingsPurchases", () => {
expect(button).toHaveAttribute("href", "/orders/123/payment/new")
})
})
+
+ describe("order with offer awaiting for collector reply", () => {
+ it("renders Counteroffer received status", () => {
+ renderWithRelay({
+ Me: () => ({
+ orders: {
+ edges: [
+ {
+ node: {
+ code: "123",
+ displayState: "SUBMITTED",
+ buyerAction: "OFFER_RECEIVED",
+ },
+ },
+ ],
+ },
+ }),
+ })
+
+ expect(screen.getByText("Counteroffer received")).toBeInTheDocument()
+ })
+
+ it("renders the order number with a link to respond to the offer", () => {
+ renderWithRelay({
+ Me: () => ({
+ orders: {
+ edges: [
+ {
+ node: {
+ code: "123",
+ internalID: "123",
+ displayState: "SUBMITTED",
+ buyerAction: "OFFER_RECEIVED",
+ },
+ },
+ ],
+ },
+ }),
+ })
+
+ const link = screen.getByRole("link", { name: /123/i })
+ expect(link).toBeInTheDocument()
+ expect(link).toHaveAttribute("href", "/orders/123/status")
+ })
+
+ it("renders a button to respond to the offer", () => {
+ renderWithRelay({
+ Me: () => ({
+ orders: {
+ edges: [
+ {
+ node: {
+ code: "123",
+ internalID: "123",
+ displayState: "SUBMITTED",
+ buyerAction: "OFFER_RECEIVED",
+ },
+ },
+ ],
+ },
+ }),
+ })
+
+ const button = screen.getByRole("link", {
+ name: /Respond to Counteroffer/i,
+ })
+ expect(button).toBeInTheDocument()
+ expect(button).toHaveAttribute("href", "/orders/123/status")
+ })
+ })
})
diff --git a/src/__generated__/SettingsPurchasesQuery.graphql.ts b/src/__generated__/SettingsPurchasesQuery.graphql.ts
index 9e1f087ef12..19f9332df36 100644
--- a/src/__generated__/SettingsPurchasesQuery.graphql.ts
+++ b/src/__generated__/SettingsPurchasesQuery.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<<63e653a4bbc6ff31900701edfd21dbfc>>
+ * @generated SignedSource<<1175a8cccf2235adaaa5617d0dbf405f>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -343,13 +343,6 @@ return {
"name": "displayState",
"storageKey": null
},
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "state",
- "storageKey": null
- },
{
"alias": null,
"args": null,
@@ -644,6 +637,20 @@ return {
],
"storageKey": null
},
+ {
+ "kind": "InlineFragment",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "buyerAction",
+ "storageKey": null
+ }
+ ],
+ "type": "CommerceOfferOrder",
+ "abstractKey": null
+ },
(v9/*: any*/)
],
"storageKey": null
@@ -661,12 +668,12 @@ return {
]
},
"params": {
- "cacheID": "0e68e05ecea561aa5adfa73fc0d65164",
+ "cacheID": "0e6a4bd5817e8c4972507f37b706eaf2",
"id": null,
"metadata": {},
"name": "SettingsPurchasesQuery",
"operationKind": "query",
- "text": "query SettingsPurchasesQuery(\n $states: [CommerceOrderStateEnum!]\n $first: Int!\n $after: String\n) {\n me {\n ...SettingsPurchases_me_4tp0sF\n id\n }\n}\n\nfragment CommercePagination_pageCursors on CommercePageCursors {\n around {\n cursor\n page\n isCurrent\n }\n first {\n cursor\n page\n isCurrent\n }\n last {\n cursor\n page\n isCurrent\n }\n previous {\n cursor\n page\n }\n}\n\nfragment SettingsPurchasesRow_order on CommerceOrder {\n __isCommerceOrder: __typename\n source\n internalID\n code\n displayState\n state\n requestedFulfillment {\n __typename\n }\n paymentMethodDetails {\n __typename\n ... on CreditCard {\n lastDigits\n id\n }\n ... on BankAccount {\n last4\n id\n }\n ... on WireTransfer {\n isManualPayment\n }\n }\n buyerTotal(precision: 2)\n createdAt\n currencyCode\n lineItems {\n edges {\n node {\n artworkVersion {\n image {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n artwork {\n href\n partner {\n href\n initials\n name\n profile {\n icon {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n id\n }\n shippingOrigin\n title\n artistNames\n artists(shallow: true) {\n href\n id\n }\n id\n }\n fulfillments(first: 1) {\n edges {\n node {\n trackingId\n id\n }\n }\n }\n id\n }\n }\n }\n}\n\nfragment SettingsPurchases_me_4tp0sF on Me {\n name\n orders(states: $states, first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n pageCursors {\n ...CommercePagination_pageCursors\n }\n edges {\n node {\n __typename\n code\n ...SettingsPurchasesRow_order\n id\n }\n }\n }\n}\n"
+ "text": "query SettingsPurchasesQuery(\n $states: [CommerceOrderStateEnum!]\n $first: Int!\n $after: String\n) {\n me {\n ...SettingsPurchases_me_4tp0sF\n id\n }\n}\n\nfragment CommercePagination_pageCursors on CommercePageCursors {\n around {\n cursor\n page\n isCurrent\n }\n first {\n cursor\n page\n isCurrent\n }\n last {\n cursor\n page\n isCurrent\n }\n previous {\n cursor\n page\n }\n}\n\nfragment SettingsPurchasesRow_order on CommerceOrder {\n __isCommerceOrder: __typename\n source\n internalID\n code\n displayState\n requestedFulfillment {\n __typename\n }\n paymentMethodDetails {\n __typename\n ... on CreditCard {\n lastDigits\n id\n }\n ... on BankAccount {\n last4\n id\n }\n ... on WireTransfer {\n isManualPayment\n }\n }\n buyerTotal(precision: 2)\n createdAt\n currencyCode\n lineItems {\n edges {\n node {\n artworkVersion {\n image {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n artwork {\n href\n partner {\n href\n initials\n name\n profile {\n icon {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n id\n }\n shippingOrigin\n title\n artistNames\n artists(shallow: true) {\n href\n id\n }\n id\n }\n fulfillments(first: 1) {\n edges {\n node {\n trackingId\n id\n }\n }\n }\n id\n }\n }\n }\n ... on CommerceOfferOrder {\n buyerAction\n }\n}\n\nfragment SettingsPurchases_me_4tp0sF on Me {\n name\n orders(states: $states, first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n pageCursors {\n ...CommercePagination_pageCursors\n }\n edges {\n node {\n __typename\n code\n ...SettingsPurchasesRow_order\n id\n }\n }\n }\n}\n"
}
};
})();
diff --git a/src/__generated__/SettingsPurchasesRow_order.graphql.ts b/src/__generated__/SettingsPurchasesRow_order.graphql.ts
index 860a22355b9..a07f60126bb 100644
--- a/src/__generated__/SettingsPurchasesRow_order.graphql.ts
+++ b/src/__generated__/SettingsPurchasesRow_order.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<>
+ * @generated SignedSource<<1bf5aacb83cfad30de6685df2cdca129>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,11 +9,12 @@
// @ts-nocheck
import { ReaderFragment } from 'relay-runtime';
+export type CommerceBuyerOfferActionEnum = "OFFER_ACCEPTED" | "OFFER_ACCEPTED_CONFIRM_NEEDED" | "OFFER_RECEIVED" | "OFFER_RECEIVED_CONFIRM_NEEDED" | "PAYMENT_FAILED" | "PROVISIONAL_OFFER_ACCEPTED" | "%future added value";
export type CommerceOrderDisplayStateEnum = "ABANDONED" | "APPROVED" | "CANCELED" | "FULFILLED" | "IN_TRANSIT" | "PAYMENT_FAILED" | "PENDING" | "PROCESSING" | "PROCESSING_APPROVAL" | "REFUNDED" | "SUBMITTED" | "%future added value";
export type CommerceOrderSourceEnum = "artwork_page" | "inquiry" | "partner_offer" | "private_sale" | "%future added value";
-export type CommerceOrderStateEnum = "ABANDONED" | "APPROVED" | "CANCELED" | "FULFILLED" | "IN_REVIEW" | "PENDING" | "PROCESSING_APPROVAL" | "REFUNDED" | "SUBMITTED" | "%future added value";
import { FragmentRefs } from "relay-runtime";
export type SettingsPurchasesRow_order$data = {
+ readonly buyerAction?: CommerceBuyerOfferActionEnum | null | undefined;
readonly buyerTotal: string | null | undefined;
readonly code: string;
readonly createdAt: string;
@@ -81,7 +82,6 @@ export type SettingsPurchasesRow_order$data = {
readonly __typename: string;
} | null | undefined;
readonly source: CommerceOrderSourceEnum;
- readonly state: CommerceOrderStateEnum;
readonly " $fragmentType": "SettingsPurchasesRow_order";
};
export type SettingsPurchasesRow_order$key = {
@@ -176,13 +176,6 @@ return {
"name": "displayState",
"storageKey": null
},
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "state",
- "storageKey": null
- },
{
"alias": null,
"args": null,
@@ -473,6 +466,20 @@ return {
}
],
"storageKey": null
+ },
+ {
+ "kind": "InlineFragment",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "buyerAction",
+ "storageKey": null
+ }
+ ],
+ "type": "CommerceOfferOrder",
+ "abstractKey": null
}
],
"type": "CommerceOrder",
@@ -480,6 +487,6 @@ return {
};
})();
-(node as any).hash = "4a896a515342b1fcc037206f76bb1dbd";
+(node as any).hash = "84bb7c5313a484e4fd25abe300450ac2";
export default node;
diff --git a/src/__generated__/SettingsPurchases_Test_Query.graphql.ts b/src/__generated__/SettingsPurchases_Test_Query.graphql.ts
index a2d4d98673a..fb38b11002d 100644
--- a/src/__generated__/SettingsPurchases_Test_Query.graphql.ts
+++ b/src/__generated__/SettingsPurchases_Test_Query.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<<7fbd90b3dbea85926ad5b4efe46b09e3>>
+ * @generated SignedSource<<8f1c016f9a8b6abee2723b9bb746c9dc>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -364,13 +364,6 @@ return {
"name": "displayState",
"storageKey": null
},
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "state",
- "storageKey": null
- },
{
"alias": null,
"args": null,
@@ -665,6 +658,20 @@ return {
],
"storageKey": null
},
+ {
+ "kind": "InlineFragment",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "buyerAction",
+ "storageKey": null
+ }
+ ],
+ "type": "CommerceOfferOrder",
+ "abstractKey": null
+ },
(v5/*: any*/)
],
"storageKey": null
@@ -682,7 +689,7 @@ return {
]
},
"params": {
- "cacheID": "6d267189bf8afbe5847f11b6e8fbb862",
+ "cacheID": "3a1e7d36788cb81c26f5e0ddd988d1e7",
"id": null,
"metadata": {
"relayTestingSelectionTypeInfo": {
@@ -714,6 +721,19 @@ return {
},
"me.orders.edges.node.__isCommerceOrder": (v10/*: any*/),
"me.orders.edges.node.__typename": (v10/*: any*/),
+ "me.orders.edges.node.buyerAction": {
+ "enumValues": [
+ "OFFER_ACCEPTED",
+ "OFFER_ACCEPTED_CONFIRM_NEEDED",
+ "OFFER_RECEIVED",
+ "OFFER_RECEIVED_CONFIRM_NEEDED",
+ "PAYMENT_FAILED",
+ "PROVISIONAL_OFFER_ACCEPTED"
+ ],
+ "nullable": true,
+ "plural": false,
+ "type": "CommerceBuyerOfferActionEnum"
+ },
"me.orders.edges.node.buyerTotal": (v9/*: any*/),
"me.orders.edges.node.code": (v10/*: any*/),
"me.orders.edges.node.createdAt": (v10/*: any*/),
@@ -857,22 +877,6 @@ return {
"plural": false,
"type": "CommerceOrderSourceEnum"
},
- "me.orders.edges.node.state": {
- "enumValues": [
- "ABANDONED",
- "APPROVED",
- "CANCELED",
- "FULFILLED",
- "IN_REVIEW",
- "PENDING",
- "PROCESSING_APPROVAL",
- "REFUNDED",
- "SUBMITTED"
- ],
- "nullable": false,
- "plural": false,
- "type": "CommerceOrderStateEnum"
- },
"me.orders.pageCursors": {
"enumValues": null,
"nullable": true,
@@ -917,7 +921,7 @@ return {
},
"name": "SettingsPurchases_Test_Query",
"operationKind": "query",
- "text": "query SettingsPurchases_Test_Query {\n me {\n ...SettingsPurchases_me\n id\n }\n}\n\nfragment CommercePagination_pageCursors on CommercePageCursors {\n around {\n cursor\n page\n isCurrent\n }\n first {\n cursor\n page\n isCurrent\n }\n last {\n cursor\n page\n isCurrent\n }\n previous {\n cursor\n page\n }\n}\n\nfragment SettingsPurchasesRow_order on CommerceOrder {\n __isCommerceOrder: __typename\n source\n internalID\n code\n displayState\n state\n requestedFulfillment {\n __typename\n }\n paymentMethodDetails {\n __typename\n ... on CreditCard {\n lastDigits\n id\n }\n ... on BankAccount {\n last4\n id\n }\n ... on WireTransfer {\n isManualPayment\n }\n }\n buyerTotal(precision: 2)\n createdAt\n currencyCode\n lineItems {\n edges {\n node {\n artworkVersion {\n image {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n artwork {\n href\n partner {\n href\n initials\n name\n profile {\n icon {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n id\n }\n shippingOrigin\n title\n artistNames\n artists(shallow: true) {\n href\n id\n }\n id\n }\n fulfillments(first: 1) {\n edges {\n node {\n trackingId\n id\n }\n }\n }\n id\n }\n }\n }\n}\n\nfragment SettingsPurchases_me on Me {\n name\n orders(states: [APPROVED, CANCELED, FULFILLED, REFUNDED, SUBMITTED, PROCESSING_APPROVAL], first: 10) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n pageCursors {\n ...CommercePagination_pageCursors\n }\n edges {\n node {\n __typename\n code\n ...SettingsPurchasesRow_order\n id\n }\n }\n }\n}\n"
+ "text": "query SettingsPurchases_Test_Query {\n me {\n ...SettingsPurchases_me\n id\n }\n}\n\nfragment CommercePagination_pageCursors on CommercePageCursors {\n around {\n cursor\n page\n isCurrent\n }\n first {\n cursor\n page\n isCurrent\n }\n last {\n cursor\n page\n isCurrent\n }\n previous {\n cursor\n page\n }\n}\n\nfragment SettingsPurchasesRow_order on CommerceOrder {\n __isCommerceOrder: __typename\n source\n internalID\n code\n displayState\n requestedFulfillment {\n __typename\n }\n paymentMethodDetails {\n __typename\n ... on CreditCard {\n lastDigits\n id\n }\n ... on BankAccount {\n last4\n id\n }\n ... on WireTransfer {\n isManualPayment\n }\n }\n buyerTotal(precision: 2)\n createdAt\n currencyCode\n lineItems {\n edges {\n node {\n artworkVersion {\n image {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n artwork {\n href\n partner {\n href\n initials\n name\n profile {\n icon {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n id\n }\n shippingOrigin\n title\n artistNames\n artists(shallow: true) {\n href\n id\n }\n id\n }\n fulfillments(first: 1) {\n edges {\n node {\n trackingId\n id\n }\n }\n }\n id\n }\n }\n }\n ... on CommerceOfferOrder {\n buyerAction\n }\n}\n\nfragment SettingsPurchases_me on Me {\n name\n orders(states: [APPROVED, CANCELED, FULFILLED, REFUNDED, SUBMITTED, PROCESSING_APPROVAL], first: 10) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n pageCursors {\n ...CommercePagination_pageCursors\n }\n edges {\n node {\n __typename\n code\n ...SettingsPurchasesRow_order\n id\n }\n }\n }\n}\n"
}
};
})();
diff --git a/src/__generated__/settingsRoutes_PurchasesRouteQuery.graphql.ts b/src/__generated__/settingsRoutes_PurchasesRouteQuery.graphql.ts
index 9dbb8a6524a..75320091775 100644
--- a/src/__generated__/settingsRoutes_PurchasesRouteQuery.graphql.ts
+++ b/src/__generated__/settingsRoutes_PurchasesRouteQuery.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<<29f6bdba6e968f7c8779aa3b9ce25703>>
+ * @generated SignedSource<>
* @lightSyntaxTransform
* @nogrep
*/
@@ -316,13 +316,6 @@ return {
"name": "displayState",
"storageKey": null
},
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "state",
- "storageKey": null
- },
{
"alias": null,
"args": null,
@@ -617,6 +610,20 @@ return {
],
"storageKey": null
},
+ {
+ "kind": "InlineFragment",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "buyerAction",
+ "storageKey": null
+ }
+ ],
+ "type": "CommerceOfferOrder",
+ "abstractKey": null
+ },
(v5/*: any*/)
],
"storageKey": null
@@ -634,12 +641,12 @@ return {
]
},
"params": {
- "cacheID": "40fc06dcd23f5da95b583f2fa464ab74",
+ "cacheID": "3570848fe7ca4e46025266dcae3c774b",
"id": null,
"metadata": {},
"name": "settingsRoutes_PurchasesRouteQuery",
"operationKind": "query",
- "text": "query settingsRoutes_PurchasesRouteQuery {\n me {\n ...SettingsPurchasesRoute_me\n id\n }\n}\n\nfragment CommercePagination_pageCursors on CommercePageCursors {\n around {\n cursor\n page\n isCurrent\n }\n first {\n cursor\n page\n isCurrent\n }\n last {\n cursor\n page\n isCurrent\n }\n previous {\n cursor\n page\n }\n}\n\nfragment SettingsPurchasesRoute_me on Me {\n ...SettingsPurchases_me\n}\n\nfragment SettingsPurchasesRow_order on CommerceOrder {\n __isCommerceOrder: __typename\n source\n internalID\n code\n displayState\n state\n requestedFulfillment {\n __typename\n }\n paymentMethodDetails {\n __typename\n ... on CreditCard {\n lastDigits\n id\n }\n ... on BankAccount {\n last4\n id\n }\n ... on WireTransfer {\n isManualPayment\n }\n }\n buyerTotal(precision: 2)\n createdAt\n currencyCode\n lineItems {\n edges {\n node {\n artworkVersion {\n image {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n artwork {\n href\n partner {\n href\n initials\n name\n profile {\n icon {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n id\n }\n shippingOrigin\n title\n artistNames\n artists(shallow: true) {\n href\n id\n }\n id\n }\n fulfillments(first: 1) {\n edges {\n node {\n trackingId\n id\n }\n }\n }\n id\n }\n }\n }\n}\n\nfragment SettingsPurchases_me on Me {\n name\n orders(states: [APPROVED, CANCELED, FULFILLED, REFUNDED, SUBMITTED, PROCESSING_APPROVAL], first: 10) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n pageCursors {\n ...CommercePagination_pageCursors\n }\n edges {\n node {\n __typename\n code\n ...SettingsPurchasesRow_order\n id\n }\n }\n }\n}\n"
+ "text": "query settingsRoutes_PurchasesRouteQuery {\n me {\n ...SettingsPurchasesRoute_me\n id\n }\n}\n\nfragment CommercePagination_pageCursors on CommercePageCursors {\n around {\n cursor\n page\n isCurrent\n }\n first {\n cursor\n page\n isCurrent\n }\n last {\n cursor\n page\n isCurrent\n }\n previous {\n cursor\n page\n }\n}\n\nfragment SettingsPurchasesRoute_me on Me {\n ...SettingsPurchases_me\n}\n\nfragment SettingsPurchasesRow_order on CommerceOrder {\n __isCommerceOrder: __typename\n source\n internalID\n code\n displayState\n requestedFulfillment {\n __typename\n }\n paymentMethodDetails {\n __typename\n ... on CreditCard {\n lastDigits\n id\n }\n ... on BankAccount {\n last4\n id\n }\n ... on WireTransfer {\n isManualPayment\n }\n }\n buyerTotal(precision: 2)\n createdAt\n currencyCode\n lineItems {\n edges {\n node {\n artworkVersion {\n image {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n artwork {\n href\n partner {\n href\n initials\n name\n profile {\n icon {\n cropped(width: 45, height: 45) {\n src\n srcSet\n }\n }\n id\n }\n id\n }\n shippingOrigin\n title\n artistNames\n artists(shallow: true) {\n href\n id\n }\n id\n }\n fulfillments(first: 1) {\n edges {\n node {\n trackingId\n id\n }\n }\n }\n id\n }\n }\n }\n ... on CommerceOfferOrder {\n buyerAction\n }\n}\n\nfragment SettingsPurchases_me on Me {\n name\n orders(states: [APPROVED, CANCELED, FULFILLED, REFUNDED, SUBMITTED, PROCESSING_APPROVAL], first: 10) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n pageCursors {\n ...CommercePagination_pageCursors\n }\n edges {\n node {\n __typename\n code\n ...SettingsPurchasesRow_order\n id\n }\n }\n }\n}\n"
}
};
})();