IO-3515 PR Comments addressed.

This commit is contained in:
Patrick Fic
2026-02-20 09:06:11 -08:00
parent 6f80e6dcbf
commit 03ad66b2a2
7 changed files with 45 additions and 64 deletions

View File

@@ -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")