Browse Source

Closes: #5544

pull/5614/head
Ahmet 6 years ago
parent
commit
a3d92aed41
  1. 4
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs
  2. 8
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor
  3. 5
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs
  4. 4
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj

4
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Routing;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement.Blazor;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement.Blazor.Navigation;
using Volo.Abp.UI.Navigation;
@ -9,7 +10,8 @@ namespace Volo.Abp.TenantManagement.Blazor
{
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpTenantManagementHttpApiClientModule)
typeof(AbpTenantManagementHttpApiClientModule),
typeof(AbpFeatureManagementBlazorModule)
)]
public class AbpTenantManagementBlazorModule : AbpModule
{

8
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor

@ -3,6 +3,7 @@
@using Microsoft.AspNetCore.Authorization
@using Microsoft.Extensions.Localization
@using Volo.Abp.TenantManagement.Localization
@using Volo.Abp.FeatureManagement.Blazor.Components
@inherits TenantManagementBase
@inject IStringLocalizer<AbpTenantManagementResource> L
@ -48,7 +49,7 @@
}
@if (HasManageFeaturesPermission)
{
<DropdownItem Clicked="() => OpenEditConnectionStringModalAsync(context.As<TenantDto>().Id)">@L["Features"]</DropdownItem>
<DropdownItem Clicked="() => FeatureManagementModal.OpenAsync(FeatureProviderName, context.As<TenantDto>().Id.ToString())">@L["Features"]</DropdownItem>
}
@if (HasDeletePermission)
{
@ -159,4 +160,9 @@
</ModalFooter>
</ModalContent>
</Modal>
}
@if (HasManageFeaturesPermission)
{
<FeatureManagementModal @ref="FeatureManagementModal"/>
}

5
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs

@ -3,16 +3,21 @@ using System.Threading.Tasks;
using Blazorise;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.BlazoriseUI;
using Volo.Abp.FeatureManagement.Blazor.Components;
namespace Volo.Abp.TenantManagement.Blazor.Pages.TenantManagement
{
public abstract class TenantManagementBase
: AbpCrudPageBase<ITenantAppService, TenantDto, Guid, GetTenantsInput, TenantCreateDto, TenantUpdateDto>
{
protected const string FeatureProviderName = "T";
protected bool ShouldShowEntityActions;
protected bool HasManageConnectionStringsPermission;
protected bool HasManageFeaturesPermission;
protected FeatureManagementModal FeatureManagementModal;
protected Modal ManageConnectionStringModal;
protected TenantInfoModel TenantInfo;

4
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj

@ -13,6 +13,10 @@
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Components.WebAssembly.Theming\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Blazor\Volo.Abp.FeatureManagement.Blazor.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" />
</ItemGroup>

Loading…
Cancel
Save