Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-01-04 11:13:27 +06:00 committed by GitHub
parent 2aa1ab7fd7
commit 639b4317f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {