@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.
@@ -44,6 +44,7 @@ __export(service_exports, {
44
44
  createLicenceObject: () => createLicenceObject,
45
45
  dedupeArchivedSlotsByStartDateTime: () => dedupeArchivedSlotsByStartDateTime,
46
46
  didRemoveAnyEventDates: () => didRemoveAnyEventDates,
47
+ didRemoveAnyStartedDates: () => didRemoveAnyStartedDates,
47
48
  downgradeVendorProFeatures: () => downgradeVendorProFeatures,
48
49
  ensureUserLicenseCompliance: () => ensureUserLicenseCompliance,
49
50
  ensureUserLicenseComplianceForUser: () => ensureUserLicenseComplianceForUser,
@@ -3443,6 +3444,16 @@ function didRemoveAnyEventDates(previousDateTime, nextDateTime) {
3443
3444
  )
3444
3445
  );
3445
3446
  }
3447
+ function didRemoveAnyStartedDates(previousDateTime, nextDateTime) {
3448
+ if (!previousDateTime?.length) {
3449
+ return false;
3450
+ }
3451
+ return previousDateTime.some(
3452
+ (prev) => prev.dateStatus === import_cluemart_shared28.EnumEventDateStatus.STARTED && !nextDateTime?.some(
3453
+ (next) => next.startDate === prev.startDate && next.startTime === prev.startTime && next.dateStatus === import_cluemart_shared28.EnumEventDateStatus.STARTED
3454
+ )
3455
+ );
3456
+ }
3446
3457
  function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
3447
3458
  return relationDates.map((relationDate) => {
3448
3459
  const existsInEvent = eventDateTime?.some(
@@ -4571,6 +4582,7 @@ async function remindUsersAboutLicenseExpiration() {
4571
4582
  createLicenceObject,
4572
4583
  dedupeArchivedSlotsByStartDateTime,
4573
4584
  didRemoveAnyEventDates,
4585
+ didRemoveAnyStartedDates,
4574
4586
  downgradeVendorProFeatures,
4575
4587
  ensureUserLicenseCompliance,
4576
4588
  ensureUserLicenseComplianceForUser,