@timardex/cluemart-server-shared 2.2.22 → 2.2.23

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/index.cjs CHANGED
@@ -89,6 +89,7 @@ __export(index_exports, {
89
89
  dateTimeSchema: () => dateTimeSchema,
90
90
  dedupeArchivedSlotsByStartDateTime: () => dedupeArchivedSlotsByStartDateTime,
91
91
  didRemoveAnyEventDates: () => didRemoveAnyEventDates,
92
+ didRemoveAnyStartedDates: () => didRemoveAnyStartedDates,
92
93
  downgradeVendorProFeatures: () => downgradeVendorProFeatures,
93
94
  ensureUserLicenseCompliance: () => ensureUserLicenseCompliance,
94
95
  ensureUserLicenseComplianceForUser: () => ensureUserLicenseComplianceForUser,
@@ -3536,6 +3537,16 @@ function didRemoveAnyEventDates(previousDateTime, nextDateTime) {
3536
3537
  )
3537
3538
  );
3538
3539
  }
3540
+ function didRemoveAnyStartedDates(previousDateTime, nextDateTime) {
3541
+ if (!previousDateTime?.length) {
3542
+ return false;
3543
+ }
3544
+ return previousDateTime.some(
3545
+ (prev) => prev.dateStatus === import_cluemart_shared28.EnumEventDateStatus.STARTED && !nextDateTime?.some(
3546
+ (next) => next.startDate === prev.startDate && next.startTime === prev.startTime && next.dateStatus === import_cluemart_shared28.EnumEventDateStatus.STARTED
3547
+ )
3548
+ );
3549
+ }
3539
3550
  function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
3540
3551
  return relationDates.map((relationDate) => {
3541
3552
  const existsInEvent = eventDateTime?.some(
@@ -4709,6 +4720,7 @@ async function remindUsersAboutLicenseExpiration() {
4709
4720
  dateTimeSchema,
4710
4721
  dedupeArchivedSlotsByStartDateTime,
4711
4722
  didRemoveAnyEventDates,
4723
+ didRemoveAnyStartedDates,
4712
4724
  downgradeVendorProFeatures,
4713
4725
  ensureUserLicenseCompliance,
4714
4726
  ensureUserLicenseComplianceForUser,