Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

583 B
Raw Blame
import type { AdminOrder } from "@medusajs/types"

/**
 * An order in `requires_action` is awaiting a decision (e.g. a seller accepting it), so
 * fulfilment, edits, returns, claims, exchanges and payment actions stay unavailable until it
 * leaves that status, the same way they are on a canceled order.
 */
export const isOrderActionable = (order: Pick<AdminOrder, "status">): boolean =>
  order.status !== "canceled" && order.status !== "requires_action"

export const isOrderAwaitingAction = (
  order: Pick<AdminOrder, "status">
): boolean => order.status === "requires_action"