@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/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -6546,7 +6546,14 @@ var useCreateVendor = () => {
|
|
|
6546
6546
|
var useUpdateVendor = () => {
|
|
6547
6547
|
const [updateVendor, { loading, error }] = (0, import_client39.useMutation)(UPDATE_VENDOR_MUTATION, {
|
|
6548
6548
|
awaitRefetchQueries: true,
|
|
6549
|
-
refetchQueries:
|
|
6549
|
+
refetchQueries: (mutationResult) => {
|
|
6550
|
+
const vendorId = mutationResult?.data?.updateVendor?.data?._id;
|
|
6551
|
+
if (!vendorId) return [];
|
|
6552
|
+
return [
|
|
6553
|
+
{ query: GET_USER_VENDORS },
|
|
6554
|
+
{ query: GET_VENDOR, variables: { _id: vendorId } }
|
|
6555
|
+
];
|
|
6556
|
+
}
|
|
6550
6557
|
});
|
|
6551
6558
|
return { error, loading, updateVendor };
|
|
6552
6559
|
};
|
|
@@ -7555,7 +7562,14 @@ var useCreatePartner = () => {
|
|
|
7555
7562
|
var useUpdatePartner = () => {
|
|
7556
7563
|
const [updatePartner, { loading, error }] = (0, import_client57.useMutation)(UPDATE_PARTNER_MUTATION, {
|
|
7557
7564
|
awaitRefetchQueries: true,
|
|
7558
|
-
refetchQueries:
|
|
7565
|
+
refetchQueries: (mutationResult) => {
|
|
7566
|
+
const partnerId = mutationResult?.data?.updatePartner?.data?._id;
|
|
7567
|
+
if (!partnerId) return [];
|
|
7568
|
+
return [
|
|
7569
|
+
{ query: GET_USER_PARTNERS },
|
|
7570
|
+
{ query: GET_PARTNER, variables: { _id: partnerId } }
|
|
7571
|
+
];
|
|
7572
|
+
}
|
|
7559
7573
|
});
|
|
7560
7574
|
return { error, loading, updatePartner };
|
|
7561
7575
|
};
|