73 lines
2.1 KiB
Plaintext
73 lines
2.1 KiB
Plaintext
@namespace WebApp.Components.Features.Calendar
|
|
@using Core.Entities
|
|
|
|
<MudDialog>
|
|
<DialogContent>
|
|
@if (EventOccurrence == null)
|
|
{
|
|
<MudAlert Severity="Severity.Warning">
|
|
Event details are unavailable.
|
|
</MudAlert>
|
|
}
|
|
else
|
|
{
|
|
<MudStack Spacing="2">
|
|
<MudText Typo="Typo.h6">
|
|
@(EventDefinition?.Name ?? EventOccurrence.Name)
|
|
</MudText>
|
|
|
|
<MudDivider />
|
|
|
|
<MudText Typo="Typo.body1">
|
|
<strong>Occurrence:</strong> @EventOccurrence.Name
|
|
</MudText>
|
|
<MudText Typo="Typo.body1">
|
|
<strong>Start:</strong> @EventOccurrence.StartTime.ToString("f")
|
|
</MudText>
|
|
@if (EventOccurrence.EndTime != null)
|
|
{
|
|
<MudText Typo="Typo.body1">
|
|
<strong>End:</strong> @EventOccurrence.EndTime.Value.ToString("f")
|
|
</MudText>
|
|
}
|
|
@if (!string.IsNullOrWhiteSpace(EventOccurrence.Location))
|
|
{
|
|
<MudText Typo="Typo.body1">
|
|
<strong>Location:</strong> @EventOccurrence.Location
|
|
</MudText>
|
|
}
|
|
@if (StudentFirstNames.Any())
|
|
{
|
|
<MudText Typo="Typo.body1">
|
|
<strong>Students:</strong> @string.Join(", ", StudentFirstNames)
|
|
</MudText>
|
|
}
|
|
</MudStack>
|
|
}
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<MudSpacer />
|
|
<MudButton OnClick="Close">Close</MudButton>
|
|
</DialogActions>
|
|
</MudDialog>
|
|
|
|
@code {
|
|
[CascadingParameter]
|
|
public IMudDialogInstance MudDialog { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventOccurrence? EventOccurrence { get; set; }
|
|
|
|
[Parameter]
|
|
public EventDefinition? EventDefinition { get; set; }
|
|
|
|
[Parameter]
|
|
public List<string> StudentFirstNames { get; set; } = [];
|
|
|
|
private void Close()
|
|
{
|
|
MudDialog.Close();
|
|
}
|
|
}
|
|
|