From 4db5df2bf773a8b39ca02b2d1c0c6d1b492d9f7a Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 24 Mar 2021 17:03:49 -0700 Subject: [PATCH] IO-808 Add claim and balance to payment modal --- .../job-search-select.component.jsx | 20 +++++---- .../payment-form/payment-form.component.jsx | 13 +++++- .../payment-form.totalpayments.component.jsx | 43 +++++++++++++++++++ client/src/graphql/jobs.queries.js | 4 +- client/src/graphql/payments.queries.js | 14 ++++++ 5 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 client/src/components/payment-form/payment-form.totalpayments.component.jsx diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx index dcf32f722..614e0a060 100644 --- a/client/src/components/job-search-select/job-search-select.component.jsx +++ b/client/src/components/job-search-select/job-search-select.component.jsx @@ -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 (
@@ -93,9 +97,9 @@ const JobSearchSelect = ( {theOptions ? theOptions.map((o) => (