UBERF-7721: fixed event display (#6175)

Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
Alexander Platov 2024-07-30 08:49:02 +03:00 committed by Andrey Sobolev
parent dd41e487d2
commit ae05866347
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

View File

@ -35,8 +35,8 @@
return new Date(date).setHours(0, 0, 0, 0)
}
function getTo (date: Date): Timestamp {
return new Date(date).setDate(date.getDate() + 3)
function getTo (date: Date, days: number = 3): Timestamp {
return new Date(date).setDate(date.getDate() + days)
}
let dayCalendar: DayCalendar
@ -58,7 +58,7 @@
})
$: from = getFrom(currentDate)
$: to = getTo(currentDate)
$: to = getTo(currentDate, displayedDaysCount)
function update (calendars: Calendar[]): void {
q.query<Event>(
@ -220,7 +220,7 @@
<DayCalendar
bind:this={dayCalendar}
events={objects}
{displayedDaysCount}
bind:displayedDaysCount
startFromWeekStart={false}
clearCells={dragItem !== null}
{dragItemId}