fix(dashboard): create variant remove inventory quantity (#8129)

This commit is contained in:
Frane Polić
2024-07-15 17:44:09 +02:00
committed by GitHub
parent 00c7900337
commit 43eb38c8cb

View File

@@ -27,7 +27,6 @@ const CreateProductVariantSchema = z.object({
ean: z.string().optional(),
upc: z.string().optional(),
barcode: z.string().optional(),
inventory_quantity: optionalInt,
manage_inventory: z.boolean(),
allow_backorder: z.boolean(),
weight: optionalInt,
@@ -49,7 +48,6 @@ export const CreateProductVariantForm = ({
const form = useForm<z.infer<typeof CreateProductVariantSchema>>({
defaultValues: {
inventory_quantity: 0,
manage_inventory: true,
allow_backorder: false,
options: {},
@@ -79,7 +77,6 @@ export const CreateProductVariantForm = ({
height,
width,
length,
inventory_quantity,
allow_backorder,
manage_inventory,
sku,
@@ -100,7 +97,6 @@ export const CreateProductVariantForm = ({
ean,
upc,
barcode,
inventory_quantity: parseNumber(inventory_quantity),
allow_backorder,
manage_inventory,
}
@@ -247,23 +243,6 @@ export const CreateProductVariantForm = ({
)
}}
/>
<Form.Field
control={form.control}
name="inventory_quantity"
render={({ field }) => {
return (
<Form.Item>
<Form.Label>
{t("fields.inventoryQuantity")}
</Form.Label>
<Form.Control>
<Input type="number" {...field} />
</Form.Control>
<Form.ErrorMessage />
</Form.Item>
)
}}
/>
</div>
<Form.Field
control={form.control}