[#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
+3 -12
View File
@@ -27,6 +27,7 @@ import {
combineMasterDateWithFormTime,
detectRecurringEventChanges,
} from "./eventUtils";
import { updateTempCalendar } from "../../components/Calendar/utils/calendarUtils";
const showErrorNotification = (message: string) => {
console.error(`[ERROR] ${message}`);
@@ -478,12 +479,7 @@ function EventUpdateModal({
}
if (tempList) {
const calendarRange = getCalendarRange(new Date(start));
refreshCalendars(
dispatch,
Object.values(tempList),
calendarRange,
"temp"
);
await updateTempCalendar(tempList, event, dispatch, calendarRange);
}
return;
}
@@ -658,12 +654,7 @@ function EventUpdateModal({
}
if (tempList) {
const calendarRange = getCalendarRange(new Date(start));
refreshCalendars(
dispatch,
Object.values(tempList),
calendarRange,
"temp"
);
await updateTempCalendar(tempList, event, dispatch, calendarRange);
}
};