fix(admin-ui): Allow backorder update on variants (#4051)
This commit is contained in:
+2
-2
@@ -7,7 +7,7 @@ import TrashIcon from "../../../../components/fundamentals/icons/trash-icon"
|
||||
import { getErrorMessage } from "../../../../utils/error-messages"
|
||||
import moment from "moment"
|
||||
import { parse } from "iso8601-duration"
|
||||
import { removeNullish } from "../../../../utils/remove-nullish"
|
||||
import { removeFalsy } from "../../../../utils/remove-nullish"
|
||||
import { useAdminUpdateDiscount } from "medusa-react"
|
||||
import useNotification from "../../../../hooks/use-notification"
|
||||
|
||||
@@ -103,7 +103,7 @@ const useDiscountConfigurations = (discount: Discount) => {
|
||||
title: "Duration",
|
||||
description: (
|
||||
<CommonDescription
|
||||
text={Object.entries(removeNullish(parse(discount.valid_duration)))
|
||||
text={Object.entries(removeFalsy(parse(discount.valid_duration)))
|
||||
.map(([key, value]) => `${value} ${key}`)
|
||||
.join(", ")}
|
||||
/>
|
||||
|
||||
@@ -32,7 +32,7 @@ import WarningCircleIcon from "../../../../components/fundamentals/icons/warning
|
||||
import { displayAmount } from "../../../../utils/prices"
|
||||
import { getAllReturnableItems } from "../utils/create-filtering"
|
||||
import { getErrorMessage } from "../../../../utils/error-messages"
|
||||
import { removeNullish } from "../../../../utils/remove-nullish"
|
||||
import { removeFalsy } from "../../../../utils/remove-nullish"
|
||||
import { useFeatureFlag } from "../../../../providers/feature-flag-provider"
|
||||
import useNotification from "../../../../hooks/use-notification"
|
||||
|
||||
@@ -181,7 +181,7 @@ const ReturnMenu: React.FC<ReturnMenuProps> = ({ order, onDismiss }) => {
|
||||
...value,
|
||||
}
|
||||
delete toSet.reason
|
||||
const clean = removeNullish(toSet)
|
||||
const clean = removeFalsy(toSet)
|
||||
return {
|
||||
item_id: key,
|
||||
...(clean as { quantity: number }),
|
||||
|
||||
Reference in New Issue
Block a user