feature/IO-3499-React-19 checkpoint

This commit is contained in:
Dave
2026-01-20 15:27:32 -05:00
parent a91bfea581
commit d7e3b52dc6
16 changed files with 493 additions and 179 deletions

View File

@@ -98,17 +98,19 @@ export function BillFormComponent({
}
const jobId = form.getFieldValue("jobid");
if (jobId) {
loadLines({ id: jobId });
loadLines({ variables: { id: jobId } });
if (form.getFieldValue("is_credit_memo") && vendorId && !billEdit) {
loadOutstandingReturns({
jobId: jobId,
vendorId: vendorId
variables: {
jobId: jobId,
vendorId: vendorId
}
});
}
}
if (vendorId === bodyshop.inhousevendorid && !billEdit) {
loadInventory();
loadInventory({ variables: {} });
}
}, [
form,
@@ -144,11 +146,13 @@ export function BillFormComponent({
notExported={false}
onBlur={() => {
if (form.getFieldValue("jobid") !== null && form.getFieldValue("jobid") !== undefined) {
loadLines({ id: form.getFieldValue("jobid") });
loadLines({ variables: { id: form.getFieldValue("jobid") } });
if (form.getFieldValue("vendorid") !== null && form.getFieldValue("vendorid") !== undefined) {
loadOutstandingReturns({
jobId: form.getFieldValue("jobid"),
vendorId: form.getFieldValue("vendorid")
variables: {
jobId: form.getFieldValue("jobid"),
vendorId: form.getFieldValue("vendorid")
}
});
}
}

View File

@@ -105,7 +105,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
hasLoadedConversationsOnceRef.current = true;
getConversations({ offset: 0 }).catch((err) => {
getConversations({ variables: { offset: 0 } }).catch((err) => {
console.error(`Error fetching conversations: ${err?.message || ""}`, err);
});
}, [getConversations]);
@@ -115,7 +115,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
if (called && typeof refetch === "function") {
await refetch({ variables: { offset: 0 } });
} else {
await getConversations({ offset: 0 });
await getConversations({ variables: { offset: 0 } });
}
} catch (err) {
console.error(`Error refreshing conversations: ${err?.message || ""}`, err);

View File

@@ -28,7 +28,7 @@ export function ChatTagRoContainer({ conversation, bodyshop }) {
const executeSearch = (v) => {
logImEXEvent("messaging_search_job_tag", { searchTerm: v });
loadRo(v).catch((e) => console.error("Error in ChatTagRoContainer executeSearch:", e));
loadRo({ variables: v }).catch((e) => console.error("Error in ChatTagRoContainer executeSearch:", e));
};
const debouncedExecuteSearch = _.debounce(executeSearch, 500);

View File

@@ -11,7 +11,7 @@ export default function ContractCreateJobPrefillComponent({ jobId, form }) {
const notification = useNotification();
const handleClick = () => {
call({ id: jobId });
call({ variables: { id: jobId } });
};
useEffect(() => {

View File

@@ -35,8 +35,10 @@ export function ContractsFindModalContainer({ contractFinderModal, toggleModalVi
//Execute contract find
callSearch({
plate: (values.plate && values.plate !== "" && values.plate) || undefined,
time: values.time
variables: {
plate: (values.plate && values.plate !== "" && values.plate) || undefined,
time: values.time
}
});
};

View File

@@ -60,7 +60,7 @@ export function DmsCdkVehicles({ form, job }) {
<Table
title={() => (
<Input.Search
onSearch={(val) => callSearch({ search: val })}
onSearch={(val) => callSearch({ variables: { search: val } })}
placeholder={t("general.labels.search")}
/>
)}
@@ -87,7 +87,9 @@ export function DmsCdkVehicles({ form, job }) {
onClick={() => {
setOpen(true);
callSearch({
search: job?.v_model_desc && job.v_model_desc.substr(0, 3)
variables: {
search: job?.v_model_desc && job.v_model_desc.substr(0, 3)
}
});
}}
>

View File

@@ -38,7 +38,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
useEffect(() => {
if (visibility) {
callQuery({ jobid: job.id });
callQuery({ variables: { jobid: job.id } });
}
}, [visibility, job.id, callQuery]);

View File

@@ -203,7 +203,7 @@ export function JobsDetailHeaderActionsToggleProduction({
open={popOverVisible}
onOpenChange={setPopOverVisible}
onClick={(e) => {
getJobDetails({ id: job.id });
getJobDetails({ variables: { id: job.id } });
e.stopPropagation();
}}
getPopupContainer={(trigger) => trigger.parentNode}

View File

@@ -17,7 +17,7 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
);
const executeSearch = (v) => {
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch({ variables: v.variables });
};
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
@@ -29,7 +29,7 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
useEffect(() => {
if (value === option && value) {
callIdSearch({ id: value });
callIdSearch({ variables: { id: value } });
}
}, [value, option, callIdSearch]);

View File

@@ -101,7 +101,9 @@ export function PartsOrderListTableDrawerComponent({
if (selectedPartsOrderRecord?.returnfrombill) {
try {
const { data } = await billQuery({
billid: selectedPartsOrderRecord.returnfrombill
variables: {
billid: selectedPartsOrderRecord.returnfrombill
}
});
setBillData(data);
} catch (error) {

View File

@@ -258,9 +258,10 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
form.setFieldsValue({ id: null });
return null;
}
if (!vendorCalled && idtype === "vendor") callVendorQuery();
if (!employeeCalled && idtype === "employee") callEmployeeQuery();
if (!employeeWithEmailCalled && idtype === "employeeWithEmail") callEmployeeWithEmailQuery();
if (!vendorCalled && idtype === "vendor") callVendorQuery({ variables: {} });
if (!employeeCalled && idtype === "employee") callEmployeeQuery({ variables: {} });
if (!employeeWithEmailCalled && idtype === "employeeWithEmail")
callEmployeeWithEmailQuery({ variables: {} });
if (idtype === "vendor")
return (
<Form.Item

View File

@@ -52,7 +52,7 @@ export default function ScheduleProductionList() {
return (
<Popover content={content} trigger="click" placement="bottomRight">
<Button onClick={() => callQuery()}>
<Button onClick={() => callQuery({ variables: {} })}>
{t("appointments.labels.inproduction")}
<DownOutlined />
</Button>

View File

@@ -19,7 +19,7 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
);
const executeSearch = (v) => {
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch({ variables: v.variables });
};
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
@@ -31,7 +31,7 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
useEffect(() => {
if (value === option && value) {
callIdSearch({ id: value });
callIdSearch({ variables: { id: value } });
}
}, [value, option, callIdSearch]);