Se cambio en el modulo de editar producto el tipo de input a number
This commit is contained in:
@@ -21,9 +21,9 @@ import { useForm } from 'react-hook-form';
|
|||||||
import { useUpdateProduct } from "@/feactures/inventory/hooks/use-mutation";
|
import { useUpdateProduct } from "@/feactures/inventory/hooks/use-mutation";
|
||||||
import { updateInventory, EditInventory, InventoryTable } from '@/feactures/inventory/schemas/inventory'; // Renombrado EditInventory para claridad
|
import { updateInventory, EditInventory, InventoryTable } from '@/feactures/inventory/schemas/inventory'; // Renombrado EditInventory para claridad
|
||||||
import { Textarea } from '@repo/shadcn/components/ui/textarea';
|
import { Textarea } from '@repo/shadcn/components/ui/textarea';
|
||||||
import {STATUS} from '@/constants/status'
|
import { STATUS } from '@/constants/status'
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import {sizeFormate} from "@/feactures/inventory/utils/sizeFormate"
|
import { sizeFormate } from "@/feactures/inventory/utils/sizeFormate"
|
||||||
// import { z } from 'zod'; // Asegúrate de importar Zod
|
// import { z } from 'zod'; // Asegúrate de importar Zod
|
||||||
|
|
||||||
// --- MODIFICACIÓN CLAVE ---
|
// --- MODIFICACIÓN CLAVE ---
|
||||||
@@ -154,7 +154,7 @@ export function UpdateForm({
|
|||||||
<FormItem >
|
<FormItem >
|
||||||
<FormLabel>Precio</FormLabel>
|
<FormLabel>Precio</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field} />
|
<Input type="number" {...field} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -182,7 +182,7 @@ export function UpdateForm({
|
|||||||
<FormItem className='col-span-2'>
|
<FormItem className='col-span-2'>
|
||||||
<FormLabel>Descripción</FormLabel>
|
<FormLabel>Descripción</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea {...field} className="resize-none"/>
|
<Textarea {...field} className="resize-none" />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -196,7 +196,7 @@ export function UpdateForm({
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cantidad/Stock</FormLabel>
|
<FormLabel>Cantidad/Stock</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field} type="number" onChange={(e) => field.onChange(Number(e.target.value))}/>
|
<Input {...field} type="number" onChange={(e) => field.onChange(Number(e.target.value))} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user