BIG-86: handle message error.

This commit is contained in:
elforjani3
2021-09-15 16:50:05 +02:00
parent 354efd08c6
commit 9c0d4e18ec
4 changed files with 16 additions and 3 deletions

View File

@@ -83,6 +83,11 @@ function ReceiptForm({
receipt_number: intl.get('sale_receipt_number_not_unique'),
});
}
if (errors.some((e) => e.type === ERROR.SALE_RECEIPT_NO_IS_REQUIRED)) {
setErrors({
receipt_number: intl.get('receipt.field.error.receipt_number_required'),
});
}
};
// Handle the form submit.