IO-3515 PR Comments addressed.
This commit is contained in:
@@ -58,11 +58,11 @@ function BillEnterAiScan({
|
||||
setScanLoading(false);
|
||||
|
||||
// Update form with the extracted data
|
||||
if (data.data && data.data.billForm) {
|
||||
if (data?.data?.billForm) {
|
||||
form.setFieldsValue(data.data.billForm);
|
||||
await form.validateFields(["billlines"], { recursive: true });
|
||||
notification.success({
|
||||
title: t(".bills.labels.ai.scancomplete")
|
||||
title: t("bills.labels.ai.scancomplete")
|
||||
});
|
||||
}
|
||||
} else if (data.status === "FAILED") {
|
||||
@@ -155,8 +155,6 @@ function BillEnterAiScan({
|
||||
}
|
||||
} catch (error) {
|
||||
setScanLoading(false);
|
||||
console.log("*** ~ BillEnterAiScan ~ error:", error, error.response?.data?.message);
|
||||
|
||||
notification.error({
|
||||
title: t("bills.labels.ai.scanfailed"),
|
||||
description: error.response?.data?.message || error.message || t("bills.labels.ai.generic_failure")
|
||||
|
||||
Reference in New Issue
Block a user