fix(admin-ui): Fix effect check in inventory table and overflow UI (#3577)
* Fix effect check in inventory table and overflow UI * Create ten-berries-rest.md * Fix edit stock&inventory modal to use the right form * Fix faulty merge conflict resolution * Fix inventory item creation * Add redirect to locations tab if no locations, toast * Revert redirect and toast, add message in table --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
@@ -52,7 +52,7 @@ const BodyCard: React.FC<BodyCardProps> = ({
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className={clsx("flex grow flex-col overflow-y-auto", {
|
||||
className={clsx("flex grow flex-col", {
|
||||
"border-grey-20 border-b border-solid": setBorders,
|
||||
})}
|
||||
onScroll={scrollListener}
|
||||
|
||||
+4
-3
@@ -1,6 +1,6 @@
|
||||
import EditFlowVariantForm, {
|
||||
EditFlowVariantFormType,
|
||||
} from "../../forms/product/variant-form/edit-flow-variant-form"
|
||||
} from "../../forms/product/variant-inventory-form/edit-flow-variant-form"
|
||||
import LayeredModal, {
|
||||
LayeredModalContext,
|
||||
} from "../../molecules/modal/layered-modal"
|
||||
@@ -48,10 +48,10 @@ const EditVariantInventoryModal = ({ onClose, product, variant }: Props) => {
|
||||
const { onUpdateVariant, updatingVariant } = useEditProductActions(product.id)
|
||||
|
||||
const onSubmit = async (data: EditFlowVariantFormType) => {
|
||||
const locationLevels = data.stock.stock_location || []
|
||||
const locationLevels = data.stock.location_levels || []
|
||||
const manageInventory = data.stock.manage_inventory
|
||||
delete data.stock.manage_inventory
|
||||
delete data.stock.stock_location
|
||||
delete data.stock.location_levels
|
||||
|
||||
let inventoryItemId: string | undefined = itemId
|
||||
|
||||
@@ -176,6 +176,7 @@ const StockForm = ({
|
||||
updatingVariant: boolean
|
||||
}) => {
|
||||
const form = useForm<EditFlowVariantFormType>({
|
||||
// @ts-ignore
|
||||
defaultValues: getEditVariantDefaultValues(variantInventory),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user