@page "/registry/common" @using Hcs.WebApp.Components.Dialogs @using Hcs.WebApp.Services @using Microsoft.AspNetCore.Authorization @using System.Security.Claims @inherits SyncedPageBase @attribute [Authorize] @inject RegistryService RegistryService @inject DialogService DialogService Общие справочники подсистемы НСИ @code { protected override Campaign.CampaignType CampaignType => Campaign.CampaignType.ExportCommonRegistryElements_15_7_0_1; protected override bool HasPermission(ClaimsPrincipal user) { return user.IsOperatorOrHigher(); } protected override Task> GetDataAsync() { return RegistryService.GetAllRegistriesAsync(true); } async Task RowExpandAsync(Registry registry) { if (registry.Elements == null) { registry.Elements = await RegistryService.GetRegistryElementsAsync(registry.Id); } } async Task ShowElementAsync(RegistryElement registryElement) { await DialogService.OpenAsync( "Просмотр записи", new Dictionary() { { nameof(ViewRegistryElement.RegistryElement), registryElement } }, new DialogOptions() { Width = "420px", Height = "600px" }); } }