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

View File

@@ -280,11 +280,7 @@ export function BillEnterModalLinesComponent({
{ required: true },
{
validator: (_, value) => {
if (Math.abs(parseFloat(value)) < 0.01) {
return Promise.reject();
} else {
return Promise.resolve();
}
return Math.abs(parseFloat(value)) < 0.01 ? Promise.reject() : Promise.resolve();
},
warningOnly: true
}

View File

@@ -26,7 +26,7 @@ const ConfidenceDisplay = ({ rowValue: { confidence, actual_price, actual_cost }
const parsed_actual_price = parseFloat(actual_price);
const parsed_actual_cost = parseFloat(actual_cost);
if (!parsed) {
return <span style={{ color: "#999", fontSize: "0.85em" }}>N/A</span>;
return <span style={{ color: "#959595", fontSize: "0.85em" }}>N/A</span>;
}
const { total, ocr, jobMatch } = parsed;