mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
@using Radzen.Blazor
|
|
@using Radzen.Blazor.Rendering
|
|
|
|
@inherits SchedulerYearViewBase
|
|
|
|
@code {
|
|
public override RenderFragment Render()
|
|
{
|
|
var appointments = Scheduler?.GetAppointmentsInRange(StartDate, EndDate) ?? Enumerable.Empty<AppointmentData>();
|
|
|
|
var maxAppointmentsInSlot = 0;
|
|
|
|
if (MaxAppointmentsInSlot != null)
|
|
{
|
|
maxAppointmentsInSlot = MaxAppointmentsInSlot.Value;
|
|
}
|
|
else
|
|
{
|
|
var slotHeight = 100.0;
|
|
maxAppointmentsInSlot = Convert.ToInt32(Math.Floor(slotHeight / 24)) - 1;
|
|
}
|
|
|
|
return @<CascadingValue Value=@Scheduler>
|
|
<YearTimelineView StartDate=@StartDate
|
|
EndDate=@EndDate
|
|
StartMonth=@StartMonth
|
|
MaxAppointmentsInSlot=@maxAppointmentsInSlot
|
|
MoreText=@MoreText
|
|
Appointments=@appointments
|
|
AppointmentMove=OnAppointmentMove />
|
|
</CascadingValue>;
|
|
}
|
|
} |