IO-966 Vendor save & favorite fixes.
This commit is contained in:
@@ -20,7 +20,10 @@ const VendorSearchSelect = (
|
|||||||
const favorites =
|
const favorites =
|
||||||
preferredMake && options
|
preferredMake && options
|
||||||
? options.filter(
|
? options.filter(
|
||||||
(o) => o.favorite.filter((f) => f === preferredMake).length > 0
|
(o) =>
|
||||||
|
o.favorite.filter(
|
||||||
|
(f) => f.toLowerCase() === preferredMake.toLowerCase()
|
||||||
|
).length > 0
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ function VendorsFormContainer({ refetch, bodyshop }) {
|
|||||||
//It's a vendor to update.
|
//It's a vendor to update.
|
||||||
const result = await updateVendor({
|
const result = await updateVendor({
|
||||||
variables: { id: selectedvendor, vendor: values },
|
variables: { id: selectedvendor, vendor: values },
|
||||||
refetchQueries: ["QUERY_ALL_VENDORS"],
|
refetchQueries: ["QUERY_ALL_VENDORS", "QUERY_VENDOR_BY_ID"],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
|
|||||||
Reference in New Issue
Block a user