@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.
@@ -23,7 +23,7 @@ import {
23
23
  } from "../chunk-364EX22V.mjs";
24
24
  import "../chunk-RAYUJODN.mjs";
25
25
  import "../chunk-DQ7ZHIXW.mjs";
26
- import "../chunk-BL7UBY4I.mjs";
26
+ import "../chunk-HPHI5IVL.mjs";
27
27
  import "../chunk-MWLKYOBK.mjs";
28
28
  import {
29
29
  EnumEventDateStatus,
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: [{ query: GET_USER_VENDORS }]
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: [{ query: GET_USER_PARTNERS }]
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
  };