|
|
|
@ -1,5 +1,4 @@ |
|
|
|
@using MudBlazor |
|
|
|
@using Volo.Abp.PermissionManagement.Localization |
|
|
|
@using global::MudBlazor |
|
|
|
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase |
|
|
|
|
|
|
|
<MudDialog @bind-IsVisible="@_isVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.ExtraLarge, FullWidth = true })" CloseOnEscapeKey="true"> |
|
|
|
@ -26,10 +25,10 @@ |
|
|
|
<TemplateColumn Title="@L["Actions"]" Sortable="false" Style="width: 150px;"> |
|
|
|
<CellTemplate> |
|
|
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert"> |
|
|
|
<MudMenuItem OnClick="@(() => OpenEditDialogAsync(context))"> |
|
|
|
<MudMenuItem OnClick="@(() => OpenEditDialogAsync(context.Item))"> |
|
|
|
@L["Edit"] |
|
|
|
</MudMenuItem> |
|
|
|
<MudMenuItem OnClick="@(() => DeleteResourcePermissionAsync(context))"> |
|
|
|
<MudMenuItem OnClick="@(() => DeleteResourcePermissionAsync(context.Item))"> |
|
|
|
@L["Delete"] |
|
|
|
</MudMenuItem> |
|
|
|
</MudMenu> |
|
|
|
@ -37,17 +36,17 @@ |
|
|
|
</TemplateColumn> |
|
|
|
<PropertyColumn Property="x => x.ProviderName" Title="@L["ResourcePermissionTarget"]" Sortable="false"> |
|
|
|
<CellTemplate> |
|
|
|
<MudTooltip Text="@context.ProviderNameDisplayName"> |
|
|
|
<MudTooltip Text="@context.Item.ProviderNameDisplayName"> |
|
|
|
<MudChip Size="Size.Small" Color="Color.Default" Class="me-1 mb-1"> |
|
|
|
@context.ProviderName |
|
|
|
@context.Item.ProviderName |
|
|
|
</MudChip> |
|
|
|
</MudTooltip> |
|
|
|
@context.ProviderDisplayName |
|
|
|
@context.Item.ProviderDisplayName |
|
|
|
</CellTemplate> |
|
|
|
</PropertyColumn> |
|
|
|
<TemplateColumn Title="@L["ResourcePermissionPermissions"]" Sortable="false"> |
|
|
|
<CellTemplate> |
|
|
|
@foreach (var permission in context.Permissions) |
|
|
|
@foreach (var permission in context.Item.Permissions) |
|
|
|
{ |
|
|
|
<MudChip Size="Size.Small" Color="Color.Default" Class="me-1 mb-1"> |
|
|
|
@permission.DisplayName |
|
|
|
@ -93,7 +92,7 @@ |
|
|
|
<MudRadioGroup T="string" SelectedOption="@CurrentLookupService" SelectedOptionChanged="@OnLookupServiceCheckedValueChanged"> |
|
|
|
@foreach (var keyLookupService in ResourceProviderKeyLookupServices) |
|
|
|
{ |
|
|
|
<MudRadio Option="@keyLookupService.Name">@keyLookupService.DisplayName</MudRadio> |
|
|
|
<MudRadio T="string" Option="@keyLookupService.Name">@keyLookupService.DisplayName</MudRadio> |
|
|
|
} |
|
|
|
</MudRadioGroup> |
|
|
|
<MudAutocomplete T="SearchProviderKeyInfo" |
|
|
|
@ -107,13 +106,13 @@ |
|
|
|
RequiredError="@L["ThisFieldIsRequired"]" |
|
|
|
Class="mt-2" /> |
|
|
|
<MudText Typo="Typo.subtitle1" Class="mb-2 mt-4">@L["ResourcePermissionPermissions"]</MudText> |
|
|
|
<MudSwitch @bind-Checked="@_grantAllCreate" |
|
|
|
CheckedChanged="@(async (b) => await GrantAllCreateAsync(b))" |
|
|
|
<MudSwitch T="bool" Checked="@_grantAllCreate" |
|
|
|
CheckedChanged="@(async (bool b) => await GrantAllCreateAsync(b))" |
|
|
|
Label="@L["GrantAllResourcePermissions"]" /> |
|
|
|
<div class="mt-2"> |
|
|
|
@foreach (var permission in CreateEntity.Permissions) |
|
|
|
{ |
|
|
|
<MudCheckBox @bind-Checked="@permission.IsGranted" |
|
|
|
<MudCheckBox T="bool" @bind-Checked="@permission.IsGranted" |
|
|
|
Label="@permission.DisplayName" /> |
|
|
|
} |
|
|
|
</div> |
|
|
|
@ -136,13 +135,13 @@ |
|
|
|
<DialogContent> |
|
|
|
<MudForm @ref="@_editFormRef" Model="@EditEntity"> |
|
|
|
<MudText Typo="Typo.subtitle1" Class="mb-2">@L["ResourcePermissionPermissions"]</MudText> |
|
|
|
<MudSwitch @bind-Checked="@_grantAllEdit" |
|
|
|
CheckedChanged="@(async (b) => await GrantAllEditAsync(b))" |
|
|
|
<MudSwitch T="bool" Checked="@_grantAllEdit" |
|
|
|
CheckedChanged="@(async (bool b) => await GrantAllEditAsync(b))" |
|
|
|
Label="@L["GrantAllResourcePermissions"]" /> |
|
|
|
<div class="mt-2"> |
|
|
|
@foreach (var permission in EditEntity.Permissions) |
|
|
|
{ |
|
|
|
<MudCheckBox @bind-Checked="@permission.IsGranted" |
|
|
|
<MudCheckBox T="bool" @bind-Checked="@permission.IsGranted" |
|
|
|
Label="@permission.DisplayName" /> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|