Browse Source

fixed build problems on tenant management module for MudBlazor

pull/25235/head
İsmail ÇAĞDAŞ 9 months ago
parent
commit
5c2bf08159
  1. 1
      framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs
  2. 6
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor
  3. 21
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor.cs

1
framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs

@ -191,6 +191,7 @@ public abstract class AbpMudCrudPageBase<
protected bool EditDialogVisible;
protected MudForm? CreateFormRef;
protected MudForm? EditFormRef;
protected List<BreadcrumbItem> BreadcrumbItems = new List<BreadcrumbItem>(2);
protected MudDataGridEntityActionsColumn<TListViewModel> EntityActionsColumn = default!;
protected EntityActionDictionary EntityActions { get; set; }
protected TableColumnDictionary TableColumns { get; set; }

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

@ -1,12 +1,8 @@
@page "/tenant-management/tenants"
@attribute [Authorize(TenantManagementPermissions.Tenants.Default)]
@using global::MudBlazor
@using Microsoft.AspNetCore.Authorization
@using Volo.Abp.FeatureManagement.Blazor.MudBlazor.Components
@using Microsoft.AspNetCore.Components.Forms
@using Volo.Abp.TenantManagement.Localization
@using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Components
@using Volo.Abp.MudBlazorUI.Components.ObjectExtending
@using Volo.Abp.AspNetCore.Components.Web
@using Microsoft.Extensions.Localization
@using Volo.Abp.UI.Navigation.Localization.Resource
@inject IStringLocalizer<AbpUiNavigationResource> LUiNavigation

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

@ -6,11 +6,9 @@ using MudBlazor;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.TableColumns;
using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.PageToolbars;
using Volo.Abp.BlazoriseUI;
using Volo.Abp.FeatureManagement.Blazor.MudBlazor.Components;
using Volo.Abp.ObjectExtending;
using Volo.Abp.TenantManagement.Localization;
using Volo.Abp.MudBlazorUI;
namespace Volo.Abp.TenantManagement.Blazor.MudBlazor.Pages.TenantManagement;
@ -46,9 +44,9 @@ public partial class TenantManagement
protected override ValueTask SetBreadcrumbItemsAsync()
{
BreadcrumbItems.Add(new BreadcrumbItem(LUiNavigation["Menu:Administration"].Value));
BreadcrumbItems.Add(new BreadcrumbItem(L["Menu:TenantManagement"].Value));
BreadcrumbItems.Add(new BreadcrumbItem(L["Tenants"].Value));
BreadcrumbItems.Add(new MudBlazorUI.BreadcrumbItem(LUiNavigation["Menu:Administration"].Value));
BreadcrumbItems.Add(new MudBlazorUI.BreadcrumbItem(L["Menu:TenantManagement"].Value));
BreadcrumbItems.Add(new MudBlazorUI.BreadcrumbItem(L["Tenants"].Value));
return base.SetBreadcrumbItemsAsync();
}
@ -66,9 +64,9 @@ public partial class TenantManagement
protected override ValueTask SetToolbarItemsAsync()
{
Toolbar.AddMudButton(L["NewTenant"],
Toolbar.AddButton(L["NewTenant"],
OpenCreateDialogAsync,
icon: Icons.Material.Filled.Add.ToString(),
icon: Icons.Material.Filled.Add,
requiredPolicyName: CreatePolicyName);
return base.SetToolbarItemsAsync();
@ -159,10 +157,17 @@ public partial class TenantManagement
protected override async Task UpdateEntityAsync()
{
if (_editFormRef != null && !await _editFormRef.Validate())
if (_editFormRef == null)
{
return;
}
await _editFormRef.Validate();
if (!_editFormRef.IsValid)
{
return;
}
await base.UpdateEntityAsync();
}
}

Loading…
Cancel
Save