From 960e16f3f35f8ecb113e5be5d4dc7be88ea139de Mon Sep 17 00:00:00 2001 From: Mark Pittaway Date: Mon, 19 Feb 2024 11:39:41 +1100 Subject: [PATCH] fix merge --- client/utils/events.ts | 40 ------------------------------------- e2e/server/requirements.txt | 2 +- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/client/utils/events.ts b/client/utils/events.ts index 50245ef56..0503a3182 100644 --- a/client/utils/events.ts +++ b/client/utils/events.ts @@ -858,45 +858,6 @@ function getFlattenedEventsByDate(events: Array, startDate: moment.M } -const getStartDate = (event: IEventItem) => ( - event.dates?.all_day ? moment.utc(event.dates.start) : moment(event.dates?.start) -); - -const getEndDate = (event: IEventItem) => ( - (event.dates?.all_day || event.dates?.no_end_time) ? moment.utc(event.dates.end) : moment(event.dates?.end) -); - -const isEventInRange = ( - event: IEventItem, - eventStart: moment.Moment, - eventEnd: moment.Moment, - start: moment.Moment, - end?: moment.Moment, -) => { - let localStart = eventStart; - let localEnd = eventEnd; - let startUnit : moment.unitOfTime.StartOf = 'second'; - let endUnit : moment.unitOfTime.StartOf = 'second'; - - if (event.dates?.all_day) { - // we have only dates in utc - localStart = moment(eventStart.format('YYYY-MM-DD')); - localEnd = moment(eventEnd.format('YYYY-MM-DD')); - startUnit = 'day'; - endUnit = 'day'; - } - - if (event.dates?.no_end_time) { - // we have time for start, but only date for end - localStart = moment(eventStart); - localEnd = moment(eventEnd.format('YYYY-MM-DD')); - endUnit = 'day'; - } - - return localEnd.isSameOrAfter(start, endUnit) && (end == null || localStart.isSameOrBefore(end, startUnit)); -}; - - const getStartDate = (event: IEventItem) => ( event.dates?.all_day ? moment.utc(event.dates.start) : moment(event.dates?.start) ); @@ -1201,7 +1162,6 @@ function defaultEventValues( if (defaultPlaceList) { newEvent.place = defaultPlaceList; } - return newEvent; } diff --git a/e2e/server/requirements.txt b/e2e/server/requirements.txt index 00c14e0dc..1f9fc9a0d 100644 --- a/e2e/server/requirements.txt +++ b/e2e/server/requirements.txt @@ -1,2 +1,2 @@ -r ./core-requirements.txt --e ../../ +-e ../../ \ No newline at end of file