Fix resizing repeat events non-first occurrence.

This commit is contained in:
Leo Vasanko 2025-08-25 21:16:42 -06:00
parent e15f4aadca
commit 467a984955
2 changed files with 14 additions and 1 deletions

View File

@ -299,6 +299,19 @@ function onDragPointerMove(e) {
ns,
ne,
)
} else if (st.isVirtual && (st.mode === 'resize-left' || st.mode === 'resize-right')) {
// For virtual occurrence resize: convert to real once, then adjust range
if (!st.realizedId) {
const newId = store.splitMoveVirtualOccurrence(st.id, st.startDate, st.startDate, st.endDate)
if (newId) {
st.realizedId = newId
st.id = newId
st.isVirtual = false
} else return
}
// Apply range change; rotate if left edge moved and weekday changed
const rotate = st.mode === 'resize-left'
store.setEventRange(st.id, ns, ne, { mode: st.mode, rotatePattern: rotate })
}
}

View File

@ -286,8 +286,8 @@ export const useCalendarStore = defineStore('calendar', {
DEFAULT_TZ,
)
if (
mode === 'move' &&
rotatePattern &&
(mode === 'move' || mode === 'resize-left') &&
snapshot.isRepeating &&
snapshot.repeat === 'weeks' &&
Array.isArray(snapshot.repeatWeekdays)