adding dialog to calendar
Some checks failed
ci / build-Docker (push) Has been cancelled
ci / build (8.0.x) (push) Has been cancelled

This commit is contained in:
Andy Pack 2024-06-10 22:46:17 +01:00
parent 1d36c8d165
commit a970012209
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
3 changed files with 51 additions and 19 deletions

View File

@ -0,0 +1,47 @@
@using Overflow.SouthernWater
@rendermode RenderMode.InteractiveAuto
<RadzenStack>
<RadzenStack Gap="0">
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-2 rz-my-0">Bathing Site</RadzenText>
<RadzenText TextStyle="TextStyle.Body1"><b>@Spill.bathingSite</b></RadzenText>
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-4 rz-mb-0">Outfall</RadzenText>
<RadzenText TextStyle="TextStyle.Body1"><b>@Spill.outfallName</b></RadzenText>
</RadzenStack>
<RadzenStack Gap="0">
<RadzenText TextStyle="TextStyle.Overline">Status: </RadzenText>
<RadzenStack Orientation="Orientation.Horizontal">
<RadzenText TextStyle="TextStyle.Body1"><b>@Spill.status</b></RadzenText>
@if (Spill.status == "Genuine")
{
<RadzenIcon Icon="verified" />
}
</RadzenStack>
<RadzenText TextStyle="TextStyle.Overline">Is Impacting</RadzenText>
<RadzenStack Orientation="Orientation.Horizontal">
@if (Spill.isImpacting)
{
<RadzenIcon Icon="check_circle" />
}
else
{
<RadzenIcon Icon="cancel" />
}
</RadzenStack>
</RadzenStack>
<RadzenStack Gap="0">
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-2 rz-my-0">Start</RadzenText>
<RadzenText TextStyle="TextStyle.Body1"><b>@Spill.eventStart.ToLongDateString()</b> @Spill.eventStart.ToLongTimeString()</RadzenText>
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-4 rz-mb-0">End</RadzenText>
<RadzenText TextStyle="TextStyle.Body1"><b>@Spill.eventStop.ToLongDateString()</b> @Spill.eventStop.ToLongTimeString()</RadzenText>
<RadzenStack Orientation="Orientation.Vertical">
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-4 rz-mb-0">Duration</RadzenText>
<RadzenText TextStyle="TextStyle.Body1">@TimeSpan.FromMinutes(Spill.duration).ToString()</RadzenText>
</RadzenStack>
</RadzenStack>
</RadzenStack>
@code {
[Parameter] public Spill Spill { get; set; }
}

View File

@ -75,24 +75,9 @@ else
async Task OnAppointmentSelect(SchedulerAppointmentSelectEventArgs<Spill> args)
{
// var copy = new Appointment
// {
// Start = args.Data.Start,
// End = args.Data.End,
// Text = args.Data.Text
// };
//
// var data = await DialogService.OpenAsync<EditAppointmentPage>("Edit Appointment", new Dictionary<string, object> { { "Appointment", copy } });
//
// if (data != null)
// {
// // Update the appointment
// args.Data.Start = data.Start;
// args.Data.End = data.End;
// args.Data.Text = data.Text;
// }
//
// await scheduler.Reload();
_ = await DialogService.OpenAsync<SpillViewDialog>("View Spill", new Dictionary<string, object> { { "Spill", args.Data } });
await scheduler.Reload();
}
void OnAppointmentRender(SchedulerAppointmentRenderEventArgs<Spill> args)

View File

@ -16,4 +16,4 @@
<a class="dismiss">🗙</a>
</div>
<RadzenComponents/>
<RadzenComponents @rendermode="InteractiveServer"/>