From ad520ab23e95a3871c2969ce86f1bbd39e488e1c Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 3 Feb 2026 15:42:10 -0500 Subject: [PATCH] feature/IO-3548-Bill-Modal-TabOrder --- .../bill-form/bill-form.lines.component.jsx | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index 73b0a21a9..a841f0534 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -1,6 +1,7 @@ import { DeleteFilled, DollarCircleFilled } from "@ant-design/icons"; import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Checkbox, Form, Input, InputNumber, Select, Space, Switch, Table, Tooltip } from "antd"; +import { useRef } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -32,6 +33,7 @@ export function BillEnterModalLinesComponent({ }) { const { t } = useTranslation(); const { setFieldsValue, getFieldsValue, getFieldValue } = form; + const firstFieldRefs = useRef({}); const CONTROL_HEIGHT = 32; @@ -155,6 +157,9 @@ export function BillEnterModalLinesComponent({ ), formInput: (record, index) => ( { + firstFieldRefs.current[index] = el; + }} disabled={disabled} options={lineData} style={{ @@ -205,7 +210,7 @@ export function BillEnterModalLinesComponent({ label: t("billlines.fields.line_desc"), rules: [{ required: true }] }), - formInput: () => + formInput: () => }, { title: t("billlines.fields.quantity"), @@ -234,7 +239,7 @@ export function BillEnterModalLinesComponent({ }) ] }), - formInput: () => + formInput: () => }, { title: t("billlines.fields.actual_price"), @@ -251,6 +256,7 @@ export function BillEnterModalLinesComponent({ { if (e.key === "Tab" && !e.shiftKey) autofillActualCost(index); @@ -328,6 +334,7 @@ export function BillEnterModalLinesComponent({ min={0} disabled={disabled} controls={false} + tabIndex={0} style={{ width: "100%", height: CONTROL_HEIGHT }} // NOTE: No auto-fill on focus/blur; only triggered from Retail on Tab /> @@ -392,7 +399,7 @@ export function BillEnterModalLinesComponent({ rules: [{ required: true }] }), formInput: () => ( - {bodyshopHasDmsKey(bodyshop) ? CiecaSelect(true, false) : responsibilityCenters.costs.map((item) => {item.name})} @@ -412,7 +419,7 @@ export function BillEnterModalLinesComponent({ name: [field.name, "location"] }), formInput: () => ( - {bodyshop.md_parts_locations.map((loc, idx) => ( {loc} @@ -432,7 +439,7 @@ export function BillEnterModalLinesComponent({ key: `${field.name}deductedfromlbr`, name: [field.name, "deductedfromlbr"] }), - formInput: () => , + formInput: () => , additional: (record, index) => ( {() => { @@ -523,7 +530,7 @@ export function BillEnterModalLinesComponent({ rome: false }) }), - formInput: () => + formInput: () => } ] }), @@ -538,7 +545,7 @@ export function BillEnterModalLinesComponent({ valuePropName: "checked", name: [field.name, "applicable_taxes", "state"] }), - formInput: () => + formInput: () => }, ...InstanceRenderManager({ @@ -554,7 +561,7 @@ export function BillEnterModalLinesComponent({ valuePropName: "checked", name: [field.name, "applicable_taxes", "local"] }), - formInput: () => + formInput: () => } ] }), @@ -574,6 +581,7 @@ export function BillEnterModalLinesComponent({ icon={} disabled={disabled || invLen > 0} onClick={() => remove(record.name)} + tabIndex={0} /> {Simple_Inventory.treatment === "on" && ( @@ -645,12 +653,19 @@ export function BillEnterModalLinesComponent({