@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.
package/dist/index.cjs CHANGED
@@ -3236,6 +3236,10 @@ async function persistArchivedEventDates(eventId, slots) {
3236
3236
  // src/service/event/updateAllEventDateTimeStatuses.ts
3237
3237
  import_dayjs2.default.extend(import_customParseFormat.default);
3238
3238
  import_dayjs2.default.extend(import_isoWeek.default);
3239
+ var MANUAL_DATE_STATUSES = /* @__PURE__ */ new Set([
3240
+ import_cluemart_shared26.EnumEventDateStatus.CANCELED,
3241
+ import_cluemart_shared26.EnumEventDateStatus.RE_SCHEDULED
3242
+ ]);
3239
3243
  function getFutureEventStatus(startDateTime, now) {
3240
3244
  const hoursUntilStart = startDateTime.diff(now, "hour", true);
3241
3245
  if (hoursUntilStart > 0 && hoursUntilStart <= 4) {
@@ -3256,6 +3260,9 @@ function getFutureEventStatus(startDateTime, now) {
3256
3260
  return import_cluemart_shared26.EnumEventDateStatus.UPCOMING;
3257
3261
  }
3258
3262
  function updateSingleDateTimeStatus(dateTime, now = (0, import_dayjs2.default)()) {
3263
+ if (MANUAL_DATE_STATUSES.has(dateTime.dateStatus)) {
3264
+ return dateTime;
3265
+ }
3259
3266
  const dateTimeFormat = `${import_cluemart_shared26.dateFormat} ${import_cluemart_shared26.timeFormat}`;
3260
3267
  const startDateTime = (0, import_dayjs2.default)(
3261
3268
  `${dateTime.startDate} ${dateTime.startTime}`,