Update order history information

This commit is contained in:
dominik-zeglen 2020-08-26 12:33:03 +02:00
parent b1791b6277
commit d720389ba7
6 changed files with 1220 additions and 8 deletions

View file

@ -3137,6 +3137,10 @@
"context": "order history message",
"string": "Products were deleted from draft order"
},
"src_dot_orders_dot_components_dot_OrderHistory_dot_4121987561": {
"context": "order history message",
"string": "Order refund information was sent to customer"
},
"src_dot_orders_dot_components_dot_OrderHistory_dot_4265697648": {
"context": "order history message",
"string": "Updated fulfillment group's tracking number"
@ -3145,6 +3149,10 @@
"context": "order history message",
"string": "Payment failed"
},
"src_dot_orders_dot_components_dot_OrderHistory_dot_493321552": {
"context": "order history message",
"string": "Order cancel information was sent to customer"
},
"src_dot_orders_dot_components_dot_OrderHistory_dot_651019008": {
"context": "order history message",
"string": "Shipping details was sent to customer"

View file

@ -897,6 +897,7 @@ type CheckoutComplete {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
order: Order
confirmationNeeded: Boolean!
confirmationData: JSONString
checkoutErrors: [CheckoutError!]!
}
@ -2749,7 +2750,7 @@ type Mutation {
exportProducts(input: ExportProductsInput!): ExportProducts
checkoutAddPromoCode(checkoutId: ID!, promoCode: String!): CheckoutAddPromoCode
checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID!): CheckoutBillingAddressUpdate
checkoutComplete(checkoutId: ID!, redirectUrl: String, storeSource: Boolean = false): CheckoutComplete
checkoutComplete(checkoutId: ID!, paymentData: JSONString, redirectUrl: String, storeSource: Boolean = false): CheckoutComplete
checkoutCreate(input: CheckoutCreateInput!): CheckoutCreate
checkoutCustomerAttach(checkoutId: ID!, customerId: ID): CheckoutCustomerAttach
checkoutCustomerDetach(checkoutId: ID!): CheckoutCustomerDetach
@ -3044,6 +3045,8 @@ enum OrderEventsEmailsEnum {
SHIPPING_CONFIRMATION
TRACKING_UPDATED
ORDER_CONFIRMATION
ORDER_CANCEL
ORDER_REFUND
FULFILLMENT_CONFIRMATION
DIGITAL_LINKS
}
@ -3062,6 +3065,7 @@ enum OrderEventsEnum {
EMAIL_SENT
PAYMENT_AUTHORIZED
PAYMENT_CAPTURED
EXTERNAL_SERVICE_NOTIFICATION
PAYMENT_REFUNDED
PAYMENT_VOIDED
PAYMENT_FAILED
@ -3386,10 +3390,13 @@ type PaymentCapture {
enum PaymentChargeStatusEnum {
NOT_CHARGED
PENDING
PARTIALLY_CHARGED
FULLY_CHARGED
PARTIALLY_REFUNDED
FULLY_REFUNDED
REFUSED
CANCELLED
}
type PaymentCountableConnection {
@ -3433,9 +3440,10 @@ type PaymentGateway {
input PaymentInput {
gateway: String!
token: String!
token: String
amount: Decimal
billingAddress: AddressInput
returnUrl: String
}
type PaymentRefund {
@ -5021,10 +5029,14 @@ enum TransactionError {
enum TransactionKind {
AUTH
PENDING
ACTION_TO_CONFIRM
REFUND
REFUND_ONGOING
CAPTURE
VOID
CONFIRM
CANCEL
}
union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent

View file

@ -76,6 +76,16 @@ const getEventMessage = (event: OrderDetails_order_events, intl: IntlShape) => {
defaultMessage: "Shipping tracking number was sent to customer",
description: "order history message"
});
case OrderEventsEmailsEnum.ORDER_CANCEL:
return intl.formatMessage({
defaultMessage: "Order cancel information was sent to customer",
description: "order history message"
});
case OrderEventsEmailsEnum.ORDER_REFUND:
return intl.formatMessage({
defaultMessage: "Order refund information was sent to customer",
description: "order history message"
});
}
case OrderEventsEnum.FULFILLMENT_CANCELED:
return intl.formatMessage({
@ -211,6 +221,8 @@ const getEventMessage = (event: OrderDetails_order_events, intl: IntlShape) => {
defaultMessage: "Order address was updated",
description: "order history message"
});
case OrderEventsEnum.EXTERNAL_SERVICE_NOTIFICATION:
return event.message;
}
};

View file

@ -8,6 +8,7 @@ import {
FulfillmentStatus,
JobStatusEnum,
OrderAction,
OrderEventsEmailsEnum,
OrderEventsEnum,
OrderStatus,
PaymentChargeStatusEnum
@ -821,7 +822,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
email: null,
emailType: null,
id: "T3JkZXJFdmVudDoyMQ==",
invoiceNumber: "23/07/2020",
invoiceNumber: null,
message: null,
quantity: 1,
type: OrderEventsEnum.FULFILLMENT_FULFILLED_ITEMS,
@ -838,7 +839,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo0",
invoiceNumber: "23/07/2020",
invoiceNumber: null,
message: "This is note",
quantity: null,
type: OrderEventsEnum.NOTE_ADDED,
@ -851,11 +852,50 @@ export const order = (placeholder: string): OrderDetails_order => ({
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo1",
invoiceNumber: "24/07/2020",
invoiceNumber: null,
message: "This is note",
quantity: null,
type: OrderEventsEnum.NOTE_ADDED,
user: null
},
{
__typename: "OrderEvent",
amount: null,
date: "2019-09-17T13:22:24.376193+00:00",
email: null,
emailType: null,
id: "T3JkZXJFdmVudDo2",
invoiceNumber: null,
message: "Note from external service",
quantity: null,
type: OrderEventsEnum.EXTERNAL_SERVICE_NOTIFICATION,
user: null
},
{
__typename: "OrderEvent",
amount: null,
date: "2019-09-17T13:22:24.376193+00:00",
email: null,
emailType: OrderEventsEmailsEnum.ORDER_CANCEL,
id: "T3JkZXJFdmVudDo3",
invoiceNumber: null,
message: null,
quantity: null,
type: OrderEventsEnum.EMAIL_SENT,
user: null
},
{
__typename: "OrderEvent",
amount: null,
date: "2019-09-17T13:22:24.376193+00:00",
email: null,
emailType: OrderEventsEmailsEnum.ORDER_REFUND,
id: "T3JkZXJFdmVudDo4",
invoiceNumber: null,
message: null,
quantity: null,
type: OrderEventsEnum.EMAIL_SENT,
user: null
}
],
fulfillments: [

File diff suppressed because it is too large Load diff

View file

@ -553,7 +553,9 @@ export enum OrderErrorCode {
export enum OrderEventsEmailsEnum {
DIGITAL_LINKS = "DIGITAL_LINKS",
FULFILLMENT_CONFIRMATION = "FULFILLMENT_CONFIRMATION",
ORDER_CANCEL = "ORDER_CANCEL",
ORDER_CONFIRMATION = "ORDER_CONFIRMATION",
ORDER_REFUND = "ORDER_REFUND",
PAYMENT_CONFIRMATION = "PAYMENT_CONFIRMATION",
SHIPPING_CONFIRMATION = "SHIPPING_CONFIRMATION",
TRACKING_UPDATED = "TRACKING_UPDATED",
@ -565,6 +567,7 @@ export enum OrderEventsEnum {
DRAFT_CREATED = "DRAFT_CREATED",
DRAFT_REMOVED_PRODUCTS = "DRAFT_REMOVED_PRODUCTS",
EMAIL_SENT = "EMAIL_SENT",
EXTERNAL_SERVICE_NOTIFICATION = "EXTERNAL_SERVICE_NOTIFICATION",
FULFILLMENT_CANCELED = "FULFILLMENT_CANCELED",
FULFILLMENT_FULFILLED_ITEMS = "FULFILLMENT_FULFILLED_ITEMS",
FULFILLMENT_RESTOCKED_ITEMS = "FULFILLMENT_RESTOCKED_ITEMS",
@ -631,11 +634,14 @@ export enum PageSortField {
}
export enum PaymentChargeStatusEnum {
CANCELLED = "CANCELLED",
FULLY_CHARGED = "FULLY_CHARGED",
FULLY_REFUNDED = "FULLY_REFUNDED",
NOT_CHARGED = "NOT_CHARGED",
PARTIALLY_CHARGED = "PARTIALLY_CHARGED",
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
PENDING = "PENDING",
REFUSED = "REFUSED",
}
export enum PermissionEnum {