[#408] added ordering priority to personnal event (#413)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-12-12 17:58:48 +01:00
committed by GitHub
parent 22d674c6b5
commit 1de59f3794
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -685,6 +685,9 @@ export default function CalendarApp({
filteredTempEvents,
userId
)}
eventOrder={(a: any, b: any) =>
a.extendedProps.priority - b.extendedProps.priority
}
weekNumbers={
currentView === "timeGridWeek" || currentView === "timeGridDay"
}
@@ -102,12 +102,14 @@ export const eventToFullCalendarFormat = (
.map((e) => {
const eventTimezone = e.timezone || "Etc/UTC";
const isAllDay = e.allday ?? false;
const isPersonnalEvent = e.calId.split("/")[0] === userId;
const convertedEvent: any = {
...e,
title: formatEventChipTitle(e, t),
colors: e.color,
editable: e.calId.split("/")[0] === userId,
editable: isPersonnalEvent,
priority: isPersonnalEvent ? 1 : 0,
};
if (!isAllDay && e.start && eventTimezone) {