chore(order): cancel return (#7881)

This commit is contained in:
Carlos R. L. Rodrigues
2024-07-02 06:52:58 -03:00
committed by GitHub
parent b3236ff31c
commit 07715e6b50
46 changed files with 1339 additions and 121 deletions

View File

@@ -15,7 +15,7 @@ export function applyChangesToOrder(
actionsMap: Record<string, any[]>
) {
const itemsToUpsert: OrderItem[] = []
const shippingMethodsToInsert: OrderShippingMethod[] = []
const shippingMethodsToUpsert: OrderShippingMethod[] = []
const summariesToUpsert: any[] = []
const orderToUpdate: any[] = []
@@ -68,8 +68,9 @@ export function applyChangesToOrder(
...((shippingMethod as any).detail ?? shippingMethod),
version,
}
delete sm.id
shippingMethodsToInsert.push(sm)
shippingMethodsToUpsert.push(sm)
}
orderToUpdate.push({
@@ -85,7 +86,7 @@ export function applyChangesToOrder(
return {
itemsToUpsert,
shippingMethodsToInsert,
shippingMethodsToUpsert,
summariesToUpsert,
orderToUpdate,
}