chore(core-flows): order edit - remove item update action (#8722)

This commit is contained in:
Carlos R. L. Rodrigues authored and GitHub committed 2024-08-22 11:32:27 +00:00
1 parent cad6dae231
commit 4c43122358
2 files changed
+8 -3

No files matched your search

@@ -47,8 +47,14 @@ export const removeOrderEditItemActionValidationStep = createStep(
throw new Error( throw new Error(
`No item found for order ${input.order_id} in order change ${orderChange.id}` `No item found for order ${input.order_id} in order change ${orderChange.id}`
) )
} else if (associatedAction.action !== ChangeActionType.ITEM_ADD) { } else if (
throw new Error(`Action ${associatedAction.id} is not adding an item`) ![ChangeActionType.ITEM_ADD, ChangeActionType.ITEM_UPDATE].includes(
associatedAction.action as ChangeActionType
)
) {
throw new Error(
`Action ${associatedAction.id} is not adding or updating an item`
)
} }
} }
) )
-1
View File
@@ -9,7 +9,6 @@ import { ClaimReason } from "./mutations"
* The change action's type. * The change action's type.
*/ */
export type ChangeActionType = export type ChangeActionType =
| "CANCEL"
| "CANCEL_RETURN_ITEM" | "CANCEL_RETURN_ITEM"
| "FULFILL_ITEM" | "FULFILL_ITEM"
| "CANCEL_ITEM_FULFILLMENT" | "CANCEL_ITEM_FULFILLMENT"