Update houses page

This commit is contained in:
2025-11-14 16:50:41 +09:00
parent dfbe853918
commit b403d87836
2 changed files with 26 additions and 38 deletions

View File

@ -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>
<RadzenDataGridColumn Property="@nameof(RegistryElement.Code)" Title="Код" SortOrder="SortOrder.Ascending" Resizable="false" Width="100px" MaxWidth="100px" />
<RadzenDataGridColumn Property="@nameof(RegistryElement.GUID)" Title="Идентификатор" />
<RadzenDataGridColumn Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="70px">
<Template Context="registryElement">
<RadzenButton Click="@(() => ShowElementAsync(registryElement))" @onclick:stopPropagation="true" ButtonStyle="ButtonStyle.Primary" Icon="visibility" Size="ButtonSize.Small" />
</Template>
</RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
</Template> *@
<Columns> <Columns>
<RadzenDataGridColumn TItem="Registry" Property="@nameof(Registry.Number)" Title="Номер" 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 TItem="Registry" Property="@nameof(Registry.Name)" Title="Название" /> <RadzenDataGridColumn TItem="House" Property="@nameof(House.FiasId)" Title="ID ФИАС" />
<RadzenDataGridColumn TItem="House" Property="@nameof(House.HcsId)" Title="ID ГИС ЖКХ" />
<RadzenDataGridColumn TItem="House" Property="@nameof(House.ThirdPartyId)" Title="ID интеграции" />
<RadzenDataGridColumn TItem="House" Property="@nameof(House.IsMkd)" Title="МКД" Resizable="false" Width="100px" MaxWidth="100px">
<Template Context="house">
@if (house.IsMkd)
{
<RadzenIcon Icon="check" />
}
</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="House" Property="@nameof(House.IsZhd)" Title="ЖД" Resizable="false" Width="100px" MaxWidth="100px">
<Template Context="house">
@if (house.IsZhd)
{
<RadzenIcon Icon="check" />
}
</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"
// });
}
} }

View File

@ -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; }