2024-06-09 22:52:09 +01:00
|
|
|
@using System.Globalization
|
|
|
|
@using Overflow.SouthernWater
|
2024-06-09 18:43:32 +01:00
|
|
|
@rendermode RenderMode.InteractiveAuto
|
|
|
|
|
|
|
|
@if (Job == null)
|
|
|
|
{
|
|
|
|
<p>
|
|
|
|
<em>Loading...</em>
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-06-09 22:52:09 +01:00
|
|
|
<RadzenDataGrid @ref="spillsGrid" Data="@Job.Spills" TItem="Spill"
|
2024-06-09 18:43:32 +01:00
|
|
|
AllowFiltering="true"
|
2024-06-09 22:52:09 +01:00
|
|
|
FilterMode="FilterMode.CheckBoxList"
|
2024-06-09 18:43:32 +01:00
|
|
|
AllowColumnResize="true"
|
|
|
|
AllowSorting="true"
|
|
|
|
PageSize="25"
|
|
|
|
AllowPaging="true"
|
|
|
|
ShowPagingSummary="true"
|
2024-06-09 22:52:09 +01:00
|
|
|
AllowColumnPicking="true"
|
|
|
|
AllowColumnReorder="true"
|
2024-06-09 18:43:32 +01:00
|
|
|
>
|
|
|
|
<Columns>
|
2024-06-09 22:52:09 +01:00
|
|
|
<RadzenDataGridColumn Visible="false" TItem="Spill" Property="sw_id" Title="Id"/>
|
|
|
|
<RadzenDataGridColumn Visible="false" TItem="Spill" Property="eventId" Title="Event Id"/>
|
|
|
|
<RadzenDataGridColumn Visible="false" TItem="Spill" Property="siteUnitNumber" Title="Site Unit Number"/>
|
|
|
|
<RadzenDataGridColumn Visible="false" TItem="Spill" Property="associatedSiteId" Title="Associated Site Id"/>
|
|
|
|
<RadzenDataGridColumn Visible="false" TItem="Spill" Property="overFlowSiteId" Title="OverFlow Site Id"/>
|
2024-06-09 18:43:32 +01:00
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="bathingSite" Title="Bathing Site"/>
|
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="outfallName" Title="Outfall"/>
|
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="eventStart" Title="Event Start"/>
|
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="eventStop" Title="Event End"/>
|
2024-06-09 22:52:09 +01:00
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="duration" Title="Duration">
|
|
|
|
<FooterTemplate>
|
|
|
|
Total Duration: <b>@Job.Spills.Select(j => j.duration).Sum().ToString(CultureInfo.CurrentCulture)</b> min
|
|
|
|
</FooterTemplate>
|
|
|
|
</RadzenDataGridColumn>
|
2024-06-09 18:43:32 +01:00
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="status" Title="Status"/>
|
|
|
|
<RadzenDataGridColumn TItem="Spill" Property="isImpacting" Title="Is Impacting"/>
|
|
|
|
</Columns>
|
|
|
|
</RadzenDataGrid>
|
|
|
|
}
|
|
|
|
|
|
|
|
@code {
|
2024-06-09 22:52:09 +01:00
|
|
|
RadzenDataGrid<Spill> spillsGrid;
|
2024-06-09 18:43:32 +01:00
|
|
|
[Parameter] public SouthernWaterApiJob? Job { get; set; }
|
2024-06-10 22:06:16 +01:00
|
|
|
}
|