2021-07-03 12:19:53 +00:00
|
|
|
@page "/calendars/{calendarId:int}/events/{eventUid}"
|
|
|
|
@inject Data.CalendarService _calendarService
|
|
|
|
|
2021-07-04 11:38:52 +00:00
|
|
|
<a href="/calendars/@CalendarId">
|
|
|
|
<span class="oi oi-arrow-left"></span> Back
|
|
|
|
</a>
|
|
|
|
|
2021-07-03 12:19:53 +00:00
|
|
|
@if (_event == null)
|
|
|
|
{
|
|
|
|
<p>
|
|
|
|
<em>Loading...</em>
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<h1>@_event.Summary</h1>
|
|
|
|
<div>
|
|
|
|
<strong>Start:</strong> @_event.DtStart
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<strong>End:</strong> @_event.DtEnd
|
|
|
|
</div>
|
|
|
|
<p class="event-description">@_event.Description</p>
|
|
|
|
}
|
|
|
|
|
|
|
|
@code
|
|
|
|
{
|
|
|
|
[Parameter]
|
|
|
|
public int CalendarId { get; set; }
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public string EventUid { get; set; }
|
|
|
|
|
|
|
|
private Data.Event _event;
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
{
|
|
|
|
var calendar = await Data.CalendarService.GetCalendarById(CalendarId);
|
|
|
|
_event = await calendar.GetEventByUid(EventUid);
|
|
|
|
}
|
|
|
|
}
|