Skip to content

Commit

Permalink
Merge pull request #317 from neozhu/navigation
Browse files Browse the repository at this point in the history
fixed bug
  • Loading branch information
neozhu authored Mar 5, 2023
2 parents 796b6c0 + ec11d5a commit 53e12ae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Blazor.Server.UI/Pages/Identity/Roles/Roles.razor
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@
string deleteContent = ConstantString.DELETECONFIRMATION;
var parameters = new DialogParameters
{
{ nameof(DeleteConfirmation.ContentText), string.Format(deleteContent, _selectItems.Count) }
{ nameof(ConfirmationDialog.ContentText), string.Format(deleteContent, _selectItems.Count) }
};
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall, FullWidth = true, DisableBackdropClick = true };
var dialog = DialogService.Show<DeleteConfirmation>(ConstantString.DELETECONFIRMATIONTITLE, parameters, options);
var dialog = DialogService.Show<ConfirmationDialog>(ConstantString.DELETECONFIRMATIONTITLE, parameters, options);
var result = await dialog.Result;
if (!result.Canceled)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</MudForm>
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">@L["Cancel"]</MudButton>
<MudButton Color="Color.Primary" OnClick="Submit">@L["Ok"]</MudButton>
<MudButton OnClick="Cancel">@ConstantString.CANCEL</MudButton>
<MudButton Color="Color.Primary" OnClick="Submit">@ConstantString.OK</MudButton>
</DialogActions>
</MudDialog>

Expand Down
10 changes: 9 additions & 1 deletion src/Blazor.Server.UI/Pages/Identity/Users/_UserForm.razor
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
Text="@model.TenantName"
Required="true"
RequiredError="@L["Tenant is required."]"
@bind-Value="@model.TenantId">
Value="@model.TenantId"
ValueChanged="TenantSelectChanged">
@foreach (var item in _tenantsService.DataSource)
{
<MudSelectItem T="string" Value="@item.Id">@item.Name</MudSelectItem>
Expand Down Expand Up @@ -158,6 +159,13 @@
}

}
private Task TenantSelectChanged(string id)
{
var tenant = _tenantsService.DataSource.Find(x=>x.Id==id);
model.TenantId = tenant?.Id;
model.TenantName = tenant?.Name;
return Task.CompletedTask;
}

private async Task UploadPhoto(InputFileChangeEventArgs e)
{
Expand Down

0 comments on commit 53e12ae

Please sign in to comment.