IO-808 Add claim and balance to payment modal
This commit is contained in:
@@ -19,6 +19,7 @@ const JobSearchSelect = (
|
||||
disabled,
|
||||
convertedOnly = false,
|
||||
notExported = true,
|
||||
clm_no = false,
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
@@ -55,7 +56,7 @@ const JobSearchSelect = (
|
||||
|
||||
useEffect(() => {
|
||||
if (value === option && value) {
|
||||
callIdSearch({ variables: { id: value } });
|
||||
callIdSearch({ variables: { id: value } }); // Sometimes results in a no-op. Not sure how to fix.
|
||||
}
|
||||
}, [value, option, callIdSearch]);
|
||||
|
||||
@@ -66,10 +67,13 @@ const JobSearchSelect = (
|
||||
}
|
||||
};
|
||||
|
||||
const theOptions = [
|
||||
...(idData && idData.jobs_by_pk ? [idData.jobs_by_pk] : []),
|
||||
...(data && data.search_jobs ? data.search_jobs : []),
|
||||
];
|
||||
const theOptions = _.uniqBy(
|
||||
[
|
||||
...(idData && idData.jobs_by_pk ? [idData.jobs_by_pk] : []),
|
||||
...(data && data.search_jobs ? data.search_jobs : []),
|
||||
],
|
||||
"id"
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -93,9 +97,9 @@ const JobSearchSelect = (
|
||||
{theOptions
|
||||
? theOptions.map((o) => (
|
||||
<Option key={o.id} value={o.id}>
|
||||
{`${o.ro_number || t("general.labels.na")} | ${
|
||||
o.ownr_ln || ""
|
||||
} ${o.ownr_fn || ""} ${
|
||||
{`${clm_no ? `${o.clm_no} | ` : ""}${
|
||||
o.ro_number || t("general.labels.na")
|
||||
} | ${o.ownr_ln || ""} ${o.ownr_fn || ""} ${
|
||||
o.ownr_co_nm ? ` ${o.ownr_co_num}` : ""
|
||||
}| ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
|
||||
o.v_model_desc || ""
|
||||
|
||||
Reference in New Issue
Block a user