(occurrence2)
| 18945 | } |
| 18946 | }; |
| 18947 | const handleFollowing = function(occurrence2) { |
| 18948 | let initialOccurrence = scheduler2._lame_clone(occurrence2); |
| 18949 | if (tempEndDate && tempStartDate) { |
| 18950 | occurrence2._start_date = occurrence2.start_date; |
| 18951 | occurrence2.start_date = tempStartDate; |
| 18952 | occurrence2.end_date = tempEndDate; |
| 18953 | } |
| 18954 | if (scheduler2._isFirstOccurrence(initialOccurrence) || scheduler2._isExceptionFirstOccurrence(initialOccurrence)) { |
| 18955 | if (scheduler2._isExceptionFirstOccurrence(initialOccurrence)) { |
| 18956 | deleteExceptionFromStorage(initialOccurrence); |
| 18957 | } |
| 18958 | tempEvent._start_date = event2.start_date; |
| 18959 | tempEvent.start_date = occurrence2.start_date; |
| 18960 | tempEvent.duration = (+occurrence2.end_date - +occurrence2.start_date) / 1e3; |
| 18961 | tempEvent._beforeEventChangedFlag = occurrence2._beforeEventChangedFlag; |
| 18962 | if (tempEvent.rrule) { |
| 18963 | updateFollowingRRULE(tempEvent.id, tempEvent); |
| 18964 | } |
| 18965 | if (!scheduler2.config.collision_limit || scheduler2.checkCollision(tempEvent)) { |
| 18966 | for (const i in scheduler2._events) { |
| 18967 | let tev = scheduler2._events[i]; |
| 18968 | if (tev.id == tempEvent.id) { |
| 18969 | scheduler2._events[i] = { ...tempEvent }; |
| 18970 | scheduler2.callEvent("onEventChanged", [scheduler2._events[i].id, scheduler2._events[i]]); |
| 18971 | } |
| 18972 | } |
| 18973 | } |
| 18974 | } else { |
| 18975 | tempEvent._end_date = event2.end_date; |
| 18976 | const originalStart = occurrence2.original_start || scheduler2.date.date_part(new Date(occurrence2._start_date)); |
| 18977 | tempEvent._shorten_end_date = new Date(originalStart.valueOf() - 1e3); |
| 18978 | tempEvent.end_date = occurrence2.end_date; |
| 18979 | tempEvent._start_date = event2.start_date; |
| 18980 | tempEvent.start_date = occurrence2.start_date; |
| 18981 | tempEvent._thisAndFollowing = occurrence2.id; |
| 18982 | if (tempEvent.rrule) { |
| 18983 | updateFollowingRRULE(tempEvent.id, tempEvent); |
| 18984 | } |
| 18985 | let tempEnd = tempEvent.end_date; |
| 18986 | tempEvent.end_date = tempEvent._end_date; |
| 18987 | if (!scheduler2.config.collision_limit || scheduler2.checkCollision(tempEvent)) { |
| 18988 | tempEvent.end_date = tempEnd; |
| 18989 | for (const i in scheduler2._events) { |
| 18990 | let tev = scheduler2._events[i]; |
| 18991 | if (tev.id == tempEvent.id) { |
| 18992 | scheduler2._events[i] = { ...tempEvent }; |
| 18993 | scheduler2.callEvent("onRecurringEventSave", [scheduler2._events[i].id, scheduler2._events[i], scheduler2._new_event]); |
| 18994 | scheduler2.callEvent("onEventChanged", [scheduler2._events[i].id, scheduler2._events[i]]); |
| 18995 | } |
| 18996 | } |
| 18997 | } |
| 18998 | } |
| 18999 | }; |
| 19000 | const handleAllEvents = function(occurrence2) { |
| 19001 | let initialOccurrence = scheduler2._lame_clone(occurrence2); |
| 19002 | if (scheduler2._isExceptionFirstOccurrence(initialOccurrence)) { |
no test coverage detected