.
This commit is contained in:
parent
430ae8e5ea
commit
d919ccedf6
@ -39,26 +39,24 @@ export const ProformaUpdateEditorForm = ({
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<form onSubmit={onSubmit}>
|
||||
<div className="space-y-6">
|
||||
<ProformaUpdateHeaderEditor disabled={isSubmitting} />
|
||||
<form className="space-y-6" onSubmit={onSubmit}>
|
||||
<ProformaUpdateHeaderEditor disabled={isSubmitting} />
|
||||
|
||||
<ProformaUpdateRecipientEditor
|
||||
disabled={isSubmitting}
|
||||
onChangeCustomerClick={onChangeCustomerClick}
|
||||
onCreateCustomerClick={onCreateCustomerClick}
|
||||
selectedCustomer={selectedCustomer}
|
||||
/>
|
||||
<ProformaUpdateRecipientEditor
|
||||
disabled={isSubmitting}
|
||||
onChangeCustomerClick={onChangeCustomerClick}
|
||||
onCreateCustomerClick={onCreateCustomerClick}
|
||||
selectedCustomer={selectedCustomer}
|
||||
/>
|
||||
|
||||
<div className="flex flex-col-reverse gap-3 border-t pt-4 sm:flex-row sm:justify-end">
|
||||
<Button disabled={isSubmitting} onClick={onReset} type="button" variant="outline">
|
||||
{t("common.reset", "Restablecer")}
|
||||
</Button>
|
||||
<div className="flex flex-col-reverse gap-3 border-t pt-4 sm:flex-row sm:justify-end">
|
||||
<Button disabled={isSubmitting} onClick={onReset} type="button" variant="outline">
|
||||
{t("common.reset", "Restablecer")}
|
||||
</Button>
|
||||
|
||||
<Button disabled={isSubmitting} type="submit">
|
||||
{isSubmitting ? t("common.saving", "Guardando...") : t("common.save", "Guardar")}
|
||||
</Button>
|
||||
</div>
|
||||
<Button disabled={isSubmitting} type="submit">
|
||||
{isSubmitting ? t("common.saving", "Guardando...") : t("common.save", "Guardar")}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
||||
@ -22,40 +22,50 @@ export const ProformaUpdateHeaderEditor = ({
|
||||
<ProformaHeaderFormGrid>
|
||||
<SelectField
|
||||
className="md:col-span-2"
|
||||
disabled={disabled}
|
||||
label={t("form_fields.proformas.series.label")}
|
||||
name="series"
|
||||
placeholder={t("form_fields.proformas.series.placeholder")}
|
||||
readOnly={readOnly}
|
||||
/>
|
||||
|
||||
<DatePickerField
|
||||
className="md:col-span-3"
|
||||
disabled={disabled}
|
||||
label={t("form_fields.proformas.invoice_date.label")}
|
||||
name="invoice_date"
|
||||
name="invoiceDate"
|
||||
placeholder={t("form_fields.proformas.invoice_date.placeholder")}
|
||||
readOnly={readOnly}
|
||||
required
|
||||
/>
|
||||
|
||||
<DatePickerField
|
||||
className="md:col-span-3"
|
||||
disabled={disabled}
|
||||
label={t("form_fields.proformas.operation_date.label")}
|
||||
name="operation_date"
|
||||
name="operationDate"
|
||||
placeholder={t("form_fields.proformas.operation_date.placeholder")}
|
||||
readOnly={readOnly}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
className="md:col-span-4"
|
||||
disabled={disabled}
|
||||
label={t("form_fields.proformas.reference.label")}
|
||||
maxLength={256}
|
||||
name="reference"
|
||||
placeholder={t("form_fields.proformas.reference.placeholder")}
|
||||
readOnly={readOnly}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
className="md:col-span-12"
|
||||
disabled={disabled}
|
||||
label={t("form_fields.proformas.description.label")}
|
||||
maxLength={256}
|
||||
name="description"
|
||||
placeholder={t("form_fields.proformas.description.placeholder")}
|
||||
readOnly={readOnly}
|
||||
/>
|
||||
</ProformaHeaderFormGrid>
|
||||
</ProformaSectionCard>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user