@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 +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/dist/service/index.cjs +7 -0
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +4 -2
- package/dist/service/index.d.ts +4 -2
- package/dist/service/index.mjs +7 -0
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/service/index.cjs
CHANGED
|
@@ -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}`,
|