|
|
|
@ -1,9 +1,10 @@ |
|
|
|
@page "/identity/users" |
|
|
|
@attribute [Authorize( IdentityPermissions.Users.Default )] |
|
|
|
@attribute [Authorize(IdentityPermissions.Users.Default)] |
|
|
|
@using Microsoft.AspNetCore.Authorization |
|
|
|
@using Volo.Abp.PermissionManagement.Blazor.Components |
|
|
|
@using Volo.Abp.BlazoriseUI.Components.ObjectExtending |
|
|
|
@using Volo.Abp.Identity.Localization |
|
|
|
@using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Layout |
|
|
|
@inject AbpBlazorMessageLocalizerHelper<IdentityResource> LH |
|
|
|
|
|
|
|
@inherits AbpCrudPageBase<IIdentityUserAppService, IdentityUserDto, Guid, GetIdentityUsersInput, IdentityUserCreateDto, IdentityUserUpdateDto> |
|
|
|
@ -11,20 +12,20 @@ |
|
|
|
<Card> |
|
|
|
<CardHeader> |
|
|
|
@* ************************* PAGE HEADER ************************* *@ |
|
|
|
<Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Layout.PageHeader Title="@L["Users"]" |
|
|
|
BreadcrumbItems="@BreadcrumbItems" |
|
|
|
Toolbar="@Toolbar"> |
|
|
|
</Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Layout.PageHeader> |
|
|
|
<PageHeader Title="@L["Users"]" |
|
|
|
BreadcrumbItems="@BreadcrumbItems" |
|
|
|
Toolbar="@Toolbar"> |
|
|
|
</PageHeader> |
|
|
|
</CardHeader> |
|
|
|
<CardBody> |
|
|
|
@* ************************* DATA GRID ************************* *@ |
|
|
|
<AbpExtensibleDataGrid TItem="IdentityUserDto" |
|
|
|
Data="Entities" |
|
|
|
ReadData="OnDataGridReadAsync" |
|
|
|
TotalItems="TotalCount" |
|
|
|
ShowPager="true" |
|
|
|
PageSize="PageSize" |
|
|
|
Columns="@UserManagementTableColumns"> |
|
|
|
Data="Entities" |
|
|
|
ReadData="OnDataGridReadAsync" |
|
|
|
TotalItems="TotalCount" |
|
|
|
ShowPager="true" |
|
|
|
PageSize="PageSize" |
|
|
|
Columns="@UserManagementTableColumns"> |
|
|
|
</AbpExtensibleDataGrid> |
|
|
|
</CardBody> |
|
|
|
</Card> |
|
|
|
@ -33,12 +34,12 @@ |
|
|
|
@if (HasCreatePermission) |
|
|
|
{ |
|
|
|
<Modal @ref="CreateModal"> |
|
|
|
<ModalBackdrop /> |
|
|
|
<ModalBackdrop/> |
|
|
|
<ModalContent Centered="true"> |
|
|
|
<Form> |
|
|
|
<ModalHeader> |
|
|
|
<ModalTitle>@L["NewUser"]</ModalTitle> |
|
|
|
<CloseButton Clicked="CloseCreateModalAsync" /> |
|
|
|
<CloseButton Clicked="CloseCreateModalAsync"/> |
|
|
|
</ModalHeader> |
|
|
|
<ModalBody> |
|
|
|
<Validations @ref="@CreateValidationsRef" Model="@NewEntity" ValidateOnLoad="false"> |
|
|
|
@ -54,7 +55,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:UserName"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="NewEntity.UserName" Autofocus="true"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -64,7 +65,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Name"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="NewEntity.Name"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -74,7 +75,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Surname"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="NewEntity.Surname"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -84,7 +85,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Password"]</FieldLabel> |
|
|
|
<TextEdit Role="TextRole.Password" @bind-Text="NewEntity.Password"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -94,7 +95,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Email"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="NewEntity.Email"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -104,7 +105,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:PhoneNumber"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="NewEntity.PhoneNumber"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -120,7 +121,7 @@ |
|
|
|
@foreach (var role in NewUserRoles) |
|
|
|
{ |
|
|
|
<Field> |
|
|
|
<input type="hidden" @bind-value="@role.Name" /> |
|
|
|
<input type="hidden" @bind-value="@role.Name"/> |
|
|
|
<Check TValue="bool" @bind-Checked="@role.IsAssigned">@role.Name</Check> |
|
|
|
</Field> |
|
|
|
} |
|
|
|
@ -132,7 +133,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseCreateModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Clicked="@CreateEntityAsync" /> |
|
|
|
<SubmitButton Clicked="@CreateEntityAsync"/> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
@ -143,16 +144,16 @@ |
|
|
|
@if (HasUpdatePermission) |
|
|
|
{ |
|
|
|
<Modal @ref="EditModal"> |
|
|
|
<ModalBackdrop /> |
|
|
|
<ModalBackdrop/> |
|
|
|
<ModalContent Centered="true"> |
|
|
|
<Form> |
|
|
|
<ModalHeader> |
|
|
|
<ModalTitle>@L["Edit"]</ModalTitle> |
|
|
|
<CloseButton Clicked="CloseEditModalAsync" /> |
|
|
|
<CloseButton Clicked="CloseEditModalAsync"/> |
|
|
|
</ModalHeader> |
|
|
|
<ModalBody> |
|
|
|
<Validations @ref="@EditValidationsRef" Model="@EditingEntity" ValidateOnLoad="false"> |
|
|
|
<input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp" /> |
|
|
|
<input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp"/> |
|
|
|
|
|
|
|
<Tabs @bind-SelectedTab="@EditModalSelectedTab"> |
|
|
|
<Items> |
|
|
|
@ -166,7 +167,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:UserName"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="EditingEntity.UserName" Autofocus="true"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -176,7 +177,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Name"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="EditingEntity.Name"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -186,7 +187,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Surname"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="EditingEntity.Surname"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -196,7 +197,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Password"]</FieldLabel> |
|
|
|
<TextEdit Role="TextRole.Password" @bind-Text="EditingEntity.Password"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -206,7 +207,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:Email"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="EditingEntity.Email"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -216,7 +217,7 @@ |
|
|
|
<FieldLabel>@L["DisplayName:PhoneNumber"]</FieldLabel> |
|
|
|
<TextEdit @bind-Text="EditingEntity.PhoneNumber"> |
|
|
|
<Feedback> |
|
|
|
<ValidationError /> |
|
|
|
<ValidationError/> |
|
|
|
</Feedback> |
|
|
|
</TextEdit> |
|
|
|
</Field> |
|
|
|
@ -232,7 +233,7 @@ |
|
|
|
@foreach (var role in EditUserRoles) |
|
|
|
{ |
|
|
|
<Field> |
|
|
|
<input type="hidden" @bind-value="@role.Name" /> |
|
|
|
<input type="hidden" @bind-value="@role.Name"/> |
|
|
|
<Check TValue="bool" @bind-Checked="@role.IsAssigned">@role.Name</Check> |
|
|
|
</Field> |
|
|
|
} |
|
|
|
@ -244,7 +245,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseEditModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Clicked="@UpdateEntityAsync" /> |
|
|
|
<SubmitButton Clicked="@UpdateEntityAsync"/> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
@ -253,5 +254,5 @@ |
|
|
|
|
|
|
|
@if (HasManagePermissionsPermission) |
|
|
|
{ |
|
|
|
<PermissionManagementModal @ref="PermissionManagementModal" /> |
|
|
|
<PermissionManagementModal @ref="PermissionManagementModal"/> |
|
|
|
} |