.
This commit is contained in:
parent
d707c2360f
commit
a20756724c
@ -325,17 +325,17 @@
|
|||||||
"payment_method": {
|
"payment_method": {
|
||||||
"label": "Forma de pago",
|
"label": "Forma de pago",
|
||||||
"placeholder": "placeholder",
|
"placeholder": "placeholder",
|
||||||
"desc": "desc"
|
"desc": "Forma de pago que se utilizará en esta cotización"
|
||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
"label": "Notas",
|
"label": "Notas",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"desc": "desc"
|
"desc": "Notas a incluir en la cotización"
|
||||||
},
|
},
|
||||||
"validity": {
|
"validity": {
|
||||||
"label": "Validez de la cotización",
|
"label": "Validez de la cotización",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"desc": "desc"
|
"desc": "Validez de la cotización"
|
||||||
},
|
},
|
||||||
"subtotal_price": {
|
"subtotal_price": {
|
||||||
"label": "Importe neto",
|
"label": "Importe neto",
|
||||||
|
|||||||
@ -1,17 +1,19 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
import * as LabelPrimitive from "@radix-ui/react-label";
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import {
|
import {
|
||||||
Controller,
|
Controller,
|
||||||
ControllerProps,
|
|
||||||
FieldPath,
|
|
||||||
FieldValues,
|
|
||||||
FormProvider,
|
FormProvider,
|
||||||
useFormContext,
|
useFormContext,
|
||||||
|
type ControllerProps,
|
||||||
|
type FieldPath,
|
||||||
|
type FieldValues,
|
||||||
} from "react-hook-form";
|
} from "react-hook-form";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { Label } from "./label";
|
import { Label } from "@/ui/label";
|
||||||
|
|
||||||
const Form = FormProvider;
|
const Form = FormProvider;
|
||||||
|
|
||||||
@ -124,7 +126,7 @@ const FormDescription = React.forwardRef<
|
|||||||
<p
|
<p
|
||||||
ref={ref}
|
ref={ref}
|
||||||
id={formDescriptionId}
|
id={formDescriptionId}
|
||||||
className={cn("text-sm text-muted-foreground", className)}
|
className={cn("text-[0.8rem] text-muted-foreground", className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -136,8 +138,7 @@ const FormMessage = React.forwardRef<
|
|||||||
React.HTMLAttributes<HTMLParagraphElement>
|
React.HTMLAttributes<HTMLParagraphElement>
|
||||||
>(({ className, children, ...props }, ref) => {
|
>(({ className, children, ...props }, ref) => {
|
||||||
const { error, formMessageId } = useFormField();
|
const { error, formMessageId } = useFormField();
|
||||||
|
const body = error ? String(error?.message ?? "") : children;
|
||||||
const body = error && error.message ? String(error?.message || error.root?.message) : children;
|
|
||||||
|
|
||||||
if (!body) {
|
if (!body) {
|
||||||
return null;
|
return null;
|
||||||
@ -147,7 +148,7 @@ const FormMessage = React.forwardRef<
|
|||||||
<p
|
<p
|
||||||
ref={ref}
|
ref={ref}
|
||||||
id={formMessageId}
|
id={formMessageId}
|
||||||
className={cn("text-sm font-medium text-destructive", className)}
|
className={cn("text-[0.8rem] font-medium text-destructive", className)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{body}
|
{body}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user