From 639b4317f903cc3fb166d260e2ba50b7b35cce4d Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Thu, 4 Jan 2024 11:13:27 +0600 Subject: [PATCH] UBER-1156 (#4292) Signed-off-by: Denis Bykhov --- plugins/calendar-resources/src/components/DayCalendar.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/calendar-resources/src/components/DayCalendar.svelte b/plugins/calendar-resources/src/components/DayCalendar.svelte index 40cd5ef6a4..2ce1aa3503 100644 --- a/plugins/calendar-resources/src/components/DayCalendar.svelte +++ b/plugins/calendar-resources/src/components/DayCalendar.svelte @@ -276,13 +276,14 @@ } const prepareAllDays = () => { alldays = calendarEvents.filter((ev) => ev.allDay) + shortAlldays = [] adRows = [] for (let i = 0; i < displayedDaysCount; i++) alldaysGrid[i] = { alldays: [null] } adMaxRow = 1 alldays .filter((event) => event.day === -1) .forEach((event) => { - const days = newEvents + const days = calendarEvents .filter((ev) => ev.allDay && ev.day !== -1 && event._id === ev._id) .map((ev) => { return ev.day @@ -307,7 +308,7 @@ for (let r = 0; r < shown; r++) { const lastRow = r === shown - 1 for (let d = 0; d < displayedDaysCount; d++) { - if (r < shown - 1 && tempEventID !== alldaysGrid[d].alldays[r] && alldaysGrid[d].alldays[r] !== null) { + if (!lastRow && tempEventID !== alldaysGrid[d].alldays[r] && alldaysGrid[d].alldays[r] !== null) { tempEventID = alldaysGrid[d].alldays[r] ?? '' if (tempEventID !== '') shortAlldays.push({ id: tempEventID, day: d }) } else if (lastRow) {