Show elements in registry
This commit is contained in:
@ -38,16 +38,23 @@
|
||||
<RadzenAlert Visible="@hasError" AlertStyle="AlertStyle.Danger" Variant="Variant.Flat" Shade="Shade.Lighter" AllowClose="false">
|
||||
@errorMessage
|
||||
</RadzenAlert>
|
||||
<RadzenDataGrid TItem="Registry" Data="@registries" RowSelect="@ViewRegistryAsync" IsLoading="@(state != CommonPageState.Idle)" AllowFiltering="true" AllowPaging="true" ShowPagingSummary="true" PageSizeOptions=@(new int[] { 5, 10, 20, 30 }) AllowSorting="true">
|
||||
<RadzenDataGrid TItem="Registry" Data="@registries" RowExpand="@RowExpandAsync" IsLoading="@(state != CommonPageState.Idle)" AllowFiltering="true" AllowPaging="true" ShowPagingSummary="true" PageSizeOptions=@(new int[] { 5, 10, 20, 30 }) AllowSorting="true" ExpandMode="DataGridExpandMode.Single">
|
||||
<Template Context="registry">
|
||||
<RadzenDataGrid Data="@registry.Elements" AllowFiltering="true" AllowSorting="true">
|
||||
<Columns>
|
||||
<RadzenDataGridColumn Property="Code" Title="Код" SortOrder="SortOrder.Ascending" />
|
||||
<RadzenDataGridColumn Property="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>
|
||||
<RadzenDataGridColumn TItem="Registry" Property="Number" Title="Номер" Resizable="false" Width="100px" MaxWidth="100px" />
|
||||
<RadzenDataGridColumn TItem="Registry" Property="Name" Title="Название" />
|
||||
<RadzenDataGridColumn TItem="Registry" Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="70px">
|
||||
<Template Context="registry">
|
||||
<RadzenButton Click="@(() => EditRegistryAsync(registry))" @onclick:stopPropagation="true" ButtonStyle="ButtonStyle.Primary" Icon="edit" Size="ButtonSize.Small" />
|
||||
<RadzenButton Click="@(() => SyncRegistryAsync(registry))" @onclick:stopPropagation="true" ButtonStyle="ButtonStyle.Primary" Icon="sync" Size="ButtonSize.Small" />
|
||||
</Template>
|
||||
</RadzenDataGridColumn>
|
||||
</Columns>
|
||||
</RadzenDataGrid>
|
||||
</RadzenColumn>
|
||||
@ -117,17 +124,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
async Task ViewRegistryAsync(Registry userWithRole)
|
||||
async Task RowExpandAsync(Registry registry)
|
||||
{
|
||||
// TODO
|
||||
if (registry.Elements == null)
|
||||
{
|
||||
registry.Elements = await RegistryService.GetRegistryElementsAsync(registry.Id);
|
||||
}
|
||||
}
|
||||
|
||||
async Task EditRegistryAsync(Registry registry)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
async Task SyncRegistryAsync(Registry registry)
|
||||
async Task ShowElementAsync(RegistryElement registryElement)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user