diff --git a/src/components/Calendar/EventPopover.tsx b/src/components/Calendar/EventPopover.tsx index 8759ed5b..8eb03383 100644 --- a/src/components/Calendar/EventPopover.tsx +++ b/src/components/Calendar/EventPopover.tsx @@ -34,9 +34,7 @@ const ConfirmDeleteEvent: FC<{ event: DisplayCalendarEvent }> = ({ event }) => { 確認刪除 - -

確定要刪除這個事件嗎?

-
+ 確定要刪除這個事件嗎?
@@ -67,7 +65,7 @@ const UpdateRepeatedEventDialog: FC<{ 更新重複事件 -

您要更新所有重複事件還是只更新這個事件?

+ 您要更新所有重複事件還是只更新這個事件?
@@ -103,7 +101,7 @@ const DeleteRepeatedEventDialog: FC<{ 刪除重複事件 -

您要刪除所有重複事件還是只刪除這個事件?

+ 您要刪除所有重複事件還是只刪除這個事件
diff --git a/src/components/Calendar/UpcomingEvents.tsx b/src/components/Calendar/UpcomingEvents.tsx index 6ee5f8da..90bdd01a 100644 --- a/src/components/Calendar/UpcomingEvents.tsx +++ b/src/components/Calendar/UpcomingEvents.tsx @@ -59,7 +59,7 @@ const UpcomingEvents = () => { brightness > 186 ? 0.2 : 0.95, ); return ( - +
{ case UpdateType.THIS: // add this date to excluded dates await eventsCol!.findOne(event.id).update({ - $set: { - actualEnd: getActualEndDate(event), + $set: serializeEvent({ + actualEnd: getDisplayEndDate(event), excludedDates: [ ...(event.excludedDates || []), event.displayStart, ], - }, + }), }); break; case UpdateType.FOLLOWING: //set the repeat end date to the new event start date - const newEvent = { - ...event, + const { displayStart, displayEnd, ...originalEvent } = event; + const newEvent: CalendarEvent = { + ...originalEvent, repeat: { ...event.repeat!, - count: undefined, - date: subDays(event.displayStart, 1), + value: subDays(displayStart, 1).getTime(), }, }; await eventsCol!.findOne(event.id).update({