refactor: remove usage of inventory_quantity from the codebase (#7323)
This commit is contained in:
1 parent
9ca302d33f
commit
a502222582
18 files changed
+159
-118
No files matched your search
@@ -3,7 +3,6 @@ export const defaultAdminProductsVariantFields = [
|
||||
"product_id",
|
||||
"title",
|
||||
"sku",
|
||||
"inventory_quantity",
|
||||
"allow_backorder",
|
||||
"manage_inventory",
|
||||
"hs_code",
|
||||
|
||||
@@ -131,7 +131,6 @@ export const AdminCreateProductVariant = z.object({
|
||||
barcode: z.string().optional(),
|
||||
hs_code: z.string().optional(),
|
||||
mid_code: z.string().optional(),
|
||||
inventory_quantity: z.number().optional().default(0),
|
||||
allow_backorder: z.boolean().optional().default(false),
|
||||
manage_inventory: z.boolean().optional().default(true),
|
||||
variant_rank: z.number().optional(),
|
||||
@@ -153,7 +152,6 @@ export const AdminUpdateProductVariant = AdminCreateProductVariant.extend({
|
||||
id: z.string().optional(),
|
||||
title: z.string().optional(),
|
||||
prices: z.array(AdminUpdateVariantPrice).optional(),
|
||||
inventory_quantity: z.number().optional(),
|
||||
allow_backorder: z.boolean().optional(),
|
||||
manage_inventory: z.boolean().optional(),
|
||||
}).strict()
|
||||
|
||||
@@ -32,7 +32,6 @@ export const ProductVariantModelMock = {
|
||||
return Promise.resolve({
|
||||
_id: IdMap.getId("inventory-test"),
|
||||
title: "inventory",
|
||||
inventory_quantity: 10,
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
})
|
||||
@@ -41,7 +40,6 @@ export const ProductVariantModelMock = {
|
||||
return Promise.resolve({
|
||||
_id: IdMap.getId("no-inventory-test"),
|
||||
title: "inventory",
|
||||
inventory_quantity: 0,
|
||||
allow_backorder: false,
|
||||
manage_inventory: false,
|
||||
})
|
||||
@@ -50,7 +48,6 @@ export const ProductVariantModelMock = {
|
||||
return Promise.resolve({
|
||||
_id: IdMap.getId("backorder-test"),
|
||||
title: "inventory",
|
||||
inventory_quantity: 5,
|
||||
allow_backorder: true,
|
||||
manage_inventory: true,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user