Hi,
It seems good, no problem.
Can you share a minimal project that reproduces the problem to make us progress? thanks.
Hi,
We will fix it in : https://github.com/abpframework/abp/pull/12838
For now, you can try put the PermissionManagementModal.cshtml under Pages/AbpPermissionManagement as a temporary solution:
PermissionManagementModal.cshtml
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Abp.PermissionManagement.Localization
@using Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement
@model Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal
@inject IHtmlLocalizer<AbpPermissionManagementResource> L
@{
Layout = null;
}
<form method="post" asp-page="/AbpPermissionManagement/PermissionManagementModal" data-script-class="abp.modals.PermissionManagement" id="PermissionManagementForm">
<abp-modal size="Large">
<abp-modal-header title="@(L["Permissions"].Value) - @Model.EntityDisplayName"></abp-modal-header>
<abp-modal-body class="custom-scroll-container">
<abp-input asp-for="SelectAllInAllTabs" check-box-hidden-input-render-mode="CheckBoxHiddenInputRenderMode.None" label="@L["SelectAllInAllTabs"].Value"/>
<hr class="mt-2 mb-2"/>
<input asp-for="@Model.ProviderKey"/>
<input asp-for="@Model.ProviderName"/>
<abp-tabs name="PermissionsTabs" tab-style="PillVertical" vertical-header-size="_4" class="custom-scroll-container">
@for (var i = 0; i < Model.Groups.Count; i++)
{
var group = Model.Groups[i];
<abp-tab title="@group.DisplayName" name="v-pills-tab-@group.GetNormalizedGroupName()">
<h4>@group.DisplayName</h4>
<hr class="mt-2 mb-3"/>
<div class="w-100" style="max-height: 640px;overflow-y: auto">
<div class="ps-1 pt-1">
<abp-input asp-for="@group.IsAllPermissionsGranted"
check-box-hidden-input-render-mode="CheckBoxHiddenInputRenderMode.None"
name="SelectAllInThisTab"
id="SelectAllInThisTab-@group.GetNormalizedGroupName()"
data-tab-id="v-pills-tab-@group.GetNormalizedGroupName()"
label="@L["SelectAllInThisTab"].Value"/>
<hr class="mb-3"/>
@for (var j = 0; j < group.Permissions.Count; j++)
{
var permission = group.Permissions[j];
<abp-input asp-for="@permission.IsGranted"
check-box-hidden-input-render-mode="CheckBoxHiddenInputRenderMode.None"
abp-id-name="@Model.Groups[i].Permissions[j].IsGranted"
label="@permission.GetShownName(Model.ProviderName)"
disabled="@permission.IsDisabled(Model.ProviderName)"
group-data-permission-name="@permission.Name"
group-data-parent-name="@(permission.ParentName ?? "")"
group-style="margin-inline-start: @(permission.Depth * 20)px"/>
<input asp-for="@permission.Name" abp-id-name="@Model.Groups[i].Permissions[j].Name"/>
}
</div>
</div>
</abp-tab>
}
</abp-tabs>
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal>
</form>
This is my test code and it works for me:
public class TestAppService : MyProjectNameAppService, IDistributedEventHandler<TestEventData>
{
private readonly IIdentityRoleRepository _identityRoleRepository;
private readonly IDistributedEventBus _distributedEventBus;
public TestAppService(IIdentityRoleRepository identityRoleRepository, IDistributedEventBus distributedEventBus)
{
_identityRoleRepository = identityRoleRepository;
_distributedEventBus = distributedEventBus;
}
public virtual async Task PublishAsync()
{
await _distributedEventBus.PublishAsync(new TestEventData());
}
[UnitOfWork]
public virtual async Task HandleEventAsync(TestEventData eventData)
{
try
{
await _identityRoleRepository.InsertAsync(new IdentityRole(Guid.NewGuid(), "test"));
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
}
I don't know about your project, Can you share a minimal project that reproduces the problem? thanks.
Hi,
We wil check it.
Hi,
Can you try this?
[UnitOfWork]
public virtual Task HandleEventAsync(APIBookEto eventData)
{
try
{
var input = ObjectMapper.Map(eventData);
var titles = ObjectMapper.Map, List>(input.inputTitles);
var book = await _bookManager.CreateAsync(
input.NoOfPages, input.Dimensions, input.ISBN10, input.ISBN13, input.Price, input.PublishDate,
titles, input.BookLanguageId, input.BookMediaTypeId, input.AuthorIds, input.PublisherIds, input.TagIds, input.FileId);
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
Hi,
The problem should be solved, I'm closing the question, reopen if still not working.
As @levees said, you can check the Microsoft document.
I'm closing the question, reopen if still not working.
Hi,
You are using tiered project, so you need to create an API Controller for AppService.
Like we do: https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs