@timardex/cluemart-server-shared 2.1.11 → 2.2.0

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.
@@ -3145,6 +3145,10 @@ async function persistArchivedEventDates(eventId, slots) {
3145
3145
  // src/service/event/updateAllEventDateTimeStatuses.ts
3146
3146
  import_dayjs2.default.extend(import_customParseFormat.default);
3147
3147
  import_dayjs2.default.extend(import_isoWeek.default);
3148
+ var MANUAL_DATE_STATUSES = /* @__PURE__ */ new Set([
3149
+ import_cluemart_shared26.EnumEventDateStatus.CANCELED,
3150
+ import_cluemart_shared26.EnumEventDateStatus.RE_SCHEDULED
3151
+ ]);
3148
3152
  function getFutureEventStatus(startDateTime, now) {
3149
3153
  const hoursUntilStart = startDateTime.diff(now, "hour", true);
3150
3154
  if (hoursUntilStart > 0 && hoursUntilStart <= 4) {
@@ -3165,6 +3169,9 @@ function getFutureEventStatus(startDateTime, now) {
3165
3169
  return import_cluemart_shared26.EnumEventDateStatus.UPCOMING;
3166
3170
  }
3167
3171
  function updateSingleDateTimeStatus(dateTime, now = (0, import_dayjs2.default)()) {
3172
+ if (MANUAL_DATE_STATUSES.has(dateTime.dateStatus)) {
3173
+ return dateTime;
3174
+ }
3168
3175
  const dateTimeFormat = `${import_cluemart_shared26.dateFormat} ${import_cluemart_shared26.timeFormat}`;
3169
3176
  const startDateTime = (0, import_dayjs2.default)(
3170
3177
  `${dateTime.startDate} ${dateTime.startTime}`,