mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
BIG-81: handle error message.
This commit is contained in:
@@ -78,6 +78,13 @@ function EstimateForm({
|
||||
estimate_number: intl.get('estimate_number_is_not_unqiue'),
|
||||
});
|
||||
}
|
||||
if (
|
||||
errors.some((error) => error.type === ERROR.SALE_ESTIMATE_NO_IS_REQUIRED)
|
||||
) {
|
||||
setErrors({
|
||||
estimate_number: intl.get('estimate.field.error.estimate_number'),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Handles form submit.
|
||||
|
||||
@@ -153,6 +153,7 @@ function InvoiceFormHeaderFields({
|
||||
{({ form, field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'invoice_no'} />}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
inline={true}
|
||||
className={classNames('form-group--invoice-no', CLASSES.FILL)}
|
||||
intent={inputIntent({ error, touched })}
|
||||
|
||||
@@ -93,8 +93,7 @@ export const transformErrors = (errors, { setErrors }) => {
|
||||
errors.some((error) => error.type === ERROR.SALE_INVOICE_NO_IS_REQUIRED)
|
||||
) {
|
||||
setErrors({
|
||||
invoice_no:
|
||||
'Invoice number is required, use auto-increment mode or enter manually.',
|
||||
invoice_no: intl.get('invoice.field.error.invoice_no'),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user