[#168] changed temp calendar reload to reload only thoses that are impacted

This commit is contained in:
Camille Moussu
2025-10-16 09:46:47 +02:00
committed by Benoit TELLIER
parent 29f984b347
commit f278caf041
9 changed files with 1119 additions and 67 deletions
+2 -7
View File
@@ -49,7 +49,7 @@ import {
resolveTimezone,
} from "../../components/Calendar/TimezoneSelector";
import { getCalendarRange } from "../../utils/dateUtils";
import { refreshCalendars } from "../../components/Event/utils/eventUtils";
import { updateTempCalendar } from "../../components/Calendar/utils/calendarUtils";
// Helper component for field with label
const FieldWithLabel = React.memo(
@@ -409,12 +409,7 @@ function EventPopover({
);
if (tempList) {
const calendarRange = getCalendarRange(new Date(start));
refreshCalendars(
dispatch,
Object.values(tempList),
calendarRange,
"temp"
);
await updateTempCalendar(tempList, newEvent, dispatch, calendarRange);
}
};