@timardex/cluemart-shared 1.7.84 → 1.7.86

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.
@@ -7,7 +7,7 @@ import {
7
7
  SCHOOL_MIN_STUDENT_COUNT,
8
8
  isValidIrdNumber,
9
9
  normalizeUrl
10
- } from "../chunk-5RXL62LO.mjs";
10
+ } from "../chunk-RCARDOVS.mjs";
11
11
  import {
12
12
  dateFormat,
13
13
  timeFormat
@@ -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
@@ -1743,11 +1743,9 @@ function getEventScheduleStatusLabel(dateTime, onlyShowKnownStatuses) {
1743
1743
  return isKnownStatus ? status.replaceAll("_", " ").toLowerCase() : `Next event date: ${formatDate(dateTime.startDate, "date")}`;
1744
1744
  }
1745
1745
  function shouldShowEventActionsWithWeather(resourceType, dateTime, location) {
1746
- return resourceType === "event" /* EVENT */ && Boolean(location) && Boolean(dateTime?.dateStatus) && ![
1747
- "Ended" /* ENDED */,
1748
- "Canceled" /* CANCELED */,
1749
- "Started" /* STARTED */
1750
- ].includes(dateTime.dateStatus);
1746
+ return resourceType === "event" /* EVENT */ && Boolean(location) && Boolean(dateTime?.dateStatus) && !["Ended" /* ENDED */, "Canceled" /* CANCELED */].includes(
1747
+ dateTime.dateStatus
1748
+ );
1751
1749
  }
1752
1750
 
1753
1751
  // src/formFields/categories/clothingAndFashion.ts
@@ -6546,7 +6544,14 @@ var useCreateVendor = () => {
6546
6544
  var useUpdateVendor = () => {
6547
6545
  const [updateVendor, { loading, error }] = (0, import_client39.useMutation)(UPDATE_VENDOR_MUTATION, {
6548
6546
  awaitRefetchQueries: true,
6549
- refetchQueries: [{ query: GET_USER_VENDORS }]
6547
+ refetchQueries: (mutationResult) => {
6548
+ const vendorId = mutationResult?.data?.updateVendor?.data?._id;
6549
+ if (!vendorId) return [];
6550
+ return [
6551
+ { query: GET_USER_VENDORS },
6552
+ { query: GET_VENDOR, variables: { _id: vendorId } }
6553
+ ];
6554
+ }
6550
6555
  });
6551
6556
  return { error, loading, updateVendor };
6552
6557
  };
@@ -7555,7 +7560,14 @@ var useCreatePartner = () => {
7555
7560
  var useUpdatePartner = () => {
7556
7561
  const [updatePartner, { loading, error }] = (0, import_client57.useMutation)(UPDATE_PARTNER_MUTATION, {
7557
7562
  awaitRefetchQueries: true,
7558
- refetchQueries: [{ query: GET_USER_PARTNERS }]
7563
+ refetchQueries: (mutationResult) => {
7564
+ const partnerId = mutationResult?.data?.updatePartner?.data?._id;
7565
+ if (!partnerId) return [];
7566
+ return [
7567
+ { query: GET_USER_PARTNERS },
7568
+ { query: GET_PARTNER, variables: { _id: partnerId } }
7569
+ ];
7570
+ }
7559
7571
  });
7560
7572
  return { error, loading, updatePartner };
7561
7573
  };