Update houses page
This commit is contained in:
@ -29,23 +29,29 @@
|
|||||||
</RadzenRow>
|
</RadzenRow>
|
||||||
<RadzenRow>
|
<RadzenRow>
|
||||||
<RadzenColumn SizeMD="12">
|
<RadzenColumn SizeMD="12">
|
||||||
<RadzenDataGrid TItem="House" Data="@data" RowExpand="@RowExpandAsync" IsLoading="@(state != SyncedPageState.Idle)" AllowFiltering="true" AllowPaging="true" ShowPagingSummary="true" PageSizeOptions=@(new int[] { 5, 10, 20, 30 }) AllowSorting="true" ExpandMode="DataGridExpandMode.Single">
|
<RadzenDataGrid TItem="House" Data="@data" IsLoading="@(state != SyncedPageState.Idle)" AllowFiltering="true" AllowPaging="true" ShowPagingSummary="true" PageSizeOptions=@(new int[] { 5, 10, 20, 30 }) AllowSorting="true">
|
||||||
@* <Template Context="house">
|
|
||||||
<RadzenDataGrid Data="@registry.Elements" AllowFiltering="true" AllowSorting="true">
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Property="@nameof(RegistryElement.Code)" Title="Код" SortOrder="SortOrder.Ascending" Resizable="false" Width="100px" MaxWidth="100px" />
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.Id)" Title="ID" SortOrder="SortOrder.Descending" Resizable="false" Width="100px" MaxWidth="100px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(RegistryElement.GUID)" Title="Идентификатор" />
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.FiasId)" Title="ID ФИАС" />
|
||||||
<RadzenDataGridColumn Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="70px">
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.HcsId)" Title="ID ГИС ЖКХ" />
|
||||||
<Template Context="registryElement">
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.ThirdPartyId)" Title="ID интеграции" />
|
||||||
<RadzenButton Click="@(() => ShowElementAsync(registryElement))" @onclick:stopPropagation="true" ButtonStyle="ButtonStyle.Primary" Icon="visibility" Size="ButtonSize.Small" />
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.IsMkd)" Title="МКД" Resizable="false" Width="100px" MaxWidth="100px">
|
||||||
|
<Template Context="house">
|
||||||
|
@if (house.IsMkd)
|
||||||
|
{
|
||||||
|
<RadzenIcon Icon="check" />
|
||||||
|
}
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
</Columns>
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.IsZhd)" Title="ЖД" Resizable="false" Width="100px" MaxWidth="100px">
|
||||||
</RadzenDataGrid>
|
<Template Context="house">
|
||||||
</Template> *@
|
@if (house.IsZhd)
|
||||||
<Columns>
|
{
|
||||||
<RadzenDataGridColumn TItem="Registry" Property="@nameof(Registry.Number)" Title="Номер" Resizable="false" Width="100px" MaxWidth="100px" />
|
<RadzenIcon Icon="check" />
|
||||||
<RadzenDataGridColumn TItem="Registry" Property="@nameof(Registry.Name)" Title="Название" />
|
}
|
||||||
|
</Template>
|
||||||
|
</RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn TItem="House" Property="@nameof(House.SyncedAt)" Title="Дата синхронизации" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</RadzenDataGrid>
|
</RadzenDataGrid>
|
||||||
</RadzenColumn>
|
</RadzenColumn>
|
||||||
@ -66,24 +72,4 @@
|
|||||||
{
|
{
|
||||||
return HouseService.GetAllHousesAsync();
|
return HouseService.GetAllHousesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task RowExpandAsync(House house)
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
async Task ShowElementAsync(RegistryElement registryElement)
|
|
||||||
{
|
|
||||||
// await DialogService.OpenAsync<ViewRegistryElement>(
|
|
||||||
// "Просмотр записи",
|
|
||||||
// new Dictionary<string, object>()
|
|
||||||
// {
|
|
||||||
// { nameof(ViewRegistryElement.RegistryElement), registryElement }
|
|
||||||
// },
|
|
||||||
// new DialogOptions()
|
|
||||||
// {
|
|
||||||
// Width = "420px",
|
|
||||||
// Height = "600px"
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,9 +7,11 @@ namespace Hcs.WebApp.Data.Hcs
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public Guid FiasId { get; set; }
|
public Guid? FiasId { get; set; }
|
||||||
|
|
||||||
public int ThirdPartyId { get; set; }
|
public Guid? HcsId { get; set; }
|
||||||
|
|
||||||
|
public string? ThirdPartyId { get; set; }
|
||||||
|
|
||||||
public bool IsMkd { get; set; }
|
public bool IsMkd { get; set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user