chore(core-flows): order edit - remove item update action (#8722)
This commit is contained in:
committed by
GitHub
parent
cad6dae231
commit
4c43122358
+8
-2
@@ -47,8 +47,14 @@ export const removeOrderEditItemActionValidationStep = createStep(
|
||||
throw new Error(
|
||||
`No item found for order ${input.order_id} in order change ${orderChange.id}`
|
||||
)
|
||||
} else if (associatedAction.action !== ChangeActionType.ITEM_ADD) {
|
||||
throw new Error(`Action ${associatedAction.id} is not adding an item`)
|
||||
} else if (
|
||||
![ChangeActionType.ITEM_ADD, ChangeActionType.ITEM_UPDATE].includes(
|
||||
associatedAction.action as ChangeActionType
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
`Action ${associatedAction.id} is not adding or updating an item`
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -9,7 +9,6 @@ import { ClaimReason } from "./mutations"
|
||||
* The change action's type.
|
||||
*/
|
||||
export type ChangeActionType =
|
||||
| "CANCEL"
|
||||
| "CANCEL_RETURN_ITEM"
|
||||
| "FULFILL_ITEM"
|
||||
| "CANCEL_ITEM_FULFILLMENT"
|
||||
|
||||
Reference in New Issue
Block a user