Mostrar "invoiceNumber" como campo de solo lectura
This commit is contained in:
parent
69040d289e
commit
4d1735e3d5
@ -21,6 +21,8 @@ export const mapProformaToProformaUpdateForm = (proforma: Proforma): ProformaUpd
|
||||
const fiscalDefaults = resolveFiscalDefaults(proforma, proformaDefaults);
|
||||
|
||||
return {
|
||||
invoiceNumber: proforma.invoiceNumber,
|
||||
|
||||
series: proforma.series ?? proformaDefaults.series,
|
||||
|
||||
invoiceDate: proforma.invoiceDate ?? proformaDefaults.invoiceDate,
|
||||
|
||||
@ -18,6 +18,8 @@ import type { ProformaItemUpdateForm } from "./proforma-item-update-form.entity"
|
||||
export type ProformaTaxMode = "single" | "perLine";
|
||||
|
||||
export interface ProformaUpdateForm {
|
||||
invoiceNumber: string;
|
||||
|
||||
series: string;
|
||||
|
||||
invoiceDate: string;
|
||||
|
||||
@ -38,7 +38,7 @@ export const ProformaUpdateHeaderEditor = ({
|
||||
<FormSectionGrid>
|
||||
<TextField
|
||||
className="md:col-span-2"
|
||||
disabled={disabled}
|
||||
disabled={true}
|
||||
label={t("form_fields.proformas.invoice_number.label")}
|
||||
maxLength={16}
|
||||
name="invoiceNumber"
|
||||
|
||||
@ -16,14 +16,6 @@ import type { NativeInputProps } from "./types.ts";
|
||||
|
||||
export type ProformaFieldSpan = "xs" | "sm" | "md" | "lg" | "full";
|
||||
|
||||
const fieldSpanClasses: Record<ProformaFieldSpan, string> = {
|
||||
xs: "md:col-span-2",
|
||||
sm: "md:col-span-3",
|
||||
md: "md:col-span-4",
|
||||
lg: "md:col-span-6",
|
||||
full: "md:col-span-12",
|
||||
};
|
||||
|
||||
type TextFieldProps<TFormValues extends FieldValues> = Omit<NativeInputProps, "name"> & {
|
||||
name: FieldPath<TFormValues>;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user