From 5c2bf0815983007789a640504092b4cb50ca7ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=87A=C4=9EDA=C5=9E?= Date: Sat, 17 Jan 2026 17:50:08 +0300 Subject: [PATCH] fixed build problems on tenant management module for MudBlazor --- .../AbpMudCrudPageBase.cs | 1 + .../TenantManagement/TenantManagement.razor | 6 +----- .../TenantManagement.razor.cs | 21 ++++++++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs b/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs index 56b2aa3939..e6a4f07695 100644 --- a/framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs +++ b/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 BreadcrumbItems = new List(2); protected MudDataGridEntityActionsColumn EntityActionsColumn = default!; protected EntityActionDictionary EntityActions { get; set; } protected TableColumnDictionary TableColumns { get; set; } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor index 6149079618..00ec195892 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor +++ b/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 LUiNavigation diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor.cs index 1f164617d0..4a6e723ac0 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor.cs +++ b/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(); } }