feature/IO-3499-React-19 checkpoint
This commit is contained in:
@@ -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")
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -11,7 +11,7 @@ export default function ContractCreateJobPrefillComponent({ jobId, form }) {
|
||||
const notification = useNotification();
|
||||
|
||||
const handleClick = () => {
|
||||
call({ id: jobId });
|
||||
call({ variables: { id: jobId } });
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user