IO-966 Vendor save & favorite fixes.

This commit is contained in:
Patrick Fic
2021-04-29 11:34:38 -07:00
parent 4982e3ce4e
commit f8d517664a
2 changed files with 5 additions and 2 deletions

View File

@@ -20,7 +20,10 @@ const VendorSearchSelect = (
const favorites =
preferredMake && options
? options.filter(
(o) => o.favorite.filter((f) => f === preferredMake).length > 0
(o) =>
o.favorite.filter(
(f) => f.toLowerCase() === preferredMake.toLowerCase()
).length > 0
)
: [];

View File

@@ -70,7 +70,7 @@ function VendorsFormContainer({ refetch, bodyshop }) {
//It's a vendor to update.
const result = await updateVendor({
variables: { id: selectedvendor, vendor: values },
refetchQueries: ["QUERY_ALL_VENDORS"],
refetchQueries: ["QUERY_ALL_VENDORS", "QUERY_VENDOR_BY_ID"],
});
if (!result.errors) {