@timardex/cluemart-shared 1.7.84 → 1.7.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BL7UBY4I.mjs → chunk-HPHI5IVL.mjs} +17 -3
- package/dist/chunk-HPHI5IVL.mjs.map +1 -0
- package/dist/graphql/index.cjs +16 -2
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BL7UBY4I.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -6049,7 +6049,14 @@ var useCreateVendor = () => {
|
|
|
6049
6049
|
var useUpdateVendor = () => {
|
|
6050
6050
|
const [updateVendor, { loading, error }] = useMutation10(UPDATE_VENDOR_MUTATION, {
|
|
6051
6051
|
awaitRefetchQueries: true,
|
|
6052
|
-
refetchQueries:
|
|
6052
|
+
refetchQueries: (mutationResult) => {
|
|
6053
|
+
const vendorId = mutationResult?.data?.updateVendor?.data?._id;
|
|
6054
|
+
if (!vendorId) return [];
|
|
6055
|
+
return [
|
|
6056
|
+
{ query: GET_USER_VENDORS },
|
|
6057
|
+
{ query: GET_VENDOR, variables: { _id: vendorId } }
|
|
6058
|
+
];
|
|
6059
|
+
}
|
|
6053
6060
|
});
|
|
6054
6061
|
return { error, loading, updateVendor };
|
|
6055
6062
|
};
|
|
@@ -7058,7 +7065,14 @@ var useCreatePartner = () => {
|
|
|
7058
7065
|
var useUpdatePartner = () => {
|
|
7059
7066
|
const [updatePartner, { loading, error }] = useMutation15(UPDATE_PARTNER_MUTATION, {
|
|
7060
7067
|
awaitRefetchQueries: true,
|
|
7061
|
-
refetchQueries:
|
|
7068
|
+
refetchQueries: (mutationResult) => {
|
|
7069
|
+
const partnerId = mutationResult?.data?.updatePartner?.data?._id;
|
|
7070
|
+
if (!partnerId) return [];
|
|
7071
|
+
return [
|
|
7072
|
+
{ query: GET_USER_PARTNERS },
|
|
7073
|
+
{ query: GET_PARTNER, variables: { _id: partnerId } }
|
|
7074
|
+
];
|
|
7075
|
+
}
|
|
7062
7076
|
});
|
|
7063
7077
|
return { error, loading, updatePartner };
|
|
7064
7078
|
};
|